- Published on
Getting Started With OpenStack: Install your cloud
- Authors
- Name
- Surya Harahap
- @suryaharahap18
OpenStack doesn't have a built-in deployment tool. Instead, several tools exist, with different purposes. You will deploy a simple OpenStack cloud with the help of Devstack. It is a light-weight deployer suitable for proof-of-concept or educational clouds that run on virtual machines on PCs. Devstack requires fewer resources than Packstack, but is still highly configurable, especially compared to Microstack.
Its downsides: A weird configuration file and its dependency on upstream Python software rather than curated packages. It is also not designed for rebooting, but this can be overcome with some shell scripting.
What you need
One fresh physical or virtual machine with:
A machine with 16GB of RAM, 4 vCPU (2 core) and 70GB of SSD storage. A virtual machine is strongly recommended. Use as much RAM as you can afford. 8GB might work as well.
Ubuntu 22.04 LTS installed.
Static IP address assigned to its primary network interface,
If your main Laptop/PC runs MacOS/Windows, install an SSH client for accessing the cloud's command line. I think, VsCode are popular solutions with Ekstension remote ssh.
NOTE: Read Referensi install remote ssh & configured
Setup and configure Ubuntu in your cloud
Install Ubuntu 22.04 LTS. Don't install desktop software, and don't enable any services except OpenSSH. The Ubuntu installer asks you for a non-privileged user; name it stack. Use the simplest storage configuration possible - no LVM, single partition.
After setup in your cloud vm, configure passwordless sudo
for user stack
, for example:
sudo apt-get update && sudo apt-get upgrade
sudo apt-add-repository universe
sudo apt-get update
sudo adduser stack
sudo -i
whoami
#OUTPUT: root
echo "stack ALL=(ALL:ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/stack
Download Devstack
Log on as user stack, then clone of Devstack.
su stack
cd
git clone https://opendev.org/openstack/devstack
NOTE: detail here docs devstack
Copy local.conf
to ~stack/devstack
, then
chown -R stack devstack
cd devstack
sudo cp samples/local.conf ./local.conf
sudo nano local.conf
HOST_IP=YOUR_IP
note: you can check you IP with the ifconfig command line.
last step
./stack.sh
The time it takes to complete the script depends on the speed of your internet connection, since it downloads large amounts of data. The disk, CPU and memory specs of the machine are important factors as well. Count 30 to 90 minutes.
Reference
- OpenStack documentation: https://docs.openstack.org/