Add Compute Nodes to run more instances.
This example is based on the emvironment like follows.
------------+-----------------------------+------------
| |
eth0|10.0.0.30 eth0|10.0.0.51
+-----------+-----------+ +-----------+-----------+
| [ Control Node ] | | [ Compute Node ] |
| | | |
| MariaDB RabbitMQ | | Libvirt |
| Memcached httpd | | Nova Compute |
| Keystone Glance | | |
| Nova API | | |
+-----------------------+ +-----------------------+
|
| [1] |
Install KVM Hypervisor on Compute Node.
It's unnecessary to set Bridge networking on the section [2] of the link. |
| [2] | Install Nova-Compute. |
|
[root@node01 ~]#
yum --enablerepo=centos-openstack-ocata,epel -y install openstack-nova-compute
|
| [3] | Configure Nova. |
| [root@node01 ~]#
mv /etc/nova/nova.conf /etc/nova/nova.conf.org
[root@node01 ~]#
vi /etc/nova/nova.conf
# create new
[DEFAULT] # define own IP address my_ip = 10.0.0.51 state_path = /var/lib/nova enabled_apis = osapi_compute,metadata log_dir = /var/log/nova # RabbitMQ connection info transport_url = rabbit://openstack:password@10.0.0.30 [api] auth_strategy = keystone # enable VNC [vnc] enabled = True vncserver_listen = 0.0.0.0 vncserver_proxyclient_address = $my_ip novncproxy_base_url = http://10.0.0.30:6080/vnc_auto.html # Glance connection info [glance] api_servers = http://10.0.0.30:9292 [oslo_concurrency] lock_path = $state_path/tmp # Keystone auth info [keystone_authtoken] auth_uri = http://10.0.0.30:5000 auth_url = http://10.0.0.30:35357 memcached_servers = 10.0.0.30:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = nova password = servicepassword [placement] auth_url = http://10.0.0.30:35357 os_region_name = RegionOne auth_type = password project_domain_name = default user_domain_name = default project_name = service username = placement password = servicepassword [wsgi] api_paste_config = /etc/nova/api-paste.ini
chmod 640 /etc/nova/nova.conf
[root@node01 ~]#
chgrp nova /etc/nova/nova.conf
|
| [4] | If SELinux is enabled, change policy like follows. |
[root@node01 ~]#
vi nova-compute_pol.te
# create new
module nova-compute_pol 1.0;
require {
type nova_t;
type nova_var_lib_t;
type nova_log_t;
type virtlogd_t;
type sysctl_net_t;
type netutils_exec_t;
class file { read append getattr create open execute };
class dir { write search add_name };
class capability { dac_override kill sys_ptrace };
class capability2 block_suspend;
}
#============= nova_t ==============
allow nova_t netutils_exec_t:file execute;
allow nova_t self:capability kill;
allow nova_t sysctl_net_t:dir search;
allow nova_t sysctl_net_t:file { read getattr open };
allow nova_t self:capability sys_ptrace;
allow nova_t self:capability2 block_suspend;
#============= virtlogd_t ==============
allow virtlogd_t nova_var_lib_t:dir search;
allow virtlogd_t nova_var_lib_t:file { append getattr open };
allow virtlogd_t self:capability dac_override;
checkmodule -m -M -o nova-compute_pol.mod nova-compute_pol.te
checkmodule: loading policy configuration from nova-compute_pol.te checkmodule: policy configuration loaded checkmodule: writing binary representation (version 17) to nova-compute_pol.mod [root@node01 ~]#
semodule_package --outfile nova-compute_pol.pp --module nova-compute_pol.mod
[root@node01 ~]#
semodule -i nova-compute_pol.pp
|
| [5] | Start Nova Services. |
| [root@node01 ~]#
systemctl start openstack-nova-compute
[root@node01 ~]#
systemctl enable openstack-nova-compute
|
| [6] | Make sure the status of Nova services on Controle 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 | +----+------------------+------------------+----------+---------+-------+----------------------------+ | 5 | nova-cert | dlp.srv.world | internal | enabled | up | 2017-02-28T14:18:50.000000 | | 6 | nova-consoleauth | dlp.srv.world | internal | enabled | up | 2017-02-28T14:18:50.000000 | | 7 | nova-conductor | dlp.srv.world | internal | enabled | up | 2017-02-28T14:18:50.000000 | | 8 | nova-scheduler | dlp.srv.world | internal | enabled | up | 2017-02-28T14:18:50.000000 | | 9 | nova-compute | node01.srv.world | nova | enabled | up | 2017-02-28T14:18:52.000000 | +----+------------------+------------------+----------+---------+-------+----------------------------+ |
No comments:
Post a Comment