Nova installation and configuration

Cloud computing infrastructure platform construction and application based on centos6.5

(6) Nova installation and configuration

The training involves the node
controller compute
training target

  1. Complete the installation of Nova basic components
  2. Complete the creation and authorization of the Nova database
  3. Complete the creation of Nova users, services and endpoints
  4. Complete the modification of Nova's main configuration file
  5. Complete Nova service verification
    (controller)
    1. Install Nova basic components
[root@controller ~]#  yum -y install openstack-nova-api openstack-nova-cert openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler python-novaclient

2. Create Nova database and add authorization

[root@controller ~]# openstack-db --init --service nova --password 000000
[root@controller ~]# mysql -uroot -p000000
mysql>grant all privileges on nova.* to 'nova'@'localhost' identified by '000000';
mysql> grant all privileges on nova.* to 'nova'@'%' identified by '000000';
[root@controller ~]# openstack-config --set /etc/nova/nova.conf database connection mysql://nova:000000@controller/nova
[root@controller ~]# mysql -uroot -p000000 -e "use nova;show tables;"

3. Register Nova service to Keystone server.
Register two aspects of information (user information, service service and endpoint information)

[root@controller ~]# keystone user-create --name=nova --pass=000000
[root@controller ~]# keystone user-role-add --user=nova --tenant=service --role=admin
[root@controller ~]# keystone service-create --name=nova --type=compute --description="Openstack Compute" 
[root@controller ~]# keystone endpoint-create --service-id=$(keystone service-list | awk '/ compute / {print $2}') --publicurl=http://controller:8774/v2/%\(tenant_id\)s --internalurl=http://controller:8774/v2/%\(tenant_id\)s --adminurl=http://controller:8774/v2/%\(tenant_id\)s

Configure Nova to use the message queue service

[root@controller ~]# openstack-config --set /etc/nova/nova.conf DEFAULT rpc_backend qpid
[root@controller ~]# openstack-config --set /etc/nova/nova.conf DEFAULT qpid_hostname controller

3. Modify Nova's configuration file

 [root@controller ~]# openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone
[root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_uri http://controller:5000
[root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_host controller
[root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_protocol http
[root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_port 35357
[root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_user nova
[root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_tenant_name service
[root@controller ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_password 000000

4. Modify the configuration file and connect to the vnc service of the controller node

[root@controller ~]#openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 192.168.100.10
[root@controller ~]#openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen 192.168.100.10
[root@controller ~]#openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 192.168.100.10

5. Start the service and set self-start after boot

[root@controller ~]#service openstack-nova-api restart
[root@controller ~]#service openstack-nova-cert restart
[root@controller ~]#service openstack-nova-consoleauth restart
[root@controller ~]#service openstack-nova-conductor restart
[root@controller ~]#service openstack-nova-scheduler restart
[root@controller ~]#service openstack-nova-novncproxy restart
[root@controller ~]#chkconfig openstack-nova-api on
[root@controller ~]#chkconfig openstack-nova-cert on
[root@controller ~]#chkconfig openstack-nova-consoleauth on
[root@controller ~]#chkconfig openstack-nova-conductor on
[root@controller ~]#chkconfig openstack-nova-scheduler on
[root@controller ~]#chkconfig openstack-nova-novncproxy on

6. Verify Nova

[root@controller ~]# nova image-list

(
Compute ) 1. Install Nova computing service package

[root@compute ~]# yum -y install openstack-nova-compute

2. Configure Nova authentication and database connection

[root@compute ~]# yum -y install openstack-utils
[root@compute ~]# openstack-config --set /etc/nova/nova.conf database connection mysql://nova:000000@controller/nova
[root@compute ~]# openstack-config --set /etc/nova/nova.conf database connection mysql://nova:000000@controller/nova
[root@compute ~]# openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone
[root@compute ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_uri http://controller:5000
[root@compute ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_host controller
[root@compute ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_protocol http
[root@compute ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_port 35357
[root@compute ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_user nova
[root@compute ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_tenant_name service
[root@compute ~]# openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_password 000000

3. Configure the message broker service

[root@compute ~]#openstack-config --set /etc/nova/nova.conf DEFAULT rpc_backend qpid
[root@compute ~]#openstack-config --set /etc/nova/nova.conf DEFAULT qpid_hostname controller

4. Configure console access to instance

[root@compute ~]#openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 192.168.100.20
[root@compute ~]#openstack-config --set /etc/nova/nova.conf DEFAULT vnc_enabled True
[root@compute ~]#openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen 0.0.0.0
[root@compute ~]#openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 192.168.100.20
[root@compute ~]#openstack-config --set /etc/nova/nova.conf DEFAULT novncproxy_base_url http://192.168.100.10:6080/vnc_auto.html

5. Specify the host running the mirroring service

[root@compute ~]# openstack-config --set /etc/nova/nova.conf DEFAULT glance_host controller

6. Check whether the system processor supports hardware acceleration of virtual machines

[root@compute ~]# egrep -c '(vmx|svm)' /proc/cpuinfo

If the command returns a value of 1 or greater, it means that the system supports it and usually does not require additional configuration.
If it is 0, it is not supported, and you need to configure libvirt to replace KVM to use QEMU. The command is as follows:

[root@compute ~]# openstack-config --set /etc/nova/nova.conf libvirt virt_type qemu

7. Start the service and set self-start after boot

[root@compute ~]#service libvirtd restart
[root@compute ~]#service messagebus restart
[root@compute ~]#service openstack-nova-compute restart
[root@compute ~]#chkconfig libvirtd on
[root@compute ~]#chkconfig messagebus on
[root@compute ~]#chkconfig openstack-nova-compute on

Guess you like

Origin blog.csdn.net/qq_44750380/article/details/103941932