π Introduction:
OpenStack is one of the most popular open-source platforms used to build private cloud infrastructure β imagine running your own version of AWS ποΈ right on your personal machine π».
I wanted to dive deeper into cloud computing, so I decided to set up my own OpenStack cloud using MicroStack β a simplified, single-node version of OpenStack.
In this blog, Iβll walk you through everything I did β step-by-step β from setting up the system to launching a virtual machine through the OpenStack Dashboard π.
Whether you're using Windows πͺ, macOS π, or Linux π§, this guide will help you get your own private cloud up and running locally.
π What weβll cover:
β
System setup (based on your OS)
β
Installing OpenStack using MicroStack
β
Uploading a cloud image
β
Launching your first VM from the Horizon dashboard
π§° Prerequisites (Cross-Platform Setup)
You can follow this guide on any operating system, but make sure your system meets these minimum requirements:
βοΈ Minimum System Requirements:
π§ CPU: 4 or more cores
π§΅ RAM: Minimum 16 GB
πΎ Storage: At least 100 GB free
π Internet: Required
π§ Step 2: Set Up the Virtual Machine and Install Ubuntu 20.04 LTS
To run OpenStack using MicroStack, we need a Linux environment. If you're not already on Ubuntu, follow these instructions to install it inside a virtual machine on your system.
π» VM Setup Instructions (For Windows and macOS Users)
You'll need to create a virtual machine using either:
π§± VirtualBox (Free and open source)
πΌ VMware Workstation Player (Free for personal use)
π UTM or Parallels Desktop (macOS)
βοΈ Recommended VM Configuration:
Setting Value
CPU 4 cores
RAM 16 GB
Storage 100 GB (dynamically allocated is OK)
Network Mode Bridged Adapter π
OS ISO Ubuntu 20.04.6 LTS (64-bit) π§
π₯ Download Ubuntu 20.04 LTS ISO
Go to the official site and download the ISO:
π https://releases.ubuntu.com/20.04/
Make sure to choose the 64-bit Desktop image.
π Create and Install the VM
Open VirtualBox or your VM tool of choice (e.g., VMware, UTM, Parallels).
-
Create a new VM and choose:
- π₯οΈ OS Type: Linux
- π§© Version: Ubuntu (64-bit)
Attach the Ubuntu ISO you downloaded earlier.
-
Start the VM and follow the installation prompts:
- β Select "Erase disk and install Ubuntu"
- π§ Choose your keyboard layout, language, and timezone
- π€ Set up a username and password (you'll use this to log in later)
After installation completes, restart the VM.
Once logged into Ubuntu, open the terminal with
Ctrl + Alt + T
and you're ready to continue!
βοΈ Step 3: Installing MicroStack (Single-Node OpenStack Setup)
MicroStack is a snap-based deployment of OpenStack developed by Canonical. It allows you to run a full OpenStack cloud on a single machine β ideal for local testing, learning, and labs.
π§ Whatβs Included with MicroStack?
When installed, MicroStack sets up the following OpenStack services automatically:
- π Keystone β Identity service
- π§ Nova β Compute service (virtual machines)
- πΌοΈ Glance β Image service
- π Neutron β Networking service
- π¦ Cinder β Block storage
- π Horizon β Web-based dashboard
π¦ Step-by-Step MicroStack Installation
Make sure your Ubuntu VM is running and youβre logged into your user account.
Absolutely! Here's the correct and properly structured Markdown version of the section, formatted cleanly for use in a blog or documentation platform:
β 1. Update Your System
```
bash
sudo apt update && sudo apt upgrade -y
β 2. Install Snap
bash
sudo apt install snapd -y
β 3. Install MicroStack (Edge Channel + Dev Mode)
bash
sudo snap install microstack --edge --devmode
β 4. Initialize MicroStack as a Control Node
bash
sudo microstack init --auto --control
This command will:
- π Generate SSL keys
- βοΈ Set up essential services like MySQL, RabbitMQ, Nova, Keystone
- π Configure networking
- π¦ Download and register a test image (CirrOS)
- π’ Create default flavors and networks > π This step can take 10β15 minutes depending on your system.
π How to Get the OpenStack Admin Password and Access the Dashboard
After installing MicroStack, your OpenStack admin credentials are saved automatically in a file.
β Get the Admin Password
Run the following command in your terminal:
bash
cat /var/snap/microstack/common/etc/microstack.rc
Youβll see output like this:
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=your_actual_password_here
export OS_AUTH_URL=https://<your-vm-ip>:5000/v3
...
π Copy the value of:
bash
export OS_PASSWORD=your_actual_password_here
Thatβs your OpenStack admin password.
π Access the OpenStack Dashboard (Horizon)
β 1. Find Your VM's IP Address
Run:
bash
ip a
Look for the IP address under your main network interface (usually enp0s3
or eth0
), for example:
192.168.1.101
β 2. Open Horizon Dashboard in Your Browser
In your host machineβs browser, visit:
http://<your-vm-ip>
Example:
http://192.168.1.101
π Make sure your VM uses Bridged Adapter mode in VirtualBox or VMware so it's accessible on your local network.
β 3. Log In
Username: admin
Password: The value you copied from the .rc
file (OS_PASSWORD
)
πΌοΈ Step 5: Upload a Cloud Image Manually in Horizon Dashboard
Now that youβre logged into the OpenStack Horizon dashboard, letβs upload a cloud image so you can launch your first virtual machine.
β What Image Do You Need?
OpenStack supports various formats, but the most commonly used is QCOW2.
Weβll use the Ubuntu 20.04 Cloud image.
π₯ Download it from:
https://cloud-images.ubuntu.com/focal/current/
Download the file named:focal-server-cloudimg-amd64.img
π§ Upload the Image via Horizon (Web UI)
- Go to the Project tab on the left sidebar.
Click Compute β Images.
Click the "Create Image" button (top-right).
Fill the form as follows:
Field | Value |
---|---|
Image Name | ubuntu-focal |
Image Source | Image File |
Format | QCOW2 - QEMU Emulator |
Architecture | x86_64 |
Minimum Disk (GB) | 10 |
Minimum RAM (MB) | 2048 |
File | Choose the focal-server-cloudimg-amd64.img you downloaded |
Click Create Image.
β The image will now be uploaded and processed. Once completed, it will appear in the Images list.
π― Final Thoughts: Your OpenStack Cloud Is Now Live!
Congratulations! π Weβve successfully built your very own OpenStack cloud environment β from setting up a VM, installing MicroStack, uploading an image, and launching your first instance. This experience gives you real insight into how modern cloud platforms work under the hood.
But our journey doesnβt stop here β OpenStack is made up of many powerful components, each handling a key part of the cloud ecosystem.
π§© Key OpenStack Services You Just Used
Hereβs a quick overview of the main services you interacted with:
Service | Name | Description |
---|---|---|
π Horizon | horizon |
The web-based dashboard used to manage and monitor OpenStack resources. |
π Keystone | keystone |
Handles identity, authentication, and role-based access across OpenStack. |
π§ Nova | nova |
The compute engine that launches and manages virtual machines (instances). |
πΌοΈ Glance | glance |
Manages VM images. You uploaded your Ubuntu image here. |
π Neutron | neutron |
Provides networking-as-a-service, including IP management, subnets, and routers. |
π¦ Cinder | cinder |
Offers block storage for VMs (volumes that can persist after reboots). |
π§ Cloud-Init | (helper tool) | Initializes cloud images on first boot (sets SSH keys, usernames, etc.). |
π What We Can Try Next
- Create and attach volumes using Cinder.
- Set up floating IPs for external SSH access.
- Create security groups and custom rules.
- Explore OpenStack CLI for scripting and automation.
- Test multi-instance deployment and scaling.
π¬ Wrap-Up
Building our own cloud gives you hands-on experience with how real-world infrastructure runs. Whether you're a student, DevOps engineer, or curious learner, running OpenStack locally is a massive step forward in understanding cloud-native technologies.
Thanks for reading!
Feel free to share, comment, or ask questions if you get stuck anywhere. Happy hacking! πβοΈ
Top comments (0)