Skip to main content

OpenStack Install for Ubuntu

Published on:
.
10 min read
.
For German Version

OpenStack is a free software platform that lets businesses and groups create their own clouds. It provides Infrastructure as a Service (IaaS) by putting the Compute, Network, and Storage layers all in one place. In brief, it lets you make your own cloud instead of "using someone else's cloud."

For OpenStack, Ubuntu is the best Linux distribution since it has long-term support (LTS) releases, a strong package ecosystem, and a large community. It helps you move fast through the learning and proof-of-concept phases, and it gives you a robust and predictable base in the production environment.

This post shows you how to install OpenStack on Ubuntu in steps. This looks at multiple ways to deploy, starting with "quick start" alternatives like DevStack and MicroStack and moving on to larger-scale solutions like Kolla-Ansible (Docker) and OpenStack-Helm (Kubernetes) on Ubuntu. With the help of this guide, you'll be able to start your first virtual machine (VM), set up your network (Neutron), and do daily maintenance and updates safely.

This guide will not only address the question "How do I install OpenStack?" but also the questions of why and when to utilize which approach, not simply at the command level.

Get Started with Zenarmor Today For Free

How to Install OpenStack Step-by-Step on Ubuntu?

Setting up OpenStack on Ubuntu may seem complex at first, but with the right approach, you can get it running step by step. In this guide, we’ll walk you through the essential components—from updating your system to installing services like Keystone, Glance, Nova, Neutron, and Horizon—so you can build a functional OpenStack environment with ease.

  1. Update the System: Before you install the packages, they need to be up to date.

    Before updating, ensure that you have sudo privileges, as system-level changes are required.

    # Update repositories and upgrade existing packages
    sudo apt update && sudo apt upgrade -y

    This operation installs updates and security patches for packages.

    Restart the system if the kernel is updated:

    This operation installs updates and security patches for packages. Restart the system if the kernel is updated:

    # Reboot system after kernel updates
    sudo reboot
  2. Install the OpenStack Client: The OpenStack CLI client is required to manage services.

    Run the following command to install the OpenStack command-line client:

    # Install the OpenStack command-line client
    sudo apt install python3-openstackclient -y

    After installation, confirm that the client is properly installed by checking the version:

    # Check installed OpenStack client version
    openstack --version
  3. Install Keystone (Identity Service): Keystone is an identity authentication service.

    Install Keystone along with Apache and the WSGI module to enable service hosting:

    # Install Keystone with Apache and WSGI
    sudo apt install keystone apache2 libapache2-mod-wsgi-py3 -y

    After installation, synchronize the Keystone database to initialize its schema:

    # Synchronize Keystone database
    sudo keystone-manage db_sync
    note

    Do not run db_sync without properly defining the connection parameter in the "keystone.conf" file to match your database.

  4. Install Glance (Image Service): Glance manages virtual machine images.

    Install the Glance package with the following command:

    # Install Glance service
    sudo apt install glance -y

    Synchronize the Glance database to initialize it:

    # Synchronize Glance database
    sudo glance-manage db_sync

    Restart the Glance API service to apply changes:

    # Restart Glance API service
    sudo systemctl restart glance-api
  5. Install Nova (Compute Service): Nova enables the creation and management of virtual machines.
    Install the Nova compute service package:

    # Install Nova compute service
    sudo apt install nova-compute -y

    Database operations:

    # Synchronize Nova databases
    sudo nova-manage api_db sync
    sudo nova-manage cell_v2 map_cell0
    sudo nova-manage cell_v2 create_cell --name=cell1
    sudo nova-manage db sync

    Restart the Nova service:

    # Restart Nova compute service
    sudo systemctl restart nova-compute
    warning

    KVM will not work if hardware virtualization (Intel VT-x/AMD-V) is disabled in the BIOS.

  6. Install Neutron (Networking Service): Neutron provides virtual network configuration.

    Install Neutron server and ML2 plugin with the following command:

    # Install Neutron server and ML2 plugin
    sudo apt install neutron-server neutron-plugin-ml2 -y

    Update the Neutron database schema:

    # Upgrade Neutron database
    sudo neutron-db-manage upgrade head

    Restart the Neutron service:

    # Restart Neutron server
    sudo systemctl restart neutron-server
    tip

    For the first few tries, use the provider network. You can then add tenant networks based on VXLAN or VLAN.

  7. Install Horizon (Dashboard): Horizon is the web-based interface for OpenStack.

    Install Horizon with the following command:

    # Install Horizon dashboard
    sudo apt install openstack-dashboard -y

    Restart Apache to enable Horizon:

    # Restart Apache2 service
    sudo systemctl restart apache2

    Once Apache is restarted, access the Horizon dashboard via your browser:

    http://<controller-ip>/dashboard

    Default login: the username is admin, and the password is the one you set during Keystone configuration.

