-
Notifications
You must be signed in to change notification settings - Fork 6
/
Vagrantfile
70 lines (61 loc) · 2.68 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.host_name = "buddycloud-vm.dev"
config.ssh.forward_agent = true
# Resolve "stdin: is not a tty" errors
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
# Forward ports
config.vm.network :forwarded_port, guest: 5222, host: 5222, protocol: 'tcp' # XMPP-client
config.vm.network :forwarded_port, guest: 5269, host: 5269, protocol: 'tcp' # XMPP-S2S
config.vm.network :forwarded_port, guest: 5432, host: 5432, protocol: 'tcp' # Postgresql
config.vm.network :forwarded_port, guest: 443, host: 8080, protocol: 'tcp' # website
# Sync the following folders
config.vm.synced_folder "saltstack/vagrant_salt_bootstrap", "/srv/vagrant_salt_bootstrap"
config.vm.synced_folder "saltstack/salt_local", "/srv/salt_local"
config.vm.synced_folder "saltstack/buddycloud_saltstack_repo", "/srv/buddycloud_saltstack_repo"
config.vm.synced_folder "saltstack/my_saltstack_repo", "/srv/my_saltstack_repo"
# Provision the box with a masterless salt configuration
config.vm.provision :shell, :inline => "sudo /srv/vagrant_salt_bootstrap/bootstrap.sh"
# configure for virtualbox
config.vm.provider :virtualbox do |virtualbox|
virtualbox.gui = false
virtualbox.memory = 2048
virtualbox.cpus = 1
virtualbox.name = "buddycloud-vm"
end
# Libvirt
config.vm.provider "libvirt" do |lv|
lv.memory = 2048
end
# Google Compute
config.vm.provider :google do |google|
google.google_project_id = "hallowed-coww-638"
google.google_client_email = "[email protected]"
google.google_key_location = "~/.ssh/google_compute_engine.private_key"
google.zone = "europe-west1-d"
google.zone_config "europe-west1-d" do |zone1d|
zone1d.name = "testing-vagrant"
zone1d.image = "debian-7-wheezy-v20150127"
zone1d.machine_type = "n1-standard-4"
zone1d.zone = "europe-west1-d"
zone1d.metadata = {'custom' => 'metadata', 'testing' => 'foobarbaz'}
zone1d.tags = ['web', 'app1']
end
end
# VMware Vcenter configuration
config.vm.provider :vcenter do |vcenter|
vcenter.hostname = 'my.vcenter.hostname'
vcenter.username = 'myUsername'
vcenter.password = 'myPassword'
vcenter.folder_name = 'myFolderName'
vcenter.datacenter_name = 'MyDatacenterName'
vcenter.computer_name = 'MyHostOrCluster'
vcenter.datastore_name = 'MyDatastore'
vcenter.network_name = 'myNetworkName'
vcenter.linked_clones = true
end
end