Wednesday, April 4, 2018

04-openstack-controller-node-nova-configuration

CREATE DATABASE nova;
CREATE DATABASE nova_api;
CREATE DATABASE nova_cell0;


grant all privileges on nova.* to nova@10.0.3.11 identified by 'nova';
grant all privileges on nova_api.* to nova_api@10.0.3.11 identified by 'nova_api';
grant all privileges on nova_cell0.* to nova_cell0@10.0.3.11 identified by 'nova_cell0';


source admin-openrc


compute credential for nova user


openstack user create --domain default --password-prompt nova
add the admin role to nova


openstack role add --project service --user nova admin


create nova service entity


openstack service create --name nova --description "OpenStack Compute" compute



create service endpoint


openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1


openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1

openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1




Create a Placement service user using your chosen PLACEMENT_PASS :



openstack user create --domain default --password-prompt placement


passwd : placement


openstack role add --project service --user placement admin


Create the Placement API entry in the service catalog:



openstack service create --name placement --description "Placement API" placemenT
Create the Placement API service endpoints


openstack endpoint create --region RegionOne placement public http://controller:8778
openstack endpoint create --region RegionOne placement internal http://controller:8778
openstack endpoint create --region RegionOne placement admin http://controller:8778


Install and configure components


apt install nova-api nova-conductor nova-consoleauth nova-novncproxy nova-scheduler nova-placement-api


nova:nova
nova_api:nova_api
nova_cell0:nova_cell0


/etc/nova/nova.conf


[database]
connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova
connection = mysql+pymysql://nova:nova@10.0.3.16:3306/nova


[api_database]
connection = mysql+pymysql://nova_api:nova_api@10.0.3.16:3306/nova_api


[DEFAULT]
# ...
transport_url = rabbit://openstack:RABBIT_PASS@controller


[api]
# ...
auth_strategy = keystone
[keystone_authtoken]
# ...
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = NOVA_PASS


[DEFAULT]
# ...
my_ip = 10.0.3.11


[DEFAULT]
# ...
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver


By default, Compute uses an internal firewall driver Since the Networking service includesa firewall driver, you must disable the Compute firewall driver by using the nova.virt.firewall. NoopFirewallDriver firewall driver.


configure the VNC proxy to use the management interface IP address of the con-
troller node:


[vnc]
enabled = true
# ...
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip


[glance]
# ...
api_servers = http://controller:9292


[oslo_concurrency]
# ...
lock_path = /var/lib/nova/tmp


[placement]
# ...
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:35357/v3
username = placement
password = PLACEMENT_PASS


Populate the nova-api database:
nova-manage api_db sync


Register the cell0 database


nova-manage cell_v2 map_cell0


Create the cell1 cell:


su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
109e1d4b-536a-40d0-83c6-5f121b82b650


6. Populate the nova database:
nova-manage db sync


nova-manage cell list

No comments:

Post a Comment