A quick and dirty Vagrant based environment for testing scap, a MediaWiki deployment tool.
Requirements
Setup
$ vagrant up
And relax. No, really, relax. This will take a while depending on your connection.
What that does
- Creates a Debian jessie VirtualBox VM
- Clones scap into
./scap
and mounts it at/scap
in the VM - Installs scap dependencies
- Initializes a test deploy repo with scap configuration at
/srv/deployment/mockbase/deploy
- Uses LXC to create 10 cloned system containers within the VM to act as deployment targets
- Each container:
- Is networked via a bridge interface on the VM and accessible over SSH at an IP address in the range
192.168.122.0/24
- Bind mounts
/scap
as read-only for access to local deployment scripts - Contains a
mockbase
service script listening on127.0.0.1:1134
that can be used to test service restarts and post-deploy checks
- Is networked via a bridge interface on the VM and accessible over SSH at an IP address in the range
- Exposes
/srv/deployment/mockbase/deploy/mockbase
as an HTTP git repo accessible at192.168.122.1
from containers - Writes a list of container host names to
/etc/dsh/group/mockbase
How to deploy
$ vagrant ssh
vagrant@vm $ cd /srv/deployment/mockbase/deploy
vagrant@vm $ deploy
from https://github.com/marxarelli/scap-vagrant