DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

SBOMs are essential to circumventing software supply chain attacks, and they provide visibility into various software components.

Related

  • Have You Heard About Cloud Native Buildpacks?
  • Mastering Cloud Containerization: A Step-by-Step Guide to Deploying Containers in the Cloud
  • Cloud Build Unleashed: Expert Techniques for CI/CD Optimization
  • Why You Should Use Buildpacks Over Docker

Trending

  • How We Broke the Monolith (and Kept Our Sanity): Lessons From Moving to Microservices
  • Top 5 Trends in Big Data Quality and Governance in 2025
  • Exploring Data Redaction Enhancements in Oracle Database 23ai
  • When Caches Collide: Solving Race Conditions in Fare Updates
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Build Your Private Cloud at Home

Build Your Private Cloud at Home

OpenStack is a popular open-source cloud platform. Through this article, I plan to provide a guide for creating a basic OpenStack cloud at home.

By 
Amith Kotu user avatar
Amith Kotu
·
Jun. 17, 25 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
1.7K Views

Join the DZone community and get the full member experience.

Join For Free

OpenStack is a popular open-source cloud platform. Through this article, I plan to provide a guide for creating a basic OpenStack cloud at home!

The OpenStack cloud nodes can be generally divided into two categories:

  1.  The control plane nodes can be considered the brain of the cloud. This is where operations such as virtual machine (VM) host allocation will be performed.
  2. The compute nodes are the hosts for the VM workloads to run. Each of these compute nodes is responsible for running the VMs allocated to it by the control plane.

We will be using a two-node deployment with one server for the control plane node and the other server to be used as a compute node. This will allow us to start on a small-scale setup, but at the same time provide the flexibility to add more compute nodes (i.e., to increase the compute pool of resources) to the cloud as and when required.

There are various methods for deploying and running an OpenStack cloud. We will be using a modified and simplified version of the Kolla OpenStack deployment. In a Kolla-based OpenStack deployment, we will run the OpenStack services in Docker containers. We have modified the deployment procedure to build and use a Docker image for various deployment operations.

Requirements

Quantity item used in my setup

2

Servers with a minimum:

16 GB RAM

8 CPUS

250 GB hard Disk

1 physical network interface

1 wireless/physical network interface 

Intel NUC

1

Deployment host

Dell laptop

1

Router (other than your home internet router/modem) with at least 2 LAN ports

TP-Link Archer C54

3

Ethernet cables

 

1

USB stick with a minimum of 4 GB of free space

 

1

External Ethernet adapter for the deployment host if it is not present on it

 


Set up the Router and Deployment Host

  1. Connect the OpenStack network router WAN port to your home internet router/modem using an Ethernet cable.
  2. Make sure Ethernet is set to DHCP on the deployment host.
  3. Connect one of the LAN ports on the router to your deployment host.
  4. Access the router through the browser and perform the following steps:
    1. Get information about the LAN subnet.
    2. Set 50 IP addresses for the DHCP range.
  5. Note the wireless network name and password. This is important as we must connect both servers to this network.
  6. Disconnect the deployment host's Ethernet connection from the router, and then try to connect to the router's wireless network if your deployment host has a wireless NIC.
  7. Ensure your deployment host has Docker and Git installed. We will need this software to download the repo, build the Docker image, and use the Docker image for deployment.

Setting up the router and deployment host

Operating System Installation

  1. Create a bootable USB stick on your deployment host with Ubuntu 22.04 server image: https://mirror.pilotfiber.com/ubuntu-iso/22.04.5/ubuntu-22.04.5-live-server-amd64.iso
  2. Attach the USB stick and boot from the USB stick.
  3. From the GRUB menu, select the option "Try or install ubuntu server".
  4. For OS installation, select the options you prefer if nothing is specified here.
  5. Update to a new installer if available. At the time of making this document, I am using version 24.10.1.
  6. Use the "Ubuntu Server" option as the base for installation.
  7. Network configuration
    1. Disable the Ethernet interface that is connected to the router.
    2. Make sure your wireless LAN interface is enabled and set to DHCP.
    3. Next, you  have to go under the section "Edit Wifi" under the wlan interface config and connect to your OpenStack router network. If done correctly, this should give you a DHCP IP that is in the DHCP range you specified while configuring the router.
  8. Storage configuration
    1. Select “Custom storage layout”.
    2. Reformat/Format the entire disk we will be using.
    3.  Now you should be able to see all the space on the disk freed up. In this free space, create a root ( / ) partition of at least 250 GB. Also, leave around 2 GB of free space for creation /boot/efi.
  9. In the Profile configuration, give the appropriate server name.
    1. For the controller server, give the name as controller-01.
    2. For the hypervisor server, give the name as hypervisor-01.
  10. Do not upgrade to Ubuntu Pro.
  11.  SSH Configuration.
    1. Install OpenSSH server.
  12. Featured Server snaps.
    1. Do not install any server snaps.