What is OpenStack for Ubuntu?

OpenStack is a free cloud operating system that lets companies and developers make their own cloud infrastructure. It basically keeps track of three important things:

  • Compute: Making and running virtual machines or containers
  • Network: Setting up and running virtual networks, security groups, and routers
  • Storage: block storage, object storage, and image management

This lets OpenStack provide infrastructure as a service - IaaS and lets customers build their own platforms that are similar to AWS, Azure, or Google Cloud.

Why Choose OpenStack?

OpenStack offers several key advantages that make it a powerful and flexible choice for building cloud environments:

  • You can make a private or public cloud: You can make a private cloud in your own data center or utilize it to offer public cloud services.

  • You don't have to pay for a license to use it: Because it's open-source, there are no master's fees, and charges are based on the hardware and upkeep.

  • Its modular structure makes it flexible and easy to grow: Depending on what you require, you can use only Compute, only Storage, or all of them together. It can be used in small labs or huge enterprise clouds.

Why use Ubuntu?

Because of its long-term support (LTS) releases, Ubuntu is one of the most stable, secure, and well-supported alternatives.

  • Canonical makes it easy to install things using tools like MicroStack. You may quickly test OpenStack with just one command this way.

  • It has a lot of users and developers, and there are many guides, forums, and documentation available.

  • Works well with DevOps and cloud ecosystems (can work with tools like Docker, Kubernetes, and Ansible).

If you're new to OpenStack, you may rapidly build up a test environment on Ubuntu using DevStack or MicroStack. These are the best ways to learn new ideas.

For the production environment, Kolla-Ansible (Docker-based deployment) or OpenStack-Helm (Kubernetes-based deployment) are better choices for setting up at the enterprise level.

Is OpenStack for Ubuntu Free to Use?

Yes. The Apache 2.0 license lets anyone use OpenStack for free. With this license, both individuals and organizations can download and use OpenStack for free, look at the source code, and change it to fit their needs.

Costs;

  • There is no cost for the software: You don't have to pay any fees to use OpenStack.

  • The user is responsible for the cost of hardware, maintenance, and operation: You need servers, storage systems, network infrastructure, and people who know how to run OpenStack to manage this environment. This is the part where you should put your money.

  • What makes it different from closed-source solutions: OpenStack is fully free in this area, while commercial solutions like VMware and Hyper-V charge per license.

Help from the company;

There is a lot of community assistance, but corporations that want a more professional guarantee can buy support packages from companies like Canonical, Red Hat, and Mirantis. These services are:

  • 24/7 support

  • Long-term security patches

  • Enterprise-level SLAs (Service Level Agreements)

  • Training and consulting

If you are using OpenStack in a lab environment or for learning purposes, you will not incur any additional costs. If you work for a company, it's best to get expert support services to lower the hazards of running your business.

OpenStack is free, but that doesn't mean that managing and running it is "easy." Installing things on a large scale requires a lot of knowledge, skill, and frequent upkeep.

What are the Hardware Requirements for OpenStack Installation on Ubuntu?

The hardware required for OpenStack installation varies depending on the size of the environment (test vs. production).

EnvironmentMinimum RequirementsRecommended Requirements
CPU2 vCPUs4+ vCPUs
RAM8 GB16+ GB
Disk50 GB200+ GB (SSD preferred)
NICs12+ (management & data separated)

For small laboratory setups for trial purposes, low resources are sufficient. However, high RAM, SSD disks, and multiple network cards are essential in a production environment.

If disk space is insufficient, creating VMs and uploading images will fail.

Which Ubuntu Version is Best for OpenStack?

Ubuntu LTS (Long Term Support) versions are the best for OpenStack. This is because LTS editions get security updates and bug fixes for five years. This makes sure that important infrastructure software like OpenStack functions on a solid base.

