This project installs DevStack inside a Docker container.
This version of DockStack is based on the original by janmattfeld.
It updates the devstack to the stein version as well as removing some excessive features.
A DevStack setup should
- Not alter the host system
- Restart clean and fast
- Allow snapshots
- Be lightweight
- Run guest applications fast
Running Docker on DevStack actually has been done before [1]. We add the following:
- Ubuntu 16.04 LTS base image
- systemd [2]
- OpenStack Ocata and Pike
- libvirt/QEMU instance support
- Zun instead of the deprecated Nova Docker
- container-adjusted DevStack configuration
- Network configuration
The Makefile
includes a complete Docker lifecycle. Image build and DevStack installation are simply started with
$ git clone https://github.com/jdtzmn/DockStack.git
$ cd DockStack
$ make
This is your host IP address: 172.17.0.2
Horizon is now available at http://172.17.0.2/dashboard
Keystone is serving at http://172.17.0.2/identity/
The default users are: admin and demo
The password: secret
Services are running under systemd unit files.
DevStack Version: stein
OS Version: Ubuntu 18.04 xenial
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.
- Enter the main DevStack container directly with
make bash
. - Check your installation via Horizon at the displayed address.
Internet access for OpenStack instances
- Edit the
public-subnet
and enable DHCP with a custom DNS server i. e.8.8.8.8
.
Reaching an OpenStack instance from your host through Docker
- Add custom rules to the default security group
Ping: Ingress, IPv4, ICMP, Any, 0.0.0.0/0
- On your host: Route to instances through docker instead of the (here unusable) Open vSwitch/Neutron interface br-ex
$ ip route
172.24.4.0/24 dev br-ex proto kernel scope link src 172.24.4.1
$ sudo ip route del 172.24.4.0/24
$ sudo ip route add 172.24.4.0/24 via 172.17.0.2
$ ip route
172.24.4.0/24 via 172.17.0.2 dev docker0
Feel free to adjust the file local.conf
for your needs [3].
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 [4] (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 18.04 LTS)
- 4 GB of RAM available for the container
- Docker (tested on 17.06.0-ce)