f4fd47dc2c
A data volume container is far superior to bind mounting the host's shared directories. It preserves the idempotency, immutability and declarative properties of the containers. The way this works in practice is that a data volume container is created. Then when the containers start they use LVM to access the filesystem where /var/lib/docker is contained. Then the container startup logic bindmounts the data volume stored on the host filesystem in /var/lib/docker/vfs/dir/ID. This prevents people with access to the host operating system from damaging the contents of the data container. It does mean that now we must use tools/stop to stop our containers rather than tools/cleanup-containers -f. This is a containers best practice. For more details see: https://docs.docker.com/userguide/dockervolumes/ Big credit goes to Danyeon Hansen for seeding this idea in the mariadb containers. Note occasionally docker-compose start/stop seems to not want to stop a container. This bug needs to be addressed upstream separately from our utilization of this best practice. Change-Id: Iaa1419f606e1b1b7a7560a095c49e79d643164f1
Docker compose
These scripts and docker compose files can be used to stand up a simple installation of openstack. Running the 'tools/genenv' script creates an 'openstack.env' suitable for running on a single host system as well as an 'openrc' to allow access to the installation.
Once you have run that you can either manually start the containers using the 'docker-compose' command or try the 'tools/start' script which tries to start them all in a reasonable order, waiting at key points for services to become available. Once stood up you can issue the typical openstack commands to use the installation:
# source openrc
# nova network-create vmnet --fixed-range-v4=10.0.0.0/24 --bridge=br100 --multi-host=T
# nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
# nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
#
# nova keypair-add mykey > mykey.pem
# chmod 600 mykey.pem
# nova boot --flavor m1.medium --key_name mykey --image puffy_clouds instance_name
# ssh -i mykey.pem cirros@<ip>