2015-03-20 12:25:36 -04:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
|
|
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
|
|
|
|
VAGRANTFILE_API_VERSION = "2"
|
|
|
|
|
|
2015-10-27 18:28:04 -04:00
|
|
|
# Setup instructions from docs/contributing.rst
|
2016-01-19 12:15:22 -05:00
|
|
|
# Script installs dependencies for tox and boulder integration
|
2015-03-20 12:25:36 -04:00
|
|
|
$ubuntu_setup_script = <<SETUP_SCRIPT
|
|
|
|
|
cd /vagrant
|
2016-01-13 16:26:36 -05:00
|
|
|
./letsencrypt-auto-source/letsencrypt-auto --os-packages-only
|
2016-02-05 18:31:41 -05:00
|
|
|
./tools/venv.sh
|
2016-01-13 20:10:12 -05:00
|
|
|
wget https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz -P /tmp/
|
|
|
|
|
sudo tar -C /usr/local -xzf /tmp/go1.5.3.linux-amd64.tar.gz
|
2016-01-22 20:10:40 -05:00
|
|
|
if ! grep -Fxq "export GOROOT=/usr/local/go" /home/vagrant/.profile ; then echo "export GOROOT=/usr/local/go" >> /home/vagrant/.profile; fi
|
|
|
|
|
if ! grep -Fxq "export PATH=\\$GOROOT/bin:\\$PATH" /home/vagrant/.profile ; then echo "export PATH=\\$GOROOT/bin:\\$PATH" >> /home/vagrant/.profile; fi
|
|
|
|
|
if ! grep -Fxq "export GOPATH=\\$HOME/go" /home/vagrant/.profile ; then echo "export GOPATH=\\$HOME/go" >> /home/vagrant/.profile; fi
|
2016-02-12 06:52:05 -05:00
|
|
|
if ! grep -Fxq "cd /vagrant/; ./tests/boulder-start.sh &" /etc/rc.local ; then sed -i -e '$i \cd /vagrant/; ./tests/boulder-start.sh &\n' /etc/rc.local; fi
|
2016-01-13 20:10:12 -05:00
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
2016-01-22 19:31:50 -05:00
|
|
|
sudo -E apt-get -q -y install git make libltdl-dev mariadb-server rabbitmq-server nginx-light
|
2015-03-20 12:25:36 -04:00
|
|
|
SETUP_SCRIPT
|
|
|
|
|
|
|
|
|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
|
|
|
|
|
|
|
|
config.vm.define "ubuntu-trusty", primary: true do |ubuntu_trusty|
|
|
|
|
|
ubuntu_trusty.vm.box = "ubuntu/trusty64"
|
|
|
|
|
ubuntu_trusty.vm.provision "shell", inline: $ubuntu_setup_script
|
|
|
|
|
ubuntu_trusty.vm.provider "virtualbox" do |v|
|
|
|
|
|
# VM needs more memory to run test suite, got "OSError: [Errno 12]
|
|
|
|
|
# Cannot allocate memory" when running
|
|
|
|
|
# letsencrypt.client.tests.display.util_test.NcursesDisplayTest
|
2016-10-21 18:45:57 -04:00
|
|
|
# We may no longer need this.
|
2015-03-20 12:25:36 -04:00
|
|
|
v.memory = 1024
|
2015-12-15 22:09:23 -05:00
|
|
|
|
|
|
|
|
# Handle cases when the host is behind a private network by making the
|
|
|
|
|
# NAT engine use the host's resolver mechanisms to handle DNS requests.
|
|
|
|
|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
2015-03-20 12:25:36 -04:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|