This project installs DevStack inside a Docker container and integrates Zun, the current OpenStack container project.
A DevStack setup should
- Not alter the host system
- Restart clean and fast
- Allow snapshots
- Be lightweight
- Run guest applications fast
The most straight forward option bare metal
lacks support for snapshots. It also alters the system heavily, rendering it unusable for other tasks. So it is only suitable for dedicated developer machines. Additionally, the well-known reset workflow of unstack/stack is unreliable, making this solution slow and annoying.
So, get a virtual machine and all of the above problems would be gone! Except for performance of course. Instead of VirtualBox
, we could use libvirt
with nested-KVM and speed things up. If you already know libvirsh, that may work fine.
Running inside LXD
containers might also be an option. They support multiple processes and feel more like a classic VM. Actually, they focus on IaaS [1]. However, an LXD-DevStack setup challenges just as much as on Docker [2], [9].
Running Docker on DevStack actually has been done before [3]. We add the following:
- Ubuntu 16.04 LTS base image
- systemd [7]
- OpenStack Ocata and Pike
- libvirt/QEMU instance support
- Zun instead of the deprecated Nova Docker
- container-adjusted DevStack configuration
Zun [5], OpenStack API for launching and managing containers backed by different technologies including Docker
Nova Docker (deprecated) [4], allows accessing containers via Nova's API, while Zun is not bounded by Nova's API
Nova LXD, pushed by Canonical to promote LXD, OpenStack itself may be installed within LXD with Juju
Magnum (Orchestration), a self-service solution to provision and manage a Kubernetes (or other COEs) cluster
The Makefile
includes a complete Docker lifecycle. Image build and DevStack installation are simply started with
$ git clone https://github.com/janmattfeld/DockStack.git
$ cd DockStack
$ make
The first run can take up to 50 minutes, downloading all Ubuntu and Python packages. Subsequent container starts are much faster because of the Docker cache.
- Start a Cirros container via Zun with
make test
. - Check your installation via Horizon at the displayed address.
- Enter the running container directly with
make bash
.
Feel free to adjust the file local.conf
for your needs [8].
Although a container restart is faster than a complete build, it still takes a few minutes. So for experimenting use
docker commit
to save your running DevStack into the image- Docker checkpoints [6] (experimental)
- the classic workflow of
/devstack/unstack.sh
and/devstack/stack.sh
If you really messed it up, make clean
followed by make run
will set up a fresh DevStack.
- Recent Linux (tested on Ubuntu 16.04 LTS and 17.04)
- 4 GB of RAM available for the container
- Docker (tested on 17.06.0-ce)