After the OS installation, the server will reboot.

Now, you should be able to log in to the server with the credentials previously set in step 8. Use the command /etc/os-release to check the installed os version.

Server Configuration

Perform these steps on both the server controller-01 and hypervisor-01.

  1. Set a password for the root user.
    1. SSH to the servers using the osadmin username and the password you set.
    2. Run the command sudo passwd root to set a password for the root user.
    3. Check that you can log in as root using the command su and then enter the password you set.
  2. Enable SSH root login on the servers.
    1. SSH to the servers using the osadmin username and the password you set.
    2. Log in as the root user.
    3. In /etc/ssh/sshd_config, set “permit root login” to “yes”.
    4. Run the command /etc/init.d/ssh restart to restart the SSH service.
    5. Check that you can now SSH as the root user.

Deployment

  1. Clone the openstack-docker-deployer for deployment.
    1. Move to the folder where you want to clone the openstack-docker-deployer project.
    2. Run command git clone https://github.com/amithkotu/openstack-docker-deployer.git to clone the openstack-docker-deployer project.
  2. Make changes to the “hosts” file located under etc/kolla/inventory folder of the project.
    1. Set “ansible_ssh_pass” value under “[all:vars]” to your server root user password.
    2. Set “ansible_host” value beside “controller-01”  under “[control]” section to the controller ip address.
    3. Set “ansible_host” value beside “hypervisor-01”  under “[compute]” section to the hypervisor ip address.
  3. Make changes to the “globals.yml” file located under the etc./kolla folder of the project.
    1. Set “kolla_internal_vip_address” to the IP address of the controller-01 node.
    2. Set “network_interface” value to the name of the wireless interface that you see on the controller-01 node.
    3. Set “neutron_external_interface” value to the name of the physical network interface on hypervisor-01 that will be used for VMs to communicate (neutron).
  4. Create a Docker image to be used for deployment
    1. Make sure you are in the folder with the “Dockerfile” from the project.
    2. Run command docker image rm openstack-deployer-image:latest to remove any locally existing deployment image.
    3. Run command docker build -t openstack-deployer-image . to create a Docker image that can be used for deployment.
  5. Generate passwords:
    1. Run command docker run --rm --entrypoint kolla-genpwd -v $(pwd)/etc/kolla:/etc/kolla openstack-deployer-image to generate passwords to be used for various OpenStack services.
  6. Run pre-deployment tasks:
    1. Run command docker run --rm --entrypoint ansible-playbook openstack-deployer-image /etc/kolla/pre-deployment.yml -i /etc/kolla/inventory -l all:\!localhost to run pre-deployment tasks.
  7. Bootstrap the servers to prepare the servers for deployment.
    1. Run command docker run --rm -v /work/projects/openstack-docker-deployer/etc/kolla:/etc/kolla openstack-deployer-image bootstrap-servers.
  8. Run prechecks as final check before deployment to make sure everything is configured as expected.
    1. Run command docker run --rm -v /work/projects/openstack-docker-deployer/etc/kolla:/etc/kolla openstack-deployer-image prechecks.
  9. Deploy the cloud
    1. Run command docker run --rm -v /work/projects/openstack-docker-deployer/etc/kolla:/etc/kolla openstack-deployer-image deploy.

Post-Deployment

  1. On hypervisor-01, make sure the “neutron_external_interface” is up. If not, bring it up using the command ip link set <interface_name> up.
  2. Similarly, on hypervisor-01, bring up interfaces br-ex, br-int, and br-tun if they are down.
  3. Check the containers on both controller-01 and hypervisor-01 by using the command docker container ls. Make sure none of the containers are in an “unhealthy” state.
  4. Make sure you save the etc/kolla/passwords.yml file (that you generated earlier) locally or encrypt it and save it in a git repo. You will need the passwords in this file to access various services.
  5. Access the horizon dashboard in the browser on the controller-01 IP address and port 80. You can log in using the following credentials:
    1. User Name is “admin”
    2. Password is the value of the “keystone_admin_password” in the file etc/kolla/passwords.yml of the repo.

Conclusion

You have now successfully deployed an OpenStack cloud at home! In the next article, we will be creating our first OpenStack VM. In the meantime, play around with things on the OpenStack dashboard and get yourself familiarized with terms such as images, flavors, and networks. There is also some great documentation on the official OpenStack website.

OpenStack Cloud Docker (software)

Opinions expressed by DZone contributors are their own.

Related

  • Have You Heard About Cloud Native Buildpacks?
  • Mastering Cloud Containerization: A Step-by-Step Guide to Deploying Containers in the Cloud
  • Cloud Build Unleashed: Expert Techniques for CI/CD Optimization
  • Why You Should Use Buildpacks Over Docker

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: