Introduction
OpenStack is a powerful open-source cloud platform used to build and manage private and public cloud environments. It provides a modular architecture for compute, networking, identity, and image services, making it a popular choice for organizations that need scalable infrastructure. This guide explains how to install OpenStack on Ubuntu Server, covering the core services required for a functional deployment.
Prerequisites
Before you begin the OpenStack installation on Ubuntu, make sure your server environment meets the basic requirements.
- An Ubuntu Server system with administrative or root privileges
- A minimum of 4 GB RAM and at least 40 GB of available disk space
- Reliable internet access for package downloads and updates
Step 1: Update Ubuntu Server
Start by refreshing the package index and upgrading installed packages to ensure the system is fully current.
sudo apt update
sudo apt upgrade -y
Keeping Ubuntu updated helps reduce compatibility issues during the OpenStack setup process.
Step 2: Install the OpenStack Client
The OpenStack command-line client allows you to interact with OpenStack services from the terminal. Install it with the following command:
sudo apt install -y python3-openstackclient
This package is useful for managing your cloud environment after the installation is complete.
Step 3: Install and Secure MariaDB
OpenStack services rely on a database backend to store configuration and operational data. MariaDB is a common and reliable choice for this purpose.
sudo apt install -y mariadb-server
After installation, run the security script to harden the database server.
sudo mysql_secure_installation
Follow the prompts to define a strong root password and apply recommended security settings.
Next, create a database for the Keystone identity service and grant access to a dedicated database user.
sudo mysql -u root -p
Inside the MariaDB shell, run the appropriate SQL statements to create the database and assign privileges for the keystone user. Replace the sample password with a secure value of your choice.
Step 4: Install and Configure Keystone
Keystone is the identity service in OpenStack. It handles authentication, authorization, and service catalog management.
sudo apt install -y keystone
After installation, update the /etc/keystone/keystone.conf file so the database connection points to your MariaDB instance.
Set the database section similar to this:
connection = mysql+pymysql://keystone:password@localhost/keystone
Be sure to replace password with the actual password configured for the Keystone database user.
Once the configuration file is updated, initialize the Keystone database and bootstrap the identity service.
sudo keystone-manage db_sync
sudo keystone-manage bootstrap --bootstrap-password PASSWORD --bootstrap-admin-url http://localhost:5000/v3/ --bootstrap-internal-url http://localhost:5000/v3/ --bootstrap-public-url http://localhost:5000/v3/ --bootstrap-region-id RegionOne
Replace PASSWORD with a secure administrative password. Then restart Apache so Keystone can serve requests correctly.
sudo systemctl restart apache2
Step 5: Install and Configure Nova
Nova is the OpenStack compute service responsible for managing virtual machine instances.
sudo apt install -y nova-api nova-conductor nova-novncproxy nova-scheduler nova-placement-api
Next, edit the /etc/nova/nova.conf file and define the database connection, message queue, Keystone authentication settings, server IP address, and VNC configuration. Ensure all passwords and IP values reflect your environment.
The following items are especially important in the Nova configuration:
- Database connection string for the Nova database
- RabbitMQ transport URL
- Keystone authentication settings for the
novaservice user - The server IP address assigned to
my_ip - Glance API endpoint for image access
After the configuration is in place, initialize the Nova databases and create the required cells.
sudo su -s /bin/sh -c "nova-manage api_db sync" nova
sudo su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
sudo su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
sudo su -s /bin/sh -c "nova-manage db sync" nova
Then restart the Nova services to apply the configuration changes.
sudo systemctl restart nova-api.service nova-scheduler.service nova-conductor.service nova-novncproxy.service
Step 6: Install and Configure Glance
Glance is the OpenStack image service, used to store and manage disk images for virtual machine instances.
sudo apt install -y glance
Edit the /etc/glance/glance-api.conf file and update the database connection and Keystone authentication options. Use a dedicated database user and secure service credentials.
After updating the configuration, synchronize the Glance database.
sudo glance-manage db_sync
Restart the image service components once the database setup is complete.
sudo systemctl restart glance-api.service glance-registry.service
Step 7: Install and Configure Neutron
Neutron provides networking for OpenStack instances, including virtual networks, routers, DHCP, and metadata services.
sudo apt install -y neutron-server neutron-plugin-ml2 neutron-linuxbridge-agent neutron-l3-agent neutron-dhcp-agent neutron-metadata-agent
Modify the /etc/neutron/neutron.conf file to define the database connection, core plugin, Keystone authentication, and integration with Nova notifications.
Then configure the ML2 plugin in /etc/neutron/plugins/ml2/ml2_conf.ini. This file controls tenant and provider network types, mechanism drivers, and security group behavior.
You will also need to adjust the Linux bridge agent in /etc/neutron/plugins/ml2/linuxbridge_agent.ini. Set the physical interface mapping to match your actual network adapter name. Replace the placeholder interface value with the correct Ubuntu network interface.
For routing support, update /etc/neutron/l3_agent.ini and confirm the interface driver is set appropriately for Linux bridge networking.
After completing the Neutron configuration, restart all related services.
sudo systemctl restart neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service neutron-l3-agent.service
Step 8: Install and Configure Horizon
Horizon is the web-based dashboard for OpenStack. It provides an administrative and user-friendly interface for managing cloud resources.
sudo apt install -y openstack-dashboard
Open the /etc/openstack-dashboard/local_settings.py file and update the dashboard configuration. Important values include the allowed hosts list, Keystone endpoint, default domain settings, SSL verification preferences, and Neutron networking support.
Make sure the dashboard points to the correct identity service URL and that the networking options align with your Neutron deployment.
Once the dashboard settings are updated, restart Apache to load the changes.
sudo systemctl restart apache2
Final Checks
After completing the installation, verify that each OpenStack service is running properly. You should also confirm database connectivity, service authentication, and network interface mappings. Access the Horizon dashboard through your server's web address to confirm the web interface is available.
For production deployments, consider adding RabbitMQ, Memcached, proper firewall rules, TLS certificates, and more detailed service hardening. A full production-grade OpenStack architecture usually includes additional planning around networking, storage, and high availability.
Conclusion
Installing OpenStack on Ubuntu Server involves configuring several core services, including Keystone, Nova, Glance, Neutron, and Horizon. While the process requires careful setup of databases, authentication, and networking, it provides a flexible foundation for building a private cloud environment. With the platform now installed, you can continue by creating projects, users, images, networks, and compute instances to start managing your cloud infrastructure effectively.







