nove在openstack很是重要,主要負責建立虛擬機node
nova計算服務mysql
API :負責接收和響應外部請求。支持openstack API,EC2 APIlinux
Cert:負責身份認證EC 2sql
Scheduler:用於雲主機調度,負責虛擬機建立在那個計算的節點上數據庫
Conductor:數據節點訪問數據的中間件vim
Consoleauth:用於控制檯的受權驗證api
Novncproxy:VNC代理dom
[root@linux-node1 ~]# yum install -y openstack-nova-api openstack-nova-placement-api \ openstack-nova-conductor openstack-nova-console \ openstack-nova-novncproxy openstack-nova-scheduler
安裝以後配置文件在/etc/nova下ide
日誌文件在/var/log/nova下memcached
[root@linux-node1 ~]# vim /etc/nova/nova.conf [api_database] connection= mysql+pymysql://nova:nova@192.168.56.11/nova_api [database] connection= mysql+pymysql://nova:nova@192.168.56.11/nova
這一項很容易配置出錯,有幾個transport_url不要配置錯誤
[root@linux-node1 ~]# vim /etc/nova/nova.conf [DEFAULT] transport_url = rabbit://openstack:openstack@192.168.56.11
[root@linux-node1 ~]# vim /etc/nova/nova.conf [api] auth_strategy=keystone [keystone_authtoken] auth_uri = http://192.168.56.11:5000 auth_url = http://192.168.56.11:35357 memcached_servers = 192.168.56.11:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = nova password = nova
[DEFAULT] use_neutron=true firewall_driver = nova.virt.firewall.NoopFirewallDriver
[root@linux-node1 ~]# vim /etc/nova/nova.conf [vnc] enabled=true server_listen = 0.0.0.0 server_proxyclient_address = 192.168.56.11
[glance] api_servers = http://192.168.56.11:9292
[oslo_concurrency] lock_path=/var/lib/nova/tmp
[DEFAULT]
enabled_apis=osapi_compute,metadata
[placement] os_region_name = RegionOne project_domain_name = Default project_name = service auth_type = password user_domain_name = Default auth_url = http://192.168.56.11:35357/v3 username = placement password = placement
在<VirtualHost></VirtualHost>之間添加以下代碼
[root@linux-node1 ~]# vim /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>
[root@linux-node1 ~]# su -s /bin/sh -c "nova-manage api_db sync" nova
[root@linux-node1 ~]# su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
[root@linux-node1 ~]# su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
[root@linux-node1 ~]# su -s /bin/sh -c "nova-manage db sync" nova
[root@linux-node1 ~]# nova-manage cell_v2 list_cells
[root@linux-node1 ~]#mysql -h 192.168.56.11 -unova -pnova -e " use nova;show tables;" [root@linux-node1 ~]#mysql -h 192.168.56.11 -unova -pnova -e " use nova_api;show tables;"
# 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
# source admin-openstack.sh # openstack service create --name nova --description "OpenStack Compute" compute # openstack endpoint create --region RegionOne compute public http://192.168.56.11:8774/v2.1 # openstack endpoint create --region RegionOne compute internal http://192.168.56.11:8774/v2.1 # openstack endpoint create --region RegionOne compute admin http://192.168.56.11:8774/v2.1 # openstack service create --name placement --description "Placement API" placement # openstack endpoint create --region RegionOne placement public http://192.168.56.11:8778 # openstack endpoint create --region RegionOne placement internal http://192.168.56.11:8778 # openstack endpoint create --region RegionOne placement admin http://192.168.56.11:8778
[root@linux-node1 ~]# openstack host list +-------------------------+-------------+----------+ | Host Name | Service | Zone | +-------------------------+-------------+----------+ | linux-node1.example.com | conductor | internal | | linux-node1.example.com | consoleauth | internal | | linux-node1.example.com | scheduler | internal | +-------------------------+-------------+----------+ [root@linux-node1 ~]# [root@linux-node1 ~]# [root@linux-node1 ~]# openstack service list +----------------------------------+-----------+-----------+ | ID | Name | Type | +----------------------------------+-----------+-----------+ | 7a75ea530f2d4af59e3ab423bd47a11b | keystone | identity | | 9259c8ff22ff421ca504e73e50690394 | placement | placement | | a6e0622122a54636bf3e7839a8aa005d | nova | compute | | c111910dcb8d40adb911c24e5495ec90 | glance | image | +----------------------------------+-----------+-----------+
控制節點安裝完成!!!!!!