Versions that are suggested;

  • Ubuntu 22.04 LTS (Jammy Jellyfish) → This is the most popular and highly recommended version right now. It works well with both OpenStack and products from other companies.

  • Ubuntu 24.04 LTS (Noble Numbat): This is the newest version, and it is quickly getting support from the community. It has becoming more popular, especially for tasks that will take a long time.

Alternatives: OpenStack works with other Linux distributions, such as CentOS and Debian. However, it has:

  • The most complete documentation

  • The most active community support

  • Official tools from Canonical (like MicroStack)

It is still the safest choice because it runs on Ubuntu.

Ubuntu 22.04 LTS is the best option if you're installing it for the first time. But for long-term projects, Ubuntu 24.04 LTS might be better because it will be relevant for a longer time.

Use LTS versions all the time. Normal versions aren't good for systems that need to last a long time, like OpenStack, because they only get support for 9 months.

How to Prepare Your Ubuntu System for OpenStack Installation?

Before starting the OpenStack installation, it is necessary to prepare the system.

  1. Update Packages: Before proceeding with the installation, make sure the system is fully updated to avoid dependency issues.

    #Update repositories and upgrade existing packages
    sudo apt update && sudo apt upgrade -y

    Keeping the system up to date prevents compatibility problems during the OpenStack installation.

  2. Set Hostname: Set the hostname of the node to identify it within the OpenStack environment.

    # Set hostname to controller
    sudo hostnamectl set-hostname controller

    Then add the IP and hostname to the /etc/hosts file:

    # Edit hosts file
    sudo nano /etc/hosts

    Example entry:

    192.168.0.10 controller
  3. Configure Networking: Configure networking using Netplan to assign a static IP address and define DNS servers.

    # Edit Netplan configuration file
    sudo nano /etc/netplan/01-netcfg.yaml

    Example configuration:

    network:
    version: 2
    renderer: networkd
    ethernets:
    ens33:
    dhcp4: no
    addresses:
    - 192.168.0.10/24
    gateway4: 192.168.0.1
    nameservers:
    addresses: [8.8.8.8, 8.8.4.4]

    Apply the changes to activate the configuration:

    # Apply Netplan configuration
    sudo netplan apply
  4. Install Dependencies: Install the required dependencies to ensure that additional repositories and Python modules can be managed.

    # Install required dependencies
    sudo apt install software-properties-common python3-pip -y
  5. Install OpenStack Client: Install the OpenStack command-line client, which is required to manage OpenStack services.

    # Install OpenStack client
    sudo apt install python3-openstackclient -y

    Verify the installation by checking the version:

    # Check OpenStack client version
    openstack --version

    So we've covered the hardware requirements, which Ubuntu version is best suited, and how to prepare the system.

How to Install OpenStack on Ubuntu Using DevStack?

DevStack is a quick setup tool used for testing and learning OpenStack. Installs all components on a single node. However, it is not recommended for production environments.

  1. Install Git: Install Git to be able to clone the DevStack repository.

    # Install Git
    sudo apt install git -y
  2. Clone DevStack Repository: Clone the DevStack source repository from OpenDev and navigate into the directory.

    # Clone DevStack repository
    git clone https://opendev.org/openstack/devstack
    cd devstack
  3. Create local.conf: Create a configuration file called local.conf to define passwords and settings required by DevStack.

    # Create local.conf configuration file
    nano local.conf

    Example content:

    [[local|localrc]]
    ADMIN_PASSWORD=admin123
    DATABASE_PASSWORD=admin123
    RABBIT_PASSWORD=admin123
    SERVICE_PASSWORD=admin123
  4. Run DevStack Installer: Execute the stack.sh script to begin the installation. This process may take several minutes.

    # Start DevStack installation
    ./stack.sh

    After installation is complete, you can access Horizon in your browser:

    http://<your-ip>/dashboard

How to Configure OpenStack CLI on Ubuntu?

