Vmck is a virtual machine service that runs QEMU and Docker images in a Nomad cluster.
It can be used as a provider for Vagrant:
vagrant plugin install vagrant-vmck
curl -OL <https://github.com/mgax/vagrant-vmck/raw/master/example_box/Vagrantfile>
vagrant up
vagrant ssh
And it has its own CLI:
pipenv run ./manage.py createjob
pipenv run ./manage.py ssh 1
pipenv run ./manage.py kill 1
docker run --detach --restart always \\
--name cluster \\
--volume /opt/cluster/var:/opt/cluster/var \\
--volume /opt/vmck/var:/opt/vmck/var \\
--volume /var/run/docker.sock:/var/run/docker.sock:ro \\
--privileged \\
--net host \\
--env NOMAD_CLIENT_INTERFACE=wg0 \\
--env HOSTNAME=127.0.0.1 \\
--env SECRET_KEY=foo \\
mgax/vmck
Here you can add different --env options with arguments matching {root}/vmck/settings.py and {root}/vmck/base_settings.py to suit your preferences.
Then go to consul (http://localhost:8500/ui/dc1/services) and wait for the health check lights to turn green.
.env file:SECRET_KEY=change_me
CONSUL_URL=your_consul_url
NOMAD_URL=your_nomad_url
docker backend is selected. You can choose qemu by adding BACKEND=qemu to your .env file