Install Single Node Openstack using Devstack on Ubuntu 22.04

OpenStack is a free and open-source software platform that provides a cloud computing infrastructure. It provides a set of services for building and managing cloud environments, including compute, storage, networking, and identity management.

Devstack is a tool that enables the installation of OpenStack on a single node. In this tutorial, we will guide you through the process of installing a single node OpenStack using Devstack on Ubuntu 22.04.

Prerequisites

Before proceeding with the installation, you should ensure that your system meets the following requirements:

  • Freshly Installed Ubuntu 22.04
  • At least 8GB of RAM
  • At least Dual Processor (2vCPUs or more)
  • Sudo User with admin rights
  • At least 50GB of free disk space is available.
  • Fast and stable internet Connection

Lab Details

  • OS : Ubuntu 22.04 LTS
  • IP Address : 192.168.1.2
  • Interface: enp0s3

Without any further delay, let’s deep dive into installation steps of Openstack

1) Install Git and Add Stack User

Open the terminal and run following apt commands to install git,

$ sudo apt update && sudo apt install -y git

Create a user named stack using following useradd command and assign sudo rights to it. Run following set commands

$ sudo useradd -s /bin/bash -d /opt/stack -m stack
$ sudo chmod +x /opt/stack
$ sudo usermod -aG sudo stack
$ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
$ sudo -u stack -i

2 ) Download devstack and setup local.conf file

Clone the Devstack repository by running the following command:

$ git clone https://opendev.org/openstack/devstack

Clone-Devstack-Repository-Ubuntu-22-04

Navigate to the Devstack directory by running the following command:

$ cd devstack

Create a local.conf file by copying the sample configuration file:

$ cp samples/local.conf local.conf

Edit the local.conf file and add the following configuration:

$ vi local.conf
[[local|localrc]]
HOST_IP=192.168.1.2
SERVICE_HOST=192.168.1.2
MYSQL_HOST=192.168.1.2
RABBIT_HOST=192.168.1.2
GLANCE_HOSTPORT=192.168.1.2:9292
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

## Neutron options
Q_USE_SECGROUP=True
FLOATING_RANGE="192.168.1.0/24"
IPV4_ADDRS_SAFE_TO_USE="10.0.0.0/22"
Q_FLOATING_ALLOCATION_POOL=start=192.168.1.185,end=192.168.1.195
PUBLIC_NETWORK_GATEWAY="192.168.1.1"
PUBLIC_INTERFACE=enp0s3

# Open vSwitch provider networking configuration
Q_USE_PROVIDERNET_FOR_PUBLIC=True
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
OVS_BRIDGE_MAPPINGS=public:br-ex

Save the changes and close the file.

local-conf-devstack-Ubuntu-Linux

3) Start Openstack Installation

Once the devstack is installed and local.conf is setup properly as per our environment, then run the following command to start the installation process:

$ ./stack.sh

The installation process may take 10 to 20 minute to complete, depending on your internet speed and system resources.

Above script will install keystone, glance, nova, placement, cinder, neutron, and horizon. Floating IPs will be available, guests have access to the external world and guest VMs can be accessed from LAN by allocating Floating ips to them.

Once the installation is complete, you will see a message indicating that Devstack has been successfully installed.

Devstack-Openstack-Installation-Message

Note: I have to manually add DNS server IP (4.2.2.2) in /etc/resolv.conf because I was getting dns resolution error.

4) Access Openstack

There are two ways to interact with openstack either via command line or Dashboard (GUI).

Command line access to openstack,

$ source openrc
$ openstack network list
$ openstack image list
$ openstack catalog list

OpenStack-Basic-Commands-CLI

To access horizon dashboard, type the following URL in the web browser,

http://192.168.1.2/dashboard  

Change the IP address that suit to your environment.

  • User Name : admin / demo
  • Password : secret

Login -OpenStack-Dashboard-Ubuntu-Linux

Click on “Sign In” after entering the credentials,

Overview-OpenStack-Dashboard-Ubuntu-Linux

That’s all from this tutorial, I hope you have found it informative.

Conclusion

In this tutorial, we have shown you how to install a single node OpenStack using Devstack on Ubuntu 22.04. By following the steps outlined in this tutorial, you can quickly set up your cloud infrastructure and start managing it with ease.

Read Also: How to Set Static IP Address on Ubuntu 22.04

2 thoughts on “Install Single Node Openstack using Devstack on Ubuntu 22.04”

  1. Good Day!
    Mr. Pradeep Antil

    I am trying to install devstack on ubuntu following your blog post. But so many time i face error when installation, this error was network related it’s may be ovs bridging issues.

    Note:
    i am correctly check and set physical interface name given as public interface in local.conf file.

    1st i install on VirtualBox when has face the error then i again install on my physical machine but the both platform are show same error.

    At a time i try to solve the error on internet but i can’t solve this error.

    If your have know solve this error and give me any suggestion.

    Please help me.

    Reply
  2. if i have single processor is it possible to install the above said open stack components. Kindly help me about it. Thanks and regards, Raju (rajuindia@hotmail.com)

    Reply

Leave a Comment

sixteen − 12 =