Controller — Nova

Create User For Nova

  1. [root@controller ~]# source /root/admin-openrc
  2. [root@controller ~]# openstack user create --domain default nova --password password
  3. [root@controller ~]# openstack role add --project service --user nova admin

Create Compute Service

  1. [root@controller ~]# openstack service create --name nova --description "OpenStack Compute" compute

Create Nova Endpoint

  1. [root@controller ~]# openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1/%\(tenant_id\)s
  2. [root@controller ~]# openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1/%\(tenant_id\)s
  3. [root@controller ~]# openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1/%\(tenant_id\)s

Create Placement

  1. [root@controller ~]# openstack user create --domain default placement --password password
  2. [root@controller ~]# openstack role add --project service --user placement admin
  3. [root@controller ~]# openstack service create --name placement --description "Placement API" placement

Create Placement Endpoint

  1. [root@controller ~]# openstack endpoint create --region RegionOne placement public http://controller:8778
  2. [root@controller ~]# openstack endpoint create --region RegionOne placement admin http://controller:8778
  3. [root@controller ~]# openstack endpoint create --region RegionOne placement internal http://controller:8778

Install Nova

  1. [root@controller ~]# yum install openstack-nova-api openstack-nova-conductor openstack-nova-cert openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler openstack-nova-placement-api -y

Configure Nova

  1. [root@controller ~]# cp /etc/nova/nova.conf /etc/nova/nova.conf.bak
  2. [root@controller ~]# openstack-config --set /etc/nova/nova.conf DEFAULT enabled_apis osapi_compute,metadata
  3. [root@controller ~]# openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone
  4. [root@controller ~]# openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 10.1.1.61
  5. [root@controller ~]# openstack-config --set /etc/nova/nova.conf DEFAULT use_neutron True
  6. [root@controller ~]# openstack-config --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
  7. [root@controller ~]# openstack-config --set /etc/nova/nova.conf DEFAULT transport_url rabbit://openstack:[email protected]
  8. [root@controller ~]# openstack-config --set /etc/nova/nova.conf database connection mysql+pymysql://nova:[email protected]/nova
  9. [root@controller ~]# openstack-config --set /etc/nova/nova.conf api_database connection mysql+pymysql://nova:[email protected]/nova_api
  10. [root@controller ~]# openstack-config --set /etc/nova/nova.conf scheduler discover_hosts_in_cells_interval -1
  11. [root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_uri http://controller:5000
  12. [root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_url http://controller:35357
  13. [root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken memcached_servers controller:11211
  14. [root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_type password
  15. [root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken project_domain_name default
  16. [root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken user_domain_name default
  17. [root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken project_name service
  18. [root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken username nova
  19. [root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken password password
  20. [root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken service_token_roles_required True
  21. [root@controller ~]# openstack-config --set /etc/nova/nova.conf placement auth_url http://controller:35357
  22. [root@controller ~]# openstack-config --set /etc/nova/nova.conf placement memcached_servers controller:11211
  23. [root@controller ~]# openstack-config --set /etc/nova/nova.conf placement auth_type password
  24. [root@controller ~]# openstack-config --set /etc/nova/nova.conf placement project_domain_name default
  25. [root@controller ~]# openstack-config --set /etc/nova/nova.conf placement user_domain_name default
  26. [root@controller ~]# openstack-config --set /etc/nova/nova.conf placement project_name service
  27. [root@controller ~]# openstack-config --set /etc/nova/nova.conf placement username placement
  28. [root@controller ~]# openstack-config --set /etc/nova/nova.conf placement password password
  29. [root@controller ~]# openstack-config --set /etc/nova/nova.conf placement os_region_name RegionOne
  30. [root@controller ~]# openstack-config --set /etc/nova/nova.conf vnc vncserver_listen 10.1.1.61
  31. [root@controller ~]# openstack-config --set /etc/nova/nova.conf vnc vncserver_proxyclient_address 10.1.1.61
  32. [root@controller ~]# openstack-config --set /etc/nova/nova.conf glance api_servers http://controller:9292
  33. [root@controller ~]# openstack-config --set /etc/nova/nova.conf oslo_concurrency lock_path /var/lib/nova/tmp

Configure Nova-Placement

  1. [root@controller ~]# cat /etc/httpd/conf.d/00-nova-placement-api.conf

  1. <Directory /usr/bin>
  2.         <IfVersion >= 2.4>
  3.             Require all granted
  4.       </IfVersion>
  5.       <IfVersion < 2.4>
  6.             Order allow,deny
  7.             Allow from all
  8.       </IfVersion>
  9. </Directory>

Restart Httpd

  1. [root@controller ~]# systemctl restart httpd

Synchronize Database

  1. [root@controller ~]# su -s /bin/sh -c "nova-manage api_db sync" nova
  2. [root@controller ~]# su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
  3. [root@controller ~]# su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
  4. [root@controller ~]# su -s /bin/sh -c "nova-manage db sync" nova

List Nova Cell

  1. [root@controller ~]# nova-manage cell_v2 list_cells

Start Nova Service

  1. [root@controller ~]# systemctl enable openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
  2. [root@controller ~]# systemctl restart openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
  3. [root@controller ~]# systemctl status openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service

List Nova Status

  1. [root@controller ~]# systemctl list-unit-files |grep openstack-nova-*
  2. openstack-nova-api.service enabled
  3. openstack-nova-conductor.service enabled
  4. openstack-nova-console.service disabled
  5. openstack-nova-consoleauth.service enabled
  6. openstack-nova-metadata-api.service disabled
  7. openstack-nova-novncproxy.service enabled
  8. openstack-nova-os-compute-api.service disabled
  9. openstack-nova-scheduler.service enabled
  10. openstack-nova-xvpvncproxy.service disabled

Check Nova Status

  1. [root@controller ~]# nova-status upgrade check

List Nova Service

  1. [root@controller ~]# nova service-list

List Nova Endpoint

  1. [root@controller ~]# openstack endpoint list

Leave a Reply

Your email address will not be published. Required fields are marked *