-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
38 lines (32 loc) · 1.09 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
Vagrant.configure("2") do |config|
AWS_ACCESS_KEY ||=
AWS_SECRET_KEY ||=
AWS_SECURITY_GROUP ||=
AWS_SUBNET_ID ||=
AWS_KEYPAIR_NAME ||=
AWS_PRIVATE_KEY_PATH ||=
config.vm.box = "dummy"
config.vm.provider :aws do |aws, override|
# Credentials
aws.access_key_id = AWS_ACCESS_KEY
aws.secret_access_key = AWS_SECRET_KEY
# Resource Configuration
aws.ami = 'ami-5189a661'
aws.instance_type = 'c4.large'
aws.region = 'eu-west-1'
aws.security_groups = [AWS_SECURITY_GROUP]
aws.subnet_id = AWS_SUBNET_ID
aws.associate_public_ip = "true"
aws.ssh_host_attribute = :dns_name
aws.terminate_on_shutdown = 'terminate'
aws.keypair_name = AWS_KEYPAIR_NAME
# SSH
override.ssh.username = 'ubuntu'
override.ssh.private_key_path = AWS_PRIVATE_KEY_PATH
override.ssh.pty = true
override.ssh.forward_x11 = true
# Provision
config.vm.provision "shell", inline: "echo 'sudo shutdown -P 0' | at 18:30"
config.vm.synced_folder '.', '/vagrant', :rsync_excludes => ['app/node_modules'], :rsync__exclude => ['app/node_modules']
end
end