DevStack is a series of extensible scripts used to quickly bring up a complete OpenStack environment based on the latest versions of everything from git master. I've collected a brief summary (mostly for myself) of how to get it up and running on a single node for development purposes.
| create-flavor.png | ||
| customize-root-image.png | ||
| openstack-add-image.png | ||
| README.md | ||
devstack on Ubuntu 22.04LTS
About
Devstack is a lightweight one-machine (VM) version of Openstack, especially suitable for developers who have a need to dive into Openstack without committing to the large overhead of a full system.
Read more about Canonical Openstack here: https://ubuntu.com/openstack/what-is-openstack
Download Ubuntu 22.04LTS: https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso
Create a Ubuntu 22.04LTS VM on your computer. (I've only tested this with Intel processors).
Assign at least 4 vCPU cores, 8 GB Ram and a 60GB disk.
napshot VM after installation (in case something goes wrong down the line)
Install Devstack:
git clone https://opendev.org/openstack/devstack
cd devstack/tools
sudo ./create-stack-user.sh
cd ../..
sudo mv devstack /opt/stack
sudo chown -R stack:stack /opt/stack/devstack
Config
sudo nano /opt/stack/devstack/local.conf
===== BEGIN localrc =====
[[local|localrc]]
DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=somesecrettokenhere
RABBIT_PASSWORD=password
GIT_BASE=https://opendev.org
# Optional settings:
# OCTAVIA_AMP_BASE_OS=centos
# OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID=9-stream
# OCTAVIA_AMP_IMAGE_SIZE=3
# OCTAVIA_LB_TOPOLOGY=ACTIVE_STANDBY
# OCTAVIA_ENABLE_AMPHORAV2_JOBBOARD=True
# LIBS_FROM_GIT+=octavia-lib,
# LIBVIRT_CPU_MODE="host-passthrough"
# Enable Logging
LOGFILE=$DEST/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
enable_service rabbit
enable_plugin neutron $GIT_BASE/openstack/neutron
# Octavia supports using QoS policies on the VIP port:
enable_service q-qos
enable_service placement-api placement-client
# Octavia services
enable_plugin octavia $GIT_BASE/openstack/octavia master
enable_plugin octavia-dashboard $GIT_BASE/openstack/octavia-dashboard
enable_plugin ovn-octavia-provider $GIT_BASE/openstack/ovn-octavia-provider
enable_plugin octavia-tempest-plugin $GIT_BASE/openstack/octavia-tempest-plugin
enable_service octavia o-api o-cw o-hm o-hk o-da
# If you are enabling barbican for TLS offload in Octavia, include it here.
# enable_plugin barbican $GIT_BASE/openstack/barbican
# enable_service barbican
# Cinder (optional)
disable_service c-api c-vol c-sch
# Tempest
enable_service tempest
===== END localrc =====
Sanity checks and Installation
sudo su - stack
cd /opt/stack/devstack
./stack.sh
. ./openrc
Some test commands to see that everything is as it should be
openstack network list # should show public and private networks
openstack image list
Download Ubuntu 22.04 Cloud Image (QCOW2 format)
[download] https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
Customize root user password so we can log in through console later (lets set a simple default)
sudo apt install guestfs-tools
sudo virt-customize -a jammy-server-cloudimg-amd64.img --root-password password:ubuntu2024
Create a Openstack Deployable Image like this
Create a custom Flavor for the image
Create Node 1 and Node 2 servers
openstack server create --image $(openstack image list | awk '/ Ubuntu-22.04LTS / {print $2}') --flavor clite --nic net-id=$(openstack network list | awk '/ private / {print $2}') node1
openstack server create --image $(openstack image list | awk '/ Ubuntu-22.04LTS / {print $2}') --flavor clite --nic net-id=$(openstack network list | awk '/ private / {print $2}') node2
openstack server list # Take note of the IP addresses, so we can SSH in later
# add secgroup rules to allow ssh etc..
openstack security group rule create default --protocol icmp
openstack security group rule create default --protocol tcp --dst-port 22:22
openstack security group rule create default --protocol tcp --dst-port 80:80