nova计算节点部署

第一步:安装依赖包
[root@zxw7 openstack-compute-yilai]# ls
qemu-img-ev-2.9.0-16.el7_4.8.1.x86_64.rpm
qemu-kvm-common-ev-2.9.0-16.el7_4.8.1.x86_64.rpm
qemu-kvm-ev-2.9.0-16.el7_4.8.1.x86_64.rpm
[root@zxw7 openstack-compute-yilai]# yum localinstall ./*

第二步:下载nova-compute服务
[root@zxw7 ~]# yum install openstack-nova-compute -y

第二步:配置nova的文件

[root@zxw7 ~]# cat /etc/nova/nova.conf | grep -v "^#" | grep -v "^$"
[DEFAULT]
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:zxw6@zxw6
my_ip = 192.168.126.6
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[api]
auth_strategy = keystone
[api_database]
[barbican]
[cache]
[cells]
[cinder]
[cloudpipe]
[conductor]
[console]
[consoleauth]
[cors]
[cors.subdomain]
[crypto]
[database]
[ephemeral_storage_encryption]
[filter_scheduler]
[glance]
api_servers = http://zxw6:9292
[guestfs]
[healthcheck]
[hyperv]
[image_file_url]
[ironic]
[key_manager]
[keystone_authtoken]
auth_uri = http://zxw6:5000
auth_url = http://zxw6:35357
memcached_servers = zxw6:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = zxw6
[libvirt]
virt_type = qemu
[matchmaker_redis]
[metrics]
[mks]
[neutron]
[notifications]
[osapi_v21]
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_messaging_zmq]
[oslo_middleware]
[oslo_policy]
[pci]
[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://zxw6:35357/v3
username = placement
password = zxw6
[quota]
[rdp]
[remote_debug]
[scheduler]
[serial_console]
[service_user]
[spice]
[ssl]
[trusted_computing]
[upgrade_levels]
[vendordata_dynamic_auth]
[vmware]
[vnc]
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://192.168.126.6:6080/vnc_auto.html
[workarounds]
[wsgi]
[xenserver]
[xvp]

第四步:查看cpu是否开启
[root@zxw7 ~]# egrep -c '(vmx|svm)' /proc/cpuinfo


第五步:启动服务并开机自启
yum update librbd1
[root@zxw7 ~]# systemctl start libvirtd.service openstack-nova-compute.service
[root@zxw7 ~]# systemctl enable libvirtd.service openstack-nova-compute.service

 


zxw6:查看虚拟化状态
[root@zxw6 images]# openstack hypervisor list
+----+---------------------+-----------------+---------------+-------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State |
+----+---------------------+-----------------+---------------+-------+
| 1 | zxw7 | QEMU | 192.168.126.6 | up |
| 2 | zxw8 | QEMU | 192.168.126.6 | up |
+----+---------------------+-----------------+---------------+-------+

发现加入节点
[root@zxw6 images]# su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova

[scheduler]
discover_hosts_in_cells_interval = 300

 


[root@zxw6 images]# openstack compute service list 计算节点
+----+--------------+------+----------+---------+-------+--------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----+--------------+------+----------+---------+-------+--------------+
| 1 | nova- | zxw6 | internal | enabled | up | 2019-07-31T1 |
| | scheduler | | | | | 2:19:24.0000 |
| | | | | | | 00 |
| 2 | nova- | zxw6 | internal | enabled | up | 2019-07-31T1 |
| | conductor | | | | | 2:19:23.0000 |
| | | | | | | 00 |
| 3 | nova- | zxw6 | internal | enabled | up | 2019-07-31T1 |
| | consoleauth | | | | | 2:19:25.0000 |
| | | | | | | 00 |
| 6 | nova-compute | zxw7 | nova | enabled | up | 2019-07-31T1 |
| | | | | | | 2:19:19.0000 |
| | | | | | | 00 |
| 7 | nova-compute | zxw8 | nova | enabled | up | 2019-07-31T1 |
| | | | | | | 2:19:23.0000 |
| | | | | | | 00 |
+----+--------------+------+----------+---------+-------+--------------+


[root@zxw6 images]# openstack catalog list 服务列表
+-----------+-----------+-----------------------------------+
| Name | Type | Endpoints |
+-----------+-----------+-----------------------------------+
| placement | placement | RegionOne |
| | | internal: http://zxw6:8778 |
| | | RegionOne |
| | | admin: http://zxw6:8778 |
| | | RegionOne |
| | | public: http://zxw6:8778 |
| | | |
| nova | compute | RegionOne |
| | | admin: http://zxw6:8774/v2.1 |
| | | RegionOne |
| | | public: http://zxw6:8774/v2.1 |
| | | RegionOne |
| | | internal: http://zxw6:8774/v2.1 |
| | | |
| glance | image | RegionOne |
| | | internal: http://zxw6:9292 |
| | | RegionOne |
| | | public: http://zxw6:9292 |
| | | RegionOne |
| | | admin: http://zxw6:9292 |
| | | |
| keystone | identity | RegionOne |
| | | admin: http://zxw6:35357/v3/ |
| | | RegionOne |
| | | public: http://zxw6:5000/v3/ |
| | | RegionOne |
| | | internal: http://zxw6:5000/v3/ |
| | | |
+-----------+-----------+-----------------------------------+


[root@zxw6 images]# openstack image list 镜像
+--------------------------------------+--------+--------+
| ID | Name | Status |
+--------------------------------------+--------+--------+
| aacc9d12-6ec9-4b7d-8abe-d3c26ba0e57a | centos | active |
+--------------------------------------+--------+--------+


[root@zxw6 images]# nova-status upgrade check
+---------------------------+
| Upgrade Check Results |
+---------------------------+
| Check: Cells v2 |
| Result: 成功 |
| Details: None |
+---------------------------+
| Check: Placement API |
| Result: 成功 |
| Details: None |
+---------------------------+
| Check: Resource Providers |
| Result: 成功 |
| Details: None |
+---------------------------+

journalctl -xe | grep error

 

猜你喜欢

转载自www.cnblogs.com/itzhao/p/11335559.html
今日推荐