forked from taskcluster/taskcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
31 lines (25 loc) · 1.32 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Vagrant.configure("2") do |config|
config.vm.box = "peru/ubuntu-14.04-server-amd64"
config.vm.synced_folder ENV['PWD'], ENV['PWD']
config.vm.synced_folder "../docker-worker-deploy", "/docker-worker-deploy"
# We need to configure docker to expose port 60366
config.vm.provision "shell", inline: <<-SCRIPT
# Setup Taskcluster and Pulse Credentials if available
echo 'export TASKCLUSTER_CLIENT_ID="#{ENV['TASKCLUSTER_CLIENT_ID']}"' >> /home/vagrant/.bash_profile
echo 'export TASKCLUSTER_ACCESS_TOKEN="#{ENV['TASKCLUSTER_ACCESS_TOKEN']}"' >> /home/vagrant/.bash_profile
echo 'export TASKCLUSTER_ROOT_URL="#{ENV['TASKCLUSTER_ROOT_URL']}"' >> /home/vagrant/.bash_profile
echo 'export PULSE_USERNAME="#{ENV['PULSE_USERNAME']}"' >> /home/vagrant/.bash_profile
echo 'export PULSE_PASSWORD="#{ENV['PULSE_PASSWORD']}"' >> /home/vagrant/.bash_profile
echo 'set -o vi' >> /home/vagrant/.bash_profile
SCRIPT
config.vm.provision "shell" do |s|
s.inline = "/bin/bash -vex -c 'cd /docker-worker-deploy; bash -vex deploy/packer/base/scripts/packages.sh'"
s.env = {VAGRANT_PROVISION: "1"}
end
config.vm.provision "shell" do |s|
s.inline = "/bin/bash -vex -c 'cd /docker-worker-deploy; bash -vex ./vagrant.sh'"
s.env = {VAGRANT_PROVISION: "1"}
# Requires vagrant-reload plugin
config.vm.provision :reload
end
end