なにかの技術メモ置き場

なにかの技術メモ置き場

@インフラエンジニア

OpenStack環境構築 part15

Compute service (Nova)

Install and configure a compute node for Red Hat Enterprise Linux and CentOS

Install and configure components
dnf -y install openstack-nova-compute
cp -p /etc/nova/nova.conf{,_org}
ls -l /etc/nova/nova.conf*
cat << EOF > /etc/nova/nova.conf
[DEFAULT]
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:RABBIT_PASS@ctr01
my_ip = 172.16.0.207

[api]
auth_strategy = keystone

[keystone_authtoken]
www_authenticate_uri = http://ctr01:5000/
auth_url = http://ctr01:5000/
memcached_servers = ctr01:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = NOVA_PASS

[vnc]
enabled = true
server_listen = 0.0.0.0
server_proxyclient_address = \$my_ip
novncproxy_base_url = http://ctr01:6080/vnc_auto.html

[glance]
api_servers = http://ctr01:9292

[oslo_concurrency]
lock_path = /var/lib/nova/tmp

[placement]
region_name = RegionOne
project_domain_name = default
project_name = service
auth_type = password
user_domain_name = default
auth_url = http://ctr01:5000/v3
username = placement
password = PLACEMENT_PASS
EOF
cat /etc/nova/nova.conf
Finalize installation
egrep -c '(vmx|svm)' /proc/cpuinfo

結果が0なら追加設定が必要。公式ドキュメントを参照。

systemctl enable --now libvirtd.service openstack-nova-compute.service
systemctl status --no-pager -l libvirtd.service openstack-nova-compute.service
systemctl is-active libvirtd.service openstack-nova-compute.service
systemctl is-enabled libvirtd.service openstack-nova-compute.service
Add the compute node to the cell database

以降、コントローラノードで実施する。

. admin-openrc
openstack compute service list --service nova-compute
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova

Verify operation

. admin-openrc
openstack compute service list
openstack catalog list
openstack image list
nova-status upgrade check

参考サイト

docs.openstack.org