4.6配置计算服务
# crudini --set /etc/nova/nova.conf DEFAULT enabled_apis osapi_compute,metadata
# crudini --set /etc/nova/nova.conf DEFAULT transport_url rabbit://openstack:$NOVA_DBPASS@$HOST_NAME
# crudini --set /etc/nova/nova.conf DEFAULT my_ip $HOST_IP
# crudini --set /etc/nova/nova.conf DEFAULT use_neutron True
# crudini --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
#
# crudini --set /etc/nova/nova.conf api auth_strategy keystone
#
# crudini --set /etc/nova/nova.conf api_database connection mysql+pymysql://nova:$NOVA_DBPASS@$HOST_NAME/nova_api
#
# crudini --set /etc/nova/nova.conf database connection mysql+pymysql://nova:$NOVA_DBPASS@$HOST_NAME/nova
#
# crudini --set /etc/nova/nova.conf keystone_authtoken auth_url http://$HOST_NAME:5000/v3
# crudini --set /etc/nova/nova.conf keystone_authtoken memcached_servers $HOST_NAME:11211
# crudini --set /etc/nova/nova.conf keystone_authtoken auth_type password
# crudini --set /etc/nova/nova.conf keystone_authtoken project_domain_name $DOMAIN_NAME
# crudini --set /etc/nova/nova.conf keystone_authtoken user_domain_name $DOMAIN_NAME
# crudini --set /etc/nova/nova.conf keystone_authtoken project_name service
# crudini --set /etc/nova/nova.conf keystone_authtoken username nova
# crudini --set /etc/nova/nova.conf keystone_authtoken password $NOVA_PASS
#
# crudini --set /etc/nova/nova.conf vnc enabled true
# crudini --set /etc/nova/nova.conf vnc server_listen $HOST_IP
# crudini --set /etc/nova/nova.conf vnc server_proxyclient_address $HOST_IP
#
# crudini --set /etc/nova/nova.conf glance api_servers http://$HOST_NAME:9292
#
# crudini --set /etc/nova/nova.conf oslo_concurrency lock_path /var/lib/nova/tmp
#
# crudini --set /etc/nova/nova.conf placement os_region_name RegionOne
# crudini --set /etc/nova/nova.conf placement project_domain_name $DOMAIN_NAME
# crudini --set /etc/nova/nova.conf placement project_name service
# crudini --set /etc/nova/nova.conf placement auth_type password
# crudini --set /etc/nova/nova.conf placement user_domain_name $DOMAIN_NAME
# crudini --set /etc/nova/nova.conf placement auth_url http://$HOST_NAME:5000/v3
# crudini --set /etc/nova/nova.conf placement username placement
# crudini --set /etc/nova/nova.conf placement password $NOVA_PASS
4.7创建Endpoint和API端点
# openstack service create --name nova --description "OpenStack Compute" compute
# openstack endpoint create --region RegionOne compute public http://$HOST_NAME:8774/v2.1
# openstack endpoint create --region RegionOne compute internal http://$HOST_NAME:8774/v2.1
# openstack endpoint create --region RegionOne compute admin http://$HOST_NAME:8774/v2.1
# openstack user create --domain $DOMAIN_NAME --password $NOVA_PASS placement
# openstack role add --project service --user placement admin
# openstack service create --name placement --description "Placement API" placement
# openstack endpoint create --region RegionOne placement public http://$HOST_NAME:8778
# openstack endpoint create --region RegionOne placement internal http://$HOST_NAME:8778
# openstack endpoint create --region RegionOne placement admin http://$HOST_NAME:8778
4.8 添加配置
在/etc/httpd/conf.d/00-nova-placement-api.conf文件中添加如下配置
<Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
4.9启动服务
# systemctl enable openstack-nova-api.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-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
# systemctl restart httpd memcached
4.10验证Nova数据库是否创建成功
# nova-manage cell_v2 list_cells
后接4.11
4.6-4.10
最新推荐文章于 2024-11-07 15:10:30 发布