控制节点:
登陆数据库
mysql -u root -p执行以下命令
CREATE DATABASE nova; GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'NOVA_DBPASS'; GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'NOVA_DBPASS';
source admin-openrc.sh
openstack user create --domain default --password-prompt nova添加admin角色到nova用户及service项目
openstack role add --project service --user nova admin创建nova服务实体
openstack service create --name nova --description "OpenStack Compute" compute
openstack endpoint create --region RegionOne compute public http://controller:8774/v2/%\\(tenant_id\\)s openstack endpoint create --region RegionOne compute internal http://controller:8774/v2/%\\(tenant_id\\)s openstack endpoint create --region RegionOne compute admin http://controller:8774/v2/%\\(tenant_id\\)s
yum install openstack-nova-api openstack-nova-cert openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler python-novaclient -y
[DEFAULT] rpc_backend = rabbit auth_strategy = keystone my_ip = 10.0.0.11 network_api_class = nova.network.neutronv2.api.API security_group_api = neutron linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver firewall_driver = nova.virt.firewall.NoopFirewallDriver enabled_apis=osapi_compute,metadata verbose = True ...... [database] connection = mysql://nova:NOVA_DBPASS@controller/nova ...... [glance] host = controller ...... [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = nova password = 111111 ...... [oslo_concurrency] lock_path = /var/lib/nova/tmp ...... [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = RABBIT_PASS ...... [vnc] vncserver_listen = $my_ip vncserver_proxyclient_address = $my_ip
su -s /bin/sh -c "nova-manage db sync" nova
systemctl enable openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service systemctl start openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
计算节点:
yum install openstack-nova-compute sysfsutils
[DEFAULT] rpc_backend = rabbit auth_strategy = keystone my_ip = 10.0.0.31 network_api_class = nova.network.neutronv2.api.API security_group_api = neutron linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver firewall_driver = nova.virt.firewall.NoopFirewallDriver verbose = True ...... [glance] host = controller ...... [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = nova password = 111111 ...... [oslo_concurrency] lock_path = /var/lib/nova/tmp ...... [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = RABBIT_PASS ...... [vnc] enabled = True vncserver_listen = 0.0.0.0 vncserver_proxyclient_address = $my_ip novncproxy_base_url = http://controller:6080/vnc_auto.html ......
egrep -c '(vmx|svm)' /proc/cpuinfo
输出为1或大于1则支持
systemctl enable libvirtd.service openstack-nova-compute.service systemctl start libvirtd.service openstack-nova-compute.service
控制节点:
source admin-openrc.sh
nova service-list
nova endpoints
nova image-list