Compute node installation in OpenStack - OverFlowJAMK/General GitHub Wiki
Be sure to use Ubuntu server 14.04 while attempting to install compute node with this configuration. Not tested on other Ubuntu - versions.
Configure your interfaces.
IP Address list
Controller: 10.0.0.1
Compute1: 10.0.0.2
Compute2: 10.0.0.3
Do not install any components under root - user.
NOTE: our OpenStack configuration gives us the full control of iptables instead of OpenStack controlling them.
Update sources. Update programs. Update distro.
#sudo apt-get update
#sudo apt-get upgrade
<-- if needed
#sudo apt-get dist-upgrade
<-- if needed
Install chrony and configure it.
#sudo apt-get install chrony
Configure file:
/etc/chrony/chrony.conf
...
#fails they will be discarded. Thus under some circumstances it is
#better to use IP numbers than host names.
#server 0.debian.pool.ntp.org offline minpoll 8
<- comment this line
#server 1.debian.pool.ntp.org offline minpoll 8
<- comment this line
#server 2.debian.pool.ntp.org offline minpoll 8
<- comment this line
#server 3.debian.pool.ntp.org offline minpoll 8
<- comment this line
server 10.0.0.1 iburst
<-- Controller node IP-address
sudo service chrony restart
Check that chrony works:
#chronyc sources
Add openstack repository to sources
#sudo apt-get install software-properties-common
#sudo add-apt-repository cloud-archive:mitaka
Update sources and restart computer
#sudo apt-get update
#sudo apt-get dist-upgrade
#sudo reboot
Install nova-compute
#sudo apt-get install nova-compute
- Check
virtlogd
andvirtlockd
status (services). Should fail. - Reboot your Ubuntu.
#sudo reboot
- Check again. Should be running.
Configure nova.conf
/etc/nova/nova.conf
[DEFAULT]
#debug=true
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
#logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
force_dhcp_release=True
libvirt_use_virtio_for_bridges=True
verbose=True
ec2_private_dns_show_ip=True
api_paste_config=/etc/nova/api-paste.ini
enabled_apis=ec2,osapi_compute,metadata
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.0.0.3 #change your ip address here
use_neutron = True
security_group_api = nova
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[oslo_messaging_rabbit]
rabbit_host = 10.0.0.1 #controller ip
rabbit_userid = openstack
rabbit_password = adminuser
[keystone_authtoken]
auth_uri = http://10.0.0.1:5000
auth_url = http://10.0.0.1:35357
memcached_servers = 10.0.0.1:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = adminuser
[vnc]
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://10.0.0.1:6080/vnc_auto.html
[glance]
api_servers = http://10.0.0.1:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[neutron]
url = http://10.0.0.1:9696
auth_url = http://10.0.0.1:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = adminuser
Check that virtualization acceleration is ON
#sudo egrep -c '(vmx|svm)' /proc/cpuinfo
Should return values greater than 0 if it is ON.
Restart nova-compute
#sudo service nova-compute restart
Install Openvswitch agent and ml2 plugin to Compute Node
#sudo apt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agent
Pull Debs from repository and install OVS - deb packages
git clone -b debs https://github.com/OverFlowJAMK/General.git
<- Clone our ovs debs 2.5.1 and also later needed files.
cd to debs folder.
Run following commands:
#sudo dpkg -i *.deb
#sudo apt-get install -f
Configure ml2_conf.ini, openvswitch_agent.ini, neutron.conf
First let's configure
/etc/neutron/neutron.conf
[DEFAULT]
auth_strategy = keystone
core_plugin = ml2
rpc_backend = rabbit
[agent]
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
[keystone_authtoken]
auth_uri = http://10.0.0.1:5000
memcached_servers = 10.0.0.1:11211
auth_type = password
auth_url = http://10.0.0.1:35357
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = adminuser
[oslo_messaging_rabbit]
rabbit_host = 10.0.0.1
rabbit_userid = openstack
rabbit_password = adminuser
Next let's configure
/etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
type_drivers = local,flat,vlan
tenant_network_types =
mechanism_drivers = openvswitch
extension_drivers = port_security
[ml2_type_flat]
flat_networks = *
[ml2_type_vlan]
network_vlan_ranges = provider
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver #Configure this one as you need. if you need.
enable_ipset = true
Next file is
/etc/neutron/plugins/ml2/openvswitch_agent.ini
[ovs]
bridge_mappings = provider:br-provider #<<<----- VERY IMPORTANT if you want to connect computes
of_interface = dummy
of_listen_address = 10.0.0.8 #<-- your controller's IP-address
of_listen_port = 6633 #<-- controller's port number
[securitygroup]
firewall_driver = neutron.agent.firewall.NoopFirewallDriver
enable_security_group = False
Configure dummy
First file will be /usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/main.py
_main_modules = {
'ovs-ofctl': 'neutron.plugins.ml2.drivers.openvswitch.agent.openflow.'
'ovs_ofctl.main',
'native': 'neutron.plugins.ml2.drivers.openvswitch.agent.openflow.'
'native.main',
'dummy': 'neutron.plugins.ml2.drivers.openvswitch.agent.openflow.' #<<-- this line
'dummy.main', #<<-- and this
}
Second file will be /usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/common/config.py
cfg.StrOpt('of_interface', default='ovs-ofctl',
choices=['ovs-ofctl', 'native', 'dummy'], #<<-- this line
help=_("OpenFlow interface to use.")),
As for the last thing you will need to cp the pulled dummy/ here:
/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/
Which then should look like this:
/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/dummy/
As the last step you will need to reboot your device
#sudo reboot