-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVagrantfile
69 lines (61 loc) · 2.7 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.insert_key = false
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant'
# Box provisioned INCLUDING CPA docker images
# (simple download of the image INCLUDING CPA docker images and restart of services)
config.vm.define "cpa-tutorial", primary: true do |tutorial|
tutorial.vm.box = "http://output.ebu.io/vm/cpa-tutorial.box"
# fix 'stdin is not a tty' error
config.vm.provision "fix-no-tty", type: "shell" do |s|
s.privileged = false
s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile"
end
tutorial.vm.provision "shell", path: "docker/init/docker_restart.sh", run: "always", privileged: true
tutorial.ssh.insert_key = false
tutorial.vm.network "forwarded_port", guest: 9000, host: 9000
tutorial.vm.network "forwarded_port", guest: 8000, host: 8000
tutorial.vm.network "forwarded_port", guest: 8001, host: 8001
tutorial.vm.network "forwarded_port", guest: 8002, host: 8002
tutorial.vm.provider "virtualbox" do |v|
v.name = "cpa-tutorial"
v.memory = 1024
v.cpus = 2
end
end
# Box WITHOUT CPA docker images
# (simple download of a plain docker installation WITHOUT CPA docker images and restart of services)
config.vm.define "cpa-tutorial-dev" do |tutorial|
tutorial.vm.box = "http://output.ebu.io/vm/docker-base.box"
# fix 'stdin is not a tty' error
config.vm.provision "fix-no-tty", type: "shell" do |s|
s.privileged = false
s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile"
end
tutorial.vm.provision "shell", path: "docker/init/docker_restart.sh", run: "always", privileged: true
tutorial.ssh.insert_key = false
tutorial.vm.network "forwarded_port", guest: 9000, host: 9000
tutorial.vm.network "forwarded_port", guest: 8000, host: 8000
tutorial.vm.network "forwarded_port", guest: 8001, host: 8001
tutorial.vm.network "forwarded_port", guest: 8002, host: 8002
tutorial.vm.provider "virtualbox" do |v|
v.name = "cpa-tutorial-dev"
v.memory = 1024
v.cpus = 2
end
end
# Simple Ubuntu image and provision docker installation
config.vm.define "docker-base", autostart: false do |base|
base.vm.box = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
base.vm.provision "shell", path: "base/vagrant_provision.sh"
base.vm.provision "shell", path: "base/vagrant_development_provision.sh"
base.vm.provider "virtualbox" do |v|
v.name = "docker-base"
v.memory = 1024
v.cpus = 2
end
end
end