CentOS 7
Sponsored Link

OpenStack Newton : Add Compute Nodes2016/10/22

 
Add Compute Nodes to run more instances.
[1]
Install KVM Hypervisor first which needs on Compute Node.
It's unnecessarry to set Bridge networking on the section [2] of the link.
[2] Install Nova-Compute, Nova-Network.
If you do not use legacy nova-network, it's unnecessarry to include "openstack-nova-network" below.
# install from Newton, EPEL

[root@node01 ~]#
yum --enablerepo=centos-openstack-newton,epel -y install openstack-nova-compute openstack-nova-api openstack-nova-network
[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
osapi_compute_listen = 0.0.0.0
osapi_compute_listen_port = 8774
rootwrap_config = /etc/nova/rootwrap.conf
api_paste_config = /etc/nova/api-paste.ini
auth_strategy = keystone
log_dir = /var/log/nova
rpc_backend = rabbit
# 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
# specify Glance server

[glance]
api_servers = http://10.0.0.30:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
# RabbitMQ server connection info

[oslo_messaging_rabbit]
rabbit_host = 10.0.0.30
rabbit_port = 5672
rabbit_userid = openstack
rabbit_password = password
# Keystone server 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
[root@node01 ~]#
chmod 640 /etc/nova/nova.conf

[root@node01 ~]#
chgrp nova /etc/nova/nova.conf

[4] Configure Networking.
The follows is for the case you use legacy nova-network function.
But if you use Neutron Networking function, Refer to here to configure it.
Anyway, legacy nova-network function is officially not recommended.
[root@node01 ~]#
vi /etc/nova/nova.conf
# add follows in [DEFAULT] section

use_neutron = False
libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
linuxnet_interface_driver = nova.network.linux_net.LinuxBridgeInterfaceDriver
firewall_driver = nova.virt.libvirt.firewall.IptablesFirewallDriver
network_manager = nova.network.manager.FlatDHCPManager
network_size = 254
allow_same_net_traffic = False
multi_host = True
send_arp_for_ha = True
share_dhcp_address = True
force_dhcp_release = True
# specify nic for public

public_interface = eth0
# specify any name for bridge

flat_network_bridge = br100
# specify nic for flat DHCP bridge

flat_interface = dummy0
# add a dummy interface which is for the flat DHCP bridge

[root@node01 ~]#
cat > /etc/sysconfig/network-scripts/ifcfg-dummy0 <<EOF
DEVICE=dummy0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
NM_CONTROLLED=no
EOF
[root@node01 ~]#
echo "alias dummy0 dummy" > /etc/modprobe.d/dummy.conf

[root@node01 ~]#
ifup dummy0

[5] If SELinux is enabled, change policy like follows.
[root@node01 ~]#
vi nova_pol.te
# create new

module nova_pol 1.0;

require {
        type nova_t;
        type nova_log_t;
        type sysctl_net_t;
        type netutils_exec_t;
        class file { read getattr create open execute };
        class dir { write search add_name };
        class capability { 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;

[root@node01 ~]#
checkmodule -m -M -o nova_pol.mod nova_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@node01 ~]#
semodule_package --outfile nova_pol.pp --module nova_pol.mod

[root@node01 ~]#
semodule -i nova_pol.pp

[6] If Firewalld is running, allow ports for services.
[root@node01 ~]#
firewall-cmd --add-port={6080/tcp,8774/tcp,8775/tcp} --permanent

success
[root@node01 ~]#
firewall-cmd --reload

success
[7] Start Nova Services.
If you don't use legacy nova-network, exclude the word "network" below.
[root@node01 ~]#
for service in metadata-api compute network; do
systemctl start openstack-nova-$service
systemctl enable openstack-nova-$service
done
[8] Make sure the status of Nova services on Controle Node like here. If all State is "up", they are running normally.
[root@dlp ~(keystone)]#
nova service-list

+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host             | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
| 7  | nova-cert        | dlp.srv.world    | internal | enabled | up    | 2016-10-22T16:53:04.000000 | -               |
| 8  | nova-consoleauth | dlp.srv.world    | internal | enabled | up    | 2016-10-22T16:53:04.000000 | -               |
| 9  | nova-conductor   | dlp.srv.world    | internal | enabled | up    | 2016-10-22T16:53:02.000000 | -               |
| 13 | nova-scheduler   | dlp.srv.world    | internal | enabled | up    | 2016-10-22T16:53:04.000000 | -               |
| 14 | nova-compute     | dlp.srv.world    | nova     | enabled | up    | 2016-10-22T16:53:04.000000 | -               |
| 15 | nova-network     | dlp.srv.world    | internal | enabled | up    | 2016-10-22T16:53:04.000000 | -               |
| 16 | nova-compute     | node01.srv.world | nova     | enabled | up    | 2016-10-22T16:53:04.000000 | -               |
| 17 | nova-network     | node01.srv.world | internal | enabled | up    | 2016-10-22T16:53:06.000000 | -               |
+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
Matched Content