The OpenStack CLI is the most commonly used tool for managing services.

  1. Install OpenStack Client: Install the OpenStack client if it is not already present on the system.

    # Install OpenStack client
    sudo apt install python3-openstackclient -y
  2. Source Admin Credentials: Load the admin credentials to set the required environment variables for authentication.

    # Load admin credentials
    source admin-openrc

    This process loads the environment variables necessary for running OpenStack commands.

  3. Example CLI Commands: Use the following examples to validate basic functionality via the OpenStack CLI.

    Listing images: query Glance to see which bootable images are available for launching instances.

    # List available images
    openstack image list

    If the list is empty, upload an image to Glance before proceeding.

    Network creation: Create a tenant L2 network that instances can attach to.

    # Create a demo network
    openstack network create demo-net

    This only creates the network segment; in a typical setup you will also define a subnet and (optionally) a router.

    VM creation: Launch a new instance by telecting a flavor, image, and target network.

    # Launch a VM on demo network
    openstack server create --flavor m1.small \
    --image Ubuntu-22.04 \
    --network demo-net demo-vm
    warning

    If you don't load source admin-openrc, the CLI commands will give errors.

How to Deploy OpenStack on Ubuntu with Helm or Docker?

Running OpenStack on containers is a modern and scalable method. Two popular options: Kolla-Ansible (Docker) and OpenStack-Helm (Kubernetes).

  1. Kolla-Ansible (Docker-based Deployment): Kolla distributes OpenStack services as Docker containers, making deployments modular and easier to maintain.

    Install Dependencies: Install the necessary development libraries and Python modules required for Kolla-Ansible.

    # Install dependencies
    sudo apt install python3-dev libffi-dev gcc libssl-dev python3-pip -y
    pip3 install kolla-ansible

    Copy Configurations: Copy the example configuration files to the /etc/kolla directory to prepare for customization.

    # Copy example configs to /etc/kolla
    cp -r /usr/local/share/kolla-ansible/etc_examples/kolla /etc/kolla

    Define Inventory: Edit the inventory file to define the controller and compute nodes that will participate in the deployment.

    # Edit inventory file
    nano /etc/kolla/multinode

    Here, you must specify the IP addresses and roles of your nodes.

    Deploy OpenStack: Bootstrap the servers, run pre-deployment checks, and then deploy OpenStack using Kolla-Ansible.

    # Run bootstrap and deploy commands
    kolla-ansible -i /etc/kolla/multinode bootstrap-servers
    kolla-ansible -i /etc/kolla/multinode prechecks
    kolla-ansible -i /etc/kolla/multinode deploy
  2. OpenStack-Helm (Kubernetes-based Deployment): OpenStack-Helm deploys OpenStack services using Helm charts on top of Kubernetes, providing container orchestration and scalability.

    Install Helm and Kubectl: Install Helm and kubectl, which are required to manage Helm charts and interact with the Kubernetes cluster.

    # Install Helm and kubectl
    sudo snap install helm --classic
    sudo snap install kubectl --classic

    Clone Repository: Clone the OpenStack-Helm repository and switch to its directory.

    # Clone OpenStack-Helm repo
    git clone https://opendev.org/openstack/openstack-helm
    cd openstack-helm

    Deploy Charts: Use Helm to deploy OpenStack services such as Keystone and Glance within Kubernetes pods.

    # Install Keystone and Glance with Helm
    helm install keystone ./keystone
    helm install glance ./glance

    With Helm, services in distribution run within Kubernetes pods, which simplifies updates and scaling.

Can you Run OpenStack on AWS or Other Clouds from Ubuntu?

Yes. Yes, it is possible to run OpenStack on AWS or other cloud infrastructures by using Ubuntu-based virtual machines (VMs). This approach can be valuable in scenarios such as creating hybrid cloud architectures, where OpenStack bridges your private cloud with AWS, Azure, or Google Cloud—allowing you to keep critical workloads in your own data center while meeting additional resource needs from the public cloud. If the platform supports nested virtualization, like AWS EC2, OpenStack can also be installed on an Ubuntu-based VM, making it possible to test all components directly in the cloud.

In practice, this method is best suited for testing, learning environments, and transition phases such as preparing to move from on-premises infrastructure to the public cloud. It can also serve as a bridge for hybrid architectures. However, it is not recommended for large-scale production due to performance, cost, and management complexity. Instead, its strength lies in enabling quick proof-of-concept setups and development environments, thanks to nested virtualization.

If you want to try OpenStack on AWS, you can start with DevStack or MicroStack by choosing a small EC2 instance. In hybrid scenarios, the most common approach is to run OpenStack in an on-premises data center and integrate with providers like AWS or Azure as needed.

If you choose this approach for the production environment, you may encounter network latency, increased costs, and management challenges. Therefore, it should only be preferred during testing, learning, or transition processes.

How to Verify OpenStack Installation and Create Your First VM on Ubuntu?

