Create Openstack Lab. Part 1 – Nodes Preparation

We’ll deploy an Openstack lab. consists of total 6 nodes (3 controllers + 3 computes)

Specifications for controller and compute nodes:

  • 8 vCPU (host)
  • 16384 MB RAM
  • 32 GB HDD for OS (Ubuntu 20.04)
  • 2 x 8 GB HDD for OSD
  • 3 NICs

Install MaaS – Check here for how-to guide

Commission and deploy Ubuntu 20.04 on all machines

Create user ‘openstack’

sudo adduser openstack

Add user ‘openstack’ to ‘sudo’ group

sudo usermod -aG sudo openstack

Configure user ‘openstack’ to be able to run ‘sudo’ command without being asked for password

echo "openstack ALL=(ALL) NOPASSWD:ALL" | sudo tee \

Configure SSHd to accept connection with password authentication

sudo vi /etc/ssh/sshd_config

Replace following line from

PasswordAuthentication no


PasswordAuthentication yes

Then restart sshd service

sudo systemctl restart sshd

Disable cloud-init:

sudo touch /etc/cloud/cloud-init.disabled

Update and upgrade system

sudo apt update && sudo apt upgrade -y

Disable auto-update

sudo vi /etc/apt/apt.conf.d/20auto-upgrades

Edit following lines from

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";


APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "1";

Reboot system

sudo reboot

Modify /etc/hosts

sudo vi /etc/hosts

Add following lines maas maas.lab1 node-1 node-2 node-3 node-4 node-5 node-6 node-1.lab1 node-2.lab1 node-3.lab1 node-4.lab1 node-5.lab1 node-6.lab1 internal.node-1.lab1 internal.node-2.lab1 internal.node-3.lab1 internal.node-4.lab1 internal.node-5.lab1 internal.node-6.lab1 public.node-1.lab1 public.node-2.lab1 public.node-3.lab1 public.node-4.lab1 public.node-5.lab1 public.node-6.lab1 ceph-public.node-1.lab1 ceph-public.node-2.lab1 ceph-public.node-3.lab1 ceph-public.node-4.lab1 ceph-public.node-5.lab1 ceph-public.node-6.lab1 ceph-cluster.node-1.lab1 ceph-cluster.node-2.lab1 ceph-cluster.node-3.lab1 ceph-cluster.node-4.lab1 ceph-cluster.node-5.lab1 ceph-cluster.node-6.lab1

Do ping test

ping -c 1 maas
ping -c 1 maas.lab1

ping -c 1 node-1
ping -c 1 node-2
ping -c 1 node-3
ping -c 1 node-4
ping -c 1 node-5
ping -c 1 node-6

ping -c 1 node-1.lab1
ping -c 1 node-2.lab1
ping -c 1 node-3.lab1
ping -c 1 node-4.lab1
ping -c 1 node-5.lab1
ping -c 1 node-6.lab1

ping -c 1 internal.node-1.lab1
ping -c 1 internal.node-2.lab1
ping -c 1 internal.node-3.lab1
ping -c 1 internal.node-4.lab1
ping -c 1 internal.node-5.lab1
ping -c 1 internal.node-6.lab1

ping -c 1 public.node-1.lab1
ping -c 1 public.node-2.lab1
ping -c 1 public.node-3.lab1
ping -c 1 public.node-4.lab1
ping -c 1 public.node-5.lab1
ping -c 1 public.node-6.lab1

ping -c 1 ceph-public.node-1.lab1
ping -c 1 ceph-public.node-2.lab1
ping -c 1 ceph-public.node-3.lab1
ping -c 1 ceph-public.node-4.lab1
ping -c 1 ceph-public.node-5.lab1
ping -c 1 ceph-public.node-6.lab1

ping -c 1 ceph-cluster.node-1.lab1
ping -c 1 ceph-cluster.node-2.lab1
ping -c 1 ceph-cluster.node-3.lab1
ping -c 1 ceph-cluster.node-4.lab1
ping -c 1 ceph-cluster.node-5.lab1
ping -c 1 ceph-cluster.node-6.lab1

ping -c 1
ping -c 1
ping -c 1

If all ping test give reply then continue, if not check network configuration and connections

Make host public and private key

ssh-keygen -t rsa -b 4096

Copy host public key to self and all other nodes

ssh-copy-id -i /home/openstack/.ssh/ openstack@
ssh-copy-id -i /home/openstack/.ssh/ openstack@
ssh-copy-id -i /home/openstack/.ssh/ openstack@
ssh-copy-id -i /home/openstack/.ssh/ openstack@
ssh-copy-id -i /home/openstack/.ssh/ openstack@
ssh-copy-id -i /home/openstack/.ssh/ openstack@
ssh-copy-id -i /home/openstack/.ssh/ openstack@

Test ssh access to self and other names in /etc/hosts

ssh openstack@node-1.lab1 hostname
ssh openstack@node-2.lab1 hostname
ssh openstack@node-3.lab1 hostname
ssh openstack@node-4.lab1 hostname
ssh openstack@node-5.lab1 hostname
ssh openstack@node-6.lab1 hostname

ssh openstack@ceph-public.node-1.lab1 hostname
ssh openstack@ceph-public.node-2.lab1 hostname
ssh openstack@ceph-public.node-3.lab1 hostname
ssh openstack@ceph-public.node-4.lab1 hostname
ssh openstack@ceph-public.node-5.lab1 hostname
ssh openstack@ceph-public.node-6.lab1 hostname

Answer ‘yes’ and enter password as required. When every test returns proper hostname then we’re done with node preparation.

Leave a Reply

Your email address will not be published. Required fields are marked *