CentOS 7
Ads

OpenStack Ocata : Configure Nova#3
2017/02/27
 
Install OpenStack Compute Service (Nova).
This example is based on the emvironment like follows.
If you'd like to install Nova Compute on another Computer, refer to here.
                  eth0|10.0.0.30 
          +-----------+-----------+
          |    [ Control Node ]   |
          |                       |
          |  MariaDB    RabbitMQ  |
          |  Memcached  httpd     |
          |  Keystone   Glance    |
          |   Nova API,Compute    |
          +-----------------------+

[1]
Install KVM HyperVisor on Compute Host, refer to here.
It's unnecessarry to set Bridge networking on the section [2] of the link.
[2] Install Nova Compute.
# install from Ocata, EPEL

[root@dlp ~(keystone)]#
yum --enablerepo=centos-openstack-ocata,epel -y install openstack-nova-compute
[3] In addition to basic settings of Nova, add following settings.
[root@dlp ~(keystone)]#
vi /etc/nova/nova.conf
# add follows

# enable VNC
[vnc]
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 10.0.0.30
novncproxy_base_url = http://10.0.0.30:6080/vnc_auto.html 
[4] If SELinux is enabled, change policy like follows.
[root@dlp ~(keystone)]#
vi nova-compute_pol.te
# create new

module nova-compute_pol 1.0;

require {
        type nova_var_lib_t;
        type virtlogd_t;
        class capability dac_override;
        class file { append getattr open };
        class dir search;
}

#============= 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;

[root@dlp ~(keystone)]#
checkmodule -m -M -o nova-compute_pol.mod nova-compute_pol.te

checkmodule: loading policy configuration from nova_pol.te
checkmodule: policy configuration loaded
checkmodule: writing binary representation (version 17) to nova_pol.mod
[root@dlp ~(keystone)]#
semodule_package --outfile nova-compute_pol.pp --module nova-compute_pol.mod

[root@dlp ~(keystone)]#
semodule -i nova-compute_pol.pp

[5] Start Nova Compute.
[root@dlp ~(keystone)]#
systemctl start openstack-nova-compute

[root@dlp ~(keystone)]#
systemctl enable openstack-nova-compute
# discover Compute Node

[root@dlp ~(keystone)]#
su -s /bin/bash nova -c "nova-manage cell_v2 discover_hosts"
# show status

[root@dlp ~(keystone)]#
openstack compute service list

+----+------------------+---------------+----------+---------+-------+----------------------------+
| ID | Binary           | Host          | Zone     | Status  | State | Updated At                 |
+----+------------------+---------------+----------+---------+-------+----------------------------+
|  5 | nova-cert        | dlp.srv.world | internal | enabled | up    | 2017-02-28T04:48:27.000000 |
|  6 | nova-consoleauth | dlp.srv.world | internal | enabled | up    | 2017-02-28T04:48:27.000000 |
|  7 | nova-conductor   | dlp.srv.world | internal | enabled | up    | 2017-02-28T04:48:27.000000 |
|  8 | nova-scheduler   | dlp.srv.world | internal | enabled | up    | 2017-02-28T04:48:17.000000 |
|  9 | nova-compute     | dlp.srv.world | nova     | enabled | up    | 2017-02-28T04:48:23.000000 |
+----+------------------+---------------+----------+---------+-------+----------------------------+
 
Tweet