OpenStack Caracal : Add Compute Nodes2024/08/06 |
Add Compute Nodes to run more instances.
Following setting example is only for Nova Compute. This example is based on the environment like follows. ------------+--------------------------+------------ | | eth0|10.0.0.30 eth0|10.0.0.51 +-----------+-----------+ +-----------+-----------+ | [ dlp.srv.world ] | | [ node01.srv.world ] | | (Control Node) | | (Compute Node) | | | | | | MariaDB RabbitMQ | | Libvirt | | Memcached Nginx | | Nova Compute | | Keystone httpd | | | | Glance Nova API | | | +-----------------------+ +-----------------------+ |
[1] |
On new Compute Nodes, Set OpenStack Caracal repository, refer to here of [3]. |
[2] |
On new Compute Nodes, Install KVM Hypervisor on Compute Node, refer to here. |
[3] | Install Nova-Compute. |
[root@node01 ~]# dnf --enablerepo=centos-openstack-caracal,epel,crb -y install openstack-nova-compute
|
[4] | Configure Nova. |
[root@node01 ~]# mv /etc/nova/nova.conf /etc/nova/nova.conf.org
[root@node01 ~]#
vi /etc/nova/nova.conf # create new [DEFAULT] state_path = /var/lib/nova enabled_apis = osapi_compute,metadata log_dir = /var/log/nova # RabbitMQ connection info transport_url = rabbit://openstack:password@dlp.srv.world compute_driver = libvirt.LibvirtDriver [api] auth_strategy = keystone [vnc] enabled = True # IP address compute instances listen # specify this node's IP server_listen = 10.0.0.51 server_proxyclient_address = 10.0.0.51 novncproxy_base_url = https://dlp.srv.world:6080/vnc_auto.html # Glance connection info [glance] api_servers = https://dlp.srv.world:9292 [oslo_concurrency] lock_path = $state_path/tmp # Keystone auth info [keystone_authtoken] www_authenticate_uri = https://dlp.srv.world:5000 auth_url = https://dlp.srv.world:5000 memcached_servers = dlp.srv.world:11211 auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = nova password = servicepassword # if using self-signed certs on httpd Keystone, turn to [true] insecure = false [placement] auth_url = https://dlp.srv.world:5000 os_region_name = RegionOne auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = placement password = servicepassword # if using self-signed certs on httpd Keystone, turn to [true] insecure = false [wsgi] api_paste_config = /etc/nova/api-paste.ini [oslo_policy] enforce_new_defaults = true chmod 640 /etc/nova/nova.conf [root@node01 ~]# chgrp nova /etc/nova/nova.conf |
[5] | If SELinux is enabled, change policy. |
[root@node01 ~]# dnf --enablerepo=centos-openstack-caracal -y install openstack-selinux
[root@node01 ~]#
vi lsmd.te # create new module lsmd 1.0; require { type pasta_exec_t; type lsmd_t; class lnk_file getattr; } #============= lsmd_t ============== allow lsmd_t pasta_exec_t:lnk_file getattr; checkmodule -m -M -o lsmd.mod lsmd.te [root@node01 ~]# semodule_package --outfile lsmd.pp --module lsmd.mod [root@node01 ~]# semodule -i lsmd.pp |
[6] | If Firewalld is running, allow service ports. |
[root@node01 ~]# firewall-cmd --add-port=5900-5999/tcp success [root@node01 ~]# firewall-cmd --runtime-to-permanent success |
[7] | Start Nova Compute Service. |
[root@node01 ~]# systemctl enable --now openstack-nova-compute |
[8] | Verify the status of Nova services on Control Node like here. If all State is [up], they are running normally. |
# discover Compute Nodes [root@dlp ~(keystone)]# su -s /bin/bash nova -c "nova-manage cell_v2 discover_hosts"
openstack compute service list +--------------------------------------+----------------+------------------+----------+---------+-------+----------------------------+ | ID | Binary | Host | Zone | Status | State | Updated At | +--------------------------------------+----------------+------------------+----------+---------+-------+----------------------------+ | 12b8dc9e-acfc-4d68-9946-bc126dd8ab27 | nova-scheduler | dlp.srv.world | internal | enabled | up | 2024-08-06T03:58:19.000000 | | 846b71ab-2a9b-4521-9113-64a98be256b7 | nova-conductor | dlp.srv.world | internal | enabled | up | 2024-08-06T03:58:13.000000 | | f37f8668-5704-4449-84fc-3bbcded4fd98 | nova-compute | dlp.srv.world | nova | enabled | up | 2024-08-06T03:58:17.000000 | | 7822ce38-1228-4cef-882c-936617a3027e | nova-compute | node01.srv.world | nova | enabled | up | 2024-08-06T03:58:16.000000 | +--------------------------------------+----------------+------------------+----------+---------+-------+----------------------------+ |
Sponsored Link |