From 21da63cc4d337fe63a7da899cce7546f4e0ecb9c Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Mon, 12 Jun 2017 13:29:33 -0700 Subject: [PATCH] Added a Vagrant file that is caplable of running vmpooler in Docker or locally --- .gitignore | 1 + Vagrantfile | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 Vagrantfile diff --git a/.gitignore b/.gitignore index 99789c436..6dcdc33a5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.vagrant/ .ruby-version Gemfile.lock Gemfile.local diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 000000000..03acde1b8 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,19 @@ +# vim: autoindent tabstop=2 shiftwidth=2 expandtab softtabstop=2 filetype=ruby +Vagrant.configure("2") do |config| + config.vm.box = "genebean/centos-7-rvm-221" + config.vm.network "forwarded_port", guest: 4567, host: 4567 + config.vm.network "forwarded_port", guest: 8080, host: 8080 + config.vm.provision "shell", inline: <<-SCRIPT + mkdir /var/log/vmpooler + chown vagrant:vagrant /var/log/vmpooler + yum -y install docker + groupadd docker + usermod -aG docker vagrant + systemctl enable docker + systemctl start docker + docker build -t vmpooler /vagrant + docker images + echo 'To use the container run with the dummy provider do this:' + echo "docker run -e VMPOOLER_DEBUG=true -p 8080:4567 -v /vagrant/vmpooler.yaml.dummy-example:/var/lib/vmpooler/vmpooler.yaml -e VMPOOLER_LOG='/var/log/vmpooler/vmpooler.log' -it --rm --name pooler vmpooler" + SCRIPT +end