Openstack installation : Installing OS, configure pre-requisites and install openstack client

Content from “openstack.org”, listed here with minor changes – just noting down what I did – online notes.

In the course of learning installation of Openstack found that Canonical team maintain separate repositories for ‘Rocky’ release of Openstack. so decided to install Openstack on Ubuntu 18.04 server. One other benefit : no need to worry about installing dirvers.

Did the following post installation of OS, in controller and compute node.

Never end up with issues association failure at application level, due to insufficient file descriptors. edit /etc/security/limits.conf and add the following at end.

*  hard nofile 262140
* soft nofile 262140

Add ‘Rocky’ cloud-archive repository, update repository information and upgrade all that can be

apt install --assume-yes software-properties-common
add-apt-repository cloud-archive:rocky
apt update && apt dist-upgrade

Enable root login – This is something I do in all my systems @ home lab – Not mandatory. edit /etc/ssh/sshd_config, uncomment the following configuration and configure as follows

PermitRootLogin yes

Need to ensure that controller and compute nodes are reachable using hostnames. Edit /etc/hosts and add necessary entries

10.0.0.15       controller
10.0.0.41 iserver
10.0.0.50 aserver

Configure local time

unlink /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime

Enable bridge net filtering – will be required prior to having neutron (networking services) configured. Edit /etc/modules-load.d/bridge.conf and add the following line so that the module gets loaded on node startup.

br_netfilter

Create /etc/sysctl.d/bridge.conf and add the following lines

net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge-nf-call-arptables = 1

Disable app-armor and remove

systemctl stop apparmor
systemctl disable apparmor
apt purge --assume-yes apparmor

snapd not required. Also we will manage network configurations manually, do not need any network manager – uninstall netplan and snapd and install ifupdown.

apt purge --assume-yes snapd ubuntu-core-launcher squashfs-tools
apt-get --assume-yes purge nplan netplan.io
rm -rf /etc/netplan
rm -rf /usr/share/netplan/netplan/cli/commands/
apt install --assume-yes ifupdown

Configure one interface for overlay network (typically management) and one for provider network via which the guest VMs will get access to external networks. (Should be possible to use more than one interface – yet to learn how-to). Edit /etc/network/interfaces and add the following. Note : interface names could vary in different hosts.

source /etc/network/interfaces.d/*

#The loopback network interface
auto lo
iface lo inet loopback

#Interface for overlay/management
allow-hotplug eno1
auto eno1
iface eno1 inet static
address 10.0.0.31
netmask 255.255.255.0
broadcast 10.0.0.255
gateway 10.0.0.1
dns-nameservers 8.8.8.8 8.8.4.4

#Provider interface
auto eno2
iface eno2 inet manual
up ip link set dev $IFACE up
down ip link set dev $IFACE down

Had some challenges while installing neutron services, had to disable IPv6 for the provider network interface after which it got solved. (Yet to validate if disabling is required), add the following entry in /etc/sysctl.conf.

#eno2 is the interface name
net.ipv6.conf.eno2.disable_ipv6 = 1

Unmask and enable networking service, disable and mask systemd-networkd

systemctl unmask networking

systemctl enable networking

systemctl stop systemd-networkd.socket systemd-networkd networkd-dispatcher systemd-networkd-wait-online

systemctl disable systemd-networkd.socket systemd-networkd networkd-dispatcher systemd-networkd-wait-online

systemctl mask systemd-networkd.socket systemd-networkd networkd-dispatcher systemd-networkd-wait-online

Edit /etc/systemd/resolved.conf, uncomment DNS= entry and add the DNS server IP

DNS=8.8.4.4

On every ssh login to node, a small delay was observed, figured out that disabling motd-news would help – this could be Ubuntu specific. Edit /etc/default/motd-news and set ENABLED=0

Reboot the system so the networking changes take effect.

Install NTP services on all nodes

apt install --assume-yes chrony

Let one node (controller) synchronize with servers on internet and other nodes synchronize with controller. Edit /etc/chrony/chrony.conf and comment out all pool entries. On controller node update the configuration as below

#pool ntp.ubuntu.com        iburst maxsources 4
#pool 0.ubuntu.pool.ntp.org iburst maxsources 1
#pool 1.ubuntu.pool.ntp.org iburst maxsources 1
#pool 2.ubuntu.pool.ntp.org iburst maxsources 2

server 0.asia.pool.ntp.org iburst
allow 10.0.0.0/24

On compute nodes update as below

#pool ntp.ubuntu.com        iburst maxsources 4
#pool 0.ubuntu.pool.ntp.org iburst maxsources 1
#pool 1.ubuntu.pool.ntp.org iburst maxsources 1
#pool 2.ubuntu.pool.ntp.org iburst maxsources 2

server controller iburst

Restart the NTP service after configuration changes

service chrony restart

Verify the services on controller by checking the output of ‘chronyc sources’ and ‘chronyc clients’ and on compute nodes the output of ‘chronyc sources’.

Install openstack client

apt install --assume-yes python-openstackclient


About sandeep

Passionate about sharing information on "how to".
This entry was posted in Installation / How To, Notes and tagged , , , , , , . Bookmark the permalink.