OpenStack DevStack + FFmpeg Local Lab
This repository gives you a local-lab workflow for the client scope:
- Ubuntu VM on VMware
- DevStack-based OpenStack installation
- Project/user setup
- Custom image upload
- Network + router + security group customization
- Optional Cinder volume provisioning
- VM launch + floating IP + SSH access
- FFmpeg deployment inside the OpenStack instance
- KPI benchmarking against a baseline run on the Ubuntu host VM
- Optional local GitLab Runner integration for GitLab CI/CD
The scripts are written for a single Ubuntu VM where everything happens locally. That means you do not need a public IP for the project itself as long as you run GitLab Runner on the same Ubuntu VM.
1) Recommended VM settings in VMware
Use a fresh Ubuntu VM with:
- Ubuntu 24.04 LTS preferred
- 4 vCPU minimum
- 12 to 16 GiB RAM recommended
- 80 to 100 GiB free disk
- Internet access from the VM
- Nested virtualization enabled in VMware for better performance
VMware notes
In VMware Workstation / Player / Fusion, enable nested virtualization for the Ubuntu VM if available. If /dev/kvm is missing, the scripts can fall back to qemu, but the OpenStack VM will be slower.
2) Clone the repo inside the Ubuntu VM
sudo apt-get update
sudo apt-get install -y git
cd ~
git clone <YOUR_GIT_REPO_URL> openstack-devstack-ffmpeg-lab
cd openstack-devstack-ffmpeg-lab
cp config.env.example config.env
Edit config.env and adjust only what you need.
3) Script execution order
Make all scripts executable:
chmod +x scripts/*.sh scripts/lib/*.sh
Run the scripts in this order:
bash scripts/00-preflight.sh
bash scripts/10-install-devstack.sh
bash scripts/20-bootstrap-openstack.sh
bash scripts/30-provision-project-resources.sh
bash scripts/40-launch-server.sh
bash scripts/50-deploy-ffmpeg.sh
bash scripts/60-benchmark-instance.sh
bash scripts/61-benchmark-host-baseline.sh
bash scripts/62-compare-kpi.sh
Optional cleanup:
bash scripts/99-cleanup.sh
4) What each script does
scripts/00-preflight.sh
Checks:
- Ubuntu version
- CPU, RAM, disk
- host IP detection
/dev/kvm
- basic internet reachability
scripts/10-install-devstack.sh
- installs packages
- creates the
stack user
- clones DevStack into
/opt/devstack
- writes
local.conf
- runs
stack.sh
After this finishes, OpenStack is up on the Ubuntu VM.
Useful files after installation:
- DevStack directory:
/opt/devstack
- Admin credentials file:
/opt/devstack/openrc
- DevStack log:
/opt/stack/logs/stack.sh.log
scripts/20-bootstrap-openstack.sh
Runs as OpenStack admin and creates:
- Keystone project
- Keystone user
- role assignment
- custom Ubuntu cloud image in Glance
- flavor if needed
scripts/30-provision-project-resources.sh
Runs as the project user and creates:
- private network
- subnet
- router with external gateway to
public
- security group with SSH + ICMP
- SSH keypair
- optional Cinder volume
scripts/40-launch-server.sh
- boots the instance from the custom Ubuntu image
- attaches the security group and keypair
- allocates a floating IP from the
public network
- attaches the optional Cinder volume
- waits for SSH
The floating IP is stored here:
artifacts/ffmpeg-vm.floating_ip
scripts/50-deploy-ffmpeg.sh
- SSHes into the instance
- installs FFmpeg with
apt
- prints the installed FFmpeg version
scripts/60-benchmark-instance.sh
- copies the benchmark workload script to the instance
- runs a 20-second FFmpeg transcode test
- downloads the KPI CSV from the instance
Output:
artifacts/ffmpeg_kpi_instance.csv
scripts/61-benchmark-host-baseline.sh
- installs FFmpeg on the Ubuntu host VM
- runs the same workload locally on the host
- saves the baseline CSV
Output:
artifacts/ffmpeg_kpi_host.csv
scripts/62-compare-kpi.sh
Reads the two CSV files and writes:
artifacts/kpi_comparison.csv
artifacts/kpi_comparison.md
Compared KPIs:
- elapsed seconds
- user CPU seconds
- system CPU seconds
- max RSS memory in KB
This gives you a simple actual measurement comparison between:
- a standard host deployment
- the same FFmpeg workload inside the OpenStack instance
5) Optional GitLab CI/CD
If you want GitLab CI/CD with a local runner on the same Ubuntu VM, do this after the manual setup works.
Step A - install the runner
bash scripts/70-install-gitlab-runner.sh
Step B - create a runner in GitLab
In GitLab, create a project runner in the UI, set its description/tags there, and get the runner authentication token (glrt-...). Put it in config.env:
RUNNER_TOKEN=glrt-xxxxxxxxxxxxxxxx
Step C - register the runner
bash scripts/71-register-gitlab-runner.sh
Step D - push this repo to GitLab
Once the runner is registered, push the repo and use the provided .gitlab-ci.yml.
The pipeline assumes:
- DevStack is already installed on this same VM
- the runner uses the shell executor
- jobs run locally on the same machine that has
/opt/devstack
6) Notes about SSH and public IPs
For this assignment, the simplest model is:
- SSH from the Ubuntu DevStack host VM to the OpenStack instance
- not from your physical laptop directly into the instance
This keeps everything local and avoids extra public-IP or router work.
If you later want to SSH from your physical laptop to the OpenStack instance directly, then you need additional VMware networking or port-forwarding work.
7) Suggested demo flow for the client / instructor
- Show Ubuntu VM in VMware
- Show DevStack services are up
- Show OpenStack project, user, image, and network
- Show the instance and its floating IP
- SSH into the instance
- Show
ffmpeg -version
- Run the benchmark scripts
- Show
artifacts/kpi_comparison.md
8) Troubleshooting
DevStack install failed
Check:
sudo tail -n 100 /opt/stack/logs/stack.sh.log
Also verify:
- enough RAM/disk
- internet access from the VM
- Ubuntu version
- nested virtualization support
Server boots but SSH fails
Check:
source /opt/devstack/openrc admin admin
openstack server list
openstack console log show ffmpeg-vm
openstack security group rule list ffmpeg-secgroup
No floating IP connectivity from outside the Ubuntu VM
That is expected in this repo design. The intended path is SSH from the Ubuntu VM host into the OpenStack guest.
openstack-devstack-ffmpeg-la