After installation, it is necessary to verify that the services are running and create the first virtual machine.

  1. Verify Services: Rund the following command to check if the core OpenStack services are active:

    # List running OpenStack services
    openstack service list

    This will display services such as Keystone, Glance, Nova, and Neutron, confirming they are registered and operational.

  2. Access Horizon: Open a browser and access the Horizon dashboard using the following URL:

    http://<controller-ip>/dashboard

    For login, the username is admin, and the password is the value determined during the Keystone installation.

  3. Upload an Image: Upload a virtual machine image into Glance so that it can be used to launch instances:

    # Upload Ubuntu image to Glance
    openstack image create "Ubuntu-22.04" \
    --file ubuntu-22.04.qcow2 \
    --disk-format qcow2 --container-format bare

    This process loads the image to be used on virtual machines.

  4. Create a Network: Create a tenant network that instances will connect to:

    # Create demo network
    openstack network create demo-net
  5. Launch Your First VM: Start a new virtual machine using the previously uploaded image and created network:

    # Launch a new VM instance
    openstack server create --flavor m1.small \
    --image Ubuntu-22.04 \
    --network demo-net demo-vm

    Verify that the instance has been created successfully:

    # List created VM instances
    openstack server list

How to Download and Use the OpenStack Installer on Ubuntu?

Canonical provides MicroStack, a simple tool to quickly deploy OpenStack for testing or small-scale usage.

  1. Install MicroStack: Run the following command to install MicroStack using Snap:

    # Install MicroStack via Snap
    sudo snap install microstack --classic
  2. Initialize MicroStack: Initialize the deployment in automatic mode:

    # Run initialization in auto mode
    sudo microstack init --auto
  3. Access Horizon: After installation, you can access the Horizon panel at https://<your-ip>:443.

    MicroStack is ideal for small-scale or test environments. Large-scale production environments should use Kolla-Ansible or OpenStack-Helm.

How to Maintain and Update Your OpenStack Deployment on Ubuntu?

After OpenStack is installed, regular maintenance and updates are required. This is critical for the security and availability of the system.

  1. Update Packages: Run the following command to keep all system packages up to date:

    # Update repositories and upgrade existing packages
    sudo apt update && sudo apt upgrade -y

    This process ensures that security patches are applied.

  2. Reload or Restart Services: Reload services to apply minor configuration changes without full restarts:

    # Reload Nova compute service
    sudo systemctl reload nova-compute

    In case of major changes or errors, completely restart the services:

    # Restart Neutron server
    sudo systemctl restart neutron-server
  3. Monitor Logs: Use the following command to monitor Nova logs in real time and troubleshoot issues:

    # Monitor Nova logs in real-time
    tail -f /var/log/nova/nova-compute.log

    Logs are the most important tool for quickly detecting problems.

  4. Backup Configurations: Regularly back up all OpenStack configuration files:

    # Backup OpenStack configuration files
    sudo tar -czvf backup-$(date +%F).tar.gz /etc/nova /etc/neutron /etc/glance /etc/keystone

    Store backups in external storage or a secure repository.

  5. Scale Out: To increase compute capacity, add a new compute node by installing Nova:

    # Install Nova compute on new node
    sudo apt install nova-compute -y

    Then, add the new node to the controller and synchronize it.

    Before adding the node, ensure that the same network settings and time synchronization (NTP) are configured.

Is OpenStack Free?

Yes. OpenStack is completely free and is distributed under the Apache 2.0 license. This licensing model allows users to freely download and use the software, examine the source code, and adapt it to their needs.

OpenStack itself is free to use, as all of its source code is open, which helps organizations avoid high licensing fees compared to commercial solutions like VMware and creates a significant budget advantage. However, while there are no software costs, users are responsible for the operational expenses of hardware such as servers, storage systems, and networking equipment, along with installation, management, and maintenance. Small and medium-sized businesses can start with community support to build a powerful cloud environment without licensing costs, while larger enterprises often benefit from commercial support packages offered by companies like Canonical, Red Hat, or Mirantis. These packages typically include 24/7 assistance, long-term security patches, Service Level Agreements (SLAs), and consulting services to reduce operational risks. It is important to note, though, that “free” does not mean simple—OpenStack’s complexity demands specialized expertise, which adds to the overall operational cost.

Get Started with Zenarmor Today For Free