-
Notifications
You must be signed in to change notification settings - Fork 81
/
Vagrantfile
55 lines (48 loc) · 1.74 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
if Vagrant.has_plugin?("vagrant-proxyconf")
if ENV["http_proxy"]
puts "http_proxy: " + ENV["http_proxy"]
config.proxy.http = ENV["http_proxy"]
end
if ENV["https_proxy"]
puts "https_proxy: " + ENV["https_proxy"]
config.proxy.https = ENV["https_proxy"]
end
if ENV["no_proxy"]
config.proxy.no_proxy = ENV["no_proxy"]
end
end
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder ".", "/opt/cadasta/cadasta-platform", create: true
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 8000, host: 8000
config.vm.network "forwarded_port", guest: 5432, host: 5433
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
# vb.cpus = 2
end
config.vm.provision "ansible" do |ansible|
# ansible.verbose = "vvv"
ansible.playbook = "provision/vagrant.yml"
end
config.vm.provider :aws do |aws, override|
aws.tags = {
'Name' => 'cadasta-platform-dev'
}
aws.ami = 'ami-fce3c696' # Ubuntu Server 14.04 LTS (HVM)
aws.access_key_id = ENV["CADASTA_AWS_ACCESS_KEY_ID"]
aws.secret_access_key = ENV["CADASTA_AWS_SECRET_ACCESS_KEY"]
aws.region = "us-east-1"
aws.instance_type = "t2.micro"
aws.keypair_name = ENV['CADASTA_PEM_KEY_NAME']
aws.security_groups = ENV['CADASTA_SECURITY_GROUP']
# aws.subnet_id = ENV["SUBNET_ID"]
aws.associate_public_ip = false
override.ssh.username = 'ubuntu'
override.ssh.private_key_path = ENV['CADASTA_PEM_KEY_LOCATION']
override.vm.box = "dummy"
override.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"
end
end