forked from emnify/matrix-synapse-auto-deploy
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathVagrantfile
90 lines (83 loc) · 2.72 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id,
"--groups", "/matrix"]
end
end
Vagrant.configure("2") do |config|
config.vm.provider :aws do |aws, override|
aws.access_key_id = ENV['AWS_ACCESS_KEY_ID']
aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
aws.keypair_name = ENV['AWS_KEYPAIR_NAME']
aws.instance_type = "m3.medium"
aws.region = ENV['AWS_REGION']
aws.subnet_id = ENV['AWS_SUBNET_ID']
aws.security_groups = ENV['AWS_SECURITY_GROUP_ID']
aws.ami = ENV['AWS_AMI']
aws.associate_public_ip = "true"
aws.tags = {
'Name' => 'matrix-synapse'
}
override.vm.box = "dummy"
override.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"
override.ssh.username = "ubuntu"
override.ssh.private_key_path = ENV['SSH_PRIVATE_KEY_PATH']
end
end
Vagrant.configure('2') do |config|
config.vm.provider :digital_ocean do |digital_ocean, override|
override.ssh.private_key_path = ENV['SSH_PRIVATE_KEY_PATH']
override.vm.box = 'digital_ocean'
override.vm.box_url = "https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box"
digital_ocean.token = ENV['DO_TOKEN']
digital_ocean.image = 'ubuntu-14-04-x64'
digital_ocean.region = ENV['DO_REGION']
digital_ocean.size = '512mb'
end
end
Vagrant.configure("2") do |config|
config.vm.network "public_network"
config.vm.provider "hyperv" do |h, override|
h.vm_integration_services = {
enable_virtualization_extensions: true,
guest_service_interface: true,
heartbeat: true,
key_value_pair_exchange: true,
shutdown: true,
time_synchronization: true,
vss: true,
differencing_disk: true
}
override.vm.box = 'generic/ubuntu1604'
override.vm.provision "ansible_local" do |ansible|
ansible.playbook = "playbook.yml"
ansible.install_mode = "pip"
ansible.version = "2.3.0.0"
end
end
end
Vagrant.configure("2") do |config|
config.vm.define "synapse" do |dev|
dev.vm.box = "trusty64"
dev.vm.network :private_network, ip: "10.99.99.230"
dev.vm.hostname = "matrix-synapse"
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |vb|
vb.name = "matrix-synapse"
vb.customize ["modifyvm", :id,
"--groups", "/matrix",
"--memory", "1024"]
end
end
end
Vagrant.configure("2") do |config|
config.vm.provision "ansible" do |ansible|
ansible.host_key_checking = false
ansible.become = true
ansible.become_user = "vagrant"
ansible.playbook = "playbook.yml"
# ansible.raw_arguments = "-vvv"
end
end