本文共 5256 字,大约阅读时间需要 17 分钟。
OpenStack安装指南_Mitaka
Openstack管理手册-Newton版-CentOS7.2
#Configure Nova
mysql -uroot -ppasswd123 -e "CREATE DATABASE nova_api"mysql -uroot -ppasswd123 -e "CREATE DATABASE nova"mysql -uroot -ppasswd123 -e "CREATE DATABASE nova_cell0"mysql -uroot -ppasswd123 -e "GRANT ALL PRIVILEGES ON nova_api. TO 'nova'@'localhost' IDENTIFIED BY 'passwd123'"mysql -uroot -ppasswd123 -e "GRANT ALL PRIVILEGES ON nova_api. TO 'nova'@'%' IDENTIFIED BY 'passwd123'"
mysql -uroot -ppasswd123 -e "GRANT ALL PRIVILEGES ON nova. TO 'nova'@'localhost' IDENTIFIED BY 'passwd123'"mysql -uroot -ppasswd123 -e "GRANT ALL PRIVILEGES ON nova. TO 'nova'@'%' IDENTIFIED BY 'passwd123'"mysql -uroot -ppasswd123 -e "GRANT ALL PRIVILEGES ON nova_cell0. TO 'nova'@'localhost' IDENTIFIED BY 'passwd123'"mysql -uroot -ppasswd123 -e "GRANT ALL PRIVILEGES ON nova_cell0. TO 'nova'@'%' IDENTIFIED BY 'passwd123'"source admin-openrc
openstack user create --domain default --password passwd123 novaopenstack role add --project service --user nova adminopenstack service create --name nova --description "OpenStack Compute" computeopenstack endpoint create --region RegionOne compute public
openstack endpoint create --region RegionOne compute internal openstack endpoint create --region RegionOne compute adminopenstack user create --domain default --password paswd123 placement
openstack role add --project service --user placement adminopenstack service create --name placement --description "Placement API" placementopenstack endpoint create --region RegionOne placement public
openstack endpoint create --region RegionOne placement internal openstack endpoint create --region RegionOne placement adminEdit the /etc/nova/nova.conf
openstack-config --set /etc/nova/nova.conf DEFAULT enabled_apis osapi_compute,metadataopenstack-config --set /etc/nova/nova.conf api_database connection mysql+pymysql://nova:passwd123@controller/nova_api
openstack-config --set /etc/nova/nova.conf database connection mysql+pymysql://nova:passwd123@controller/novaopenstack-config --set /etc/nova/nova.conf DEFAULT transport_url rabbit://openstack:passwd123@controller
openstack-config --set /etc/nova/nova.conf api auth_strategy keystoneopenstack-config --set /etc/nova/nova.conf keystone_authtoken auth_uri openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_url openstack-config --set /etc/nova/nova.conf keystone_authtoken memcached_servers controller:11211openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_type passwordopenstack-config --set /etc/nova/nova.conf keystone_authtoken project_domain_name defaultopenstack-config --set /etc/nova/nova.conf keystone_authtoken user_domain_name defaultopenstack-config --set /etc/nova/nova.conf keystone_authtoken project_name serviceopenstack-config --set /etc/nova/nova.conf keystone_authtoken username novaopenstack-config --set /etc/nova/nova.conf keystone_authtoken password passwd123openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 192.168.137.145
openstack-config --set /etc/nova/nova.conf DEFAULT use_neutron Trueopenstack-config --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriveropenstack-config --set /etc/nova/nova.conf vnc enabled true
openstack-config --set /etc/nova/nova.conf vnc vncserver_listen 192.168.137.145openstack-config --set /etc/nova/nova.conf vnc vncserver_proxyclient_address 192.168.137.145openstack-config --set /etc/nova/nova.conf glance api_servers
openstack-config --set /etc/nova/nova.conf oslo_concurrency lock_path /var/lib/nova/tmp
openstack-config --set /etc/nova/nova.conf placement os_region_name RegionOne
openstack-config --set /etc/nova/nova.conf placement project_domain_name Defaultopenstack-config --set /etc/nova/nova.conf placement project_name serviceopenstack-config --set /etc/nova/nova.conf placement auth_type passwordopenstack-config --set /etc/nova/nova.conf placement user_domain_name Defaultopenstack-config --set /etc/nova/nova.conf placement auth_url openstack-config --set /etc/nova/nova.conf placement username placementopenstack-config --set /etc/nova/nova.conf placement password passwd123vim /etc/httpd/conf.d/00-nova-placement-api.conf
<Directory /usr/bin><IfVersion >= 2.4>Require all granted</IfVersion><IfVersion < 2.4>Order allow,denyAllow from all</IfVersion></Directory>systemctl restart httpd
systemctl status httpdsu -s /bin/sh -c "nova-manage api_db sync" nova
su -s /bin/sh -c "nova-manage cell_v2 map_cell0" novasu -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" novasu -s /bin/sh -c "nova-manage db sync" novanova-manage cell_v2 list_cellssystemctl enable openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service \
openstack-nova-conductor.service openstack-nova-novncproxy.servicesystemctl start openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service \openstack-nova-conductor.service openstack-nova-novncproxy.servicesystemctl status openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service \openstack-nova-conductor.service openstack-nova-novncproxy.serviceopenstack service list
转载于:https://blog.51cto.com/andyliu/2069165