If you want to learn how to install Apache CloudStack in an automated way using Ansible, I’ve prepared a complete video tutorial showing the entire process step by step.
What you will learn
In this video tutorial, I demonstrate in practice how to:
- π Set up the environment for CloudStack installation
- βοΈ Use Ansible to automate the entire installation
- ποΈ Configure MySQL Server for CloudStack
- π¦ Configure NFS for Primary and Secondary Storage
- π₯οΈ Install and configure the Management Server
- π§ Download and configure System VM Templates
- β Validate the installation and access the web interface
- βΈοΈ Live Demo: Install a Kubernetes cluster using CloudStack CKS
Why automate with Ansible?
Manual CloudStack installation is a complex process that can take hours and is prone to errors. With Ansible, you can:
- β Reproduce the installation as many times as needed
- β Ensure consistency across environments
- β Save time with complete automation
- β Version your infrastructure as code
- β Document the installation process
About the Ansible Project
The automation project I use in the video is available as open-source on GitHub:
π ansible-cloudstack
It was developed to simplify CloudStack installation in homelab and PoC environments, automatically configuring:
- CloudStack Management Server (version 4.22+)
- Optimized MySQL Server
- NFS Server for storage
- System VM Templates for KVM, XenServer, and ESXi
- Cloudmonkey CLI for command-line management
Watch the Tutorial
Don’t forget to like, comment, and subscribe to the channel for more content about DevOps, Cloud, and Homelab!
Environment Requirements
To follow the tutorial, you will need:
- Operating System: Rocky Linux 9 (tested and recommended)
- Note: Roles for Debian/Ubuntu also exist, but have not been fully tested yet
- CPU: 4 vCPUs (minimum) - In the video I use 8 vCPUs for the Kubernetes demo
- Memory: 8GB RAM (recommended)
- Disk: 250GB (recommended for storage)
- Ansible: Version 2.10+
Demo: Kubernetes on CloudStack
One of the most interesting parts of the video is the demonstration of how to install a Kubernetes cluster directly using CloudStack CKS (CloudStack Kubernetes Service).
For this, I use the official Kubernetes v1.33.1 ISO with Calico:
π setup-v1.33.1-calico-x86_64.iso
With CloudStack configured, you can create complete Kubernetes clusters with just a few clicks, leveraging the full power of your private cloud infrastructure!
Quick Installation
If you’re already familiar with Ansible, here’s the basic command for installation:
# Clone the repository
git clone https://github.com/Matheus-Thurler/ansible-cloudstack.git
cd ansible-cloudstack
# Run the playbook
ansible-playbook -i inventory ./cloudstack-install.ymlNext Steps
After watching the video and installing CloudStack, you can:
- Configure a Zone to start creating VMs
- Add KVM hosts for compute
- Configure networks with VLANs (optional)
- Create custom VM templates
- Integrate with Terraform for complete IaC
Additional Resources
Contribute!
The project is Open Source and accepts contributions. If you find any issues or have suggestions for improvements:
- π Open an Issue on GitHub
- π§ Submit a Pull Request with improvements
- π¬ Share your experiences in the video comments
I hope this tutorial helps you get started with Apache CloudStack! If you have any questions, leave them in the video comments or open an issue on the repository.
Happy Clouding! βοΈ

Comments