-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
45 lines (36 loc) · 1.31 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
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'aws'
Vagrant.configure("2") do |config|
access_key_id = File.read('.vagrant_key_id').chomp
secret_access_key = File.read('.vagrant_secret_access_key').chomp
keypair = File.read('.vagrant_keypair_name').chomp
config.vm.box = 'dummy'
config.vm.provision 'puppet' do |pp|
pp.module_path = ['modules',"puppet"]
pp.manifest_file = 'vagrant.pp'
pp.hiera_config_path = "hiera.yaml"
end
config.vm.define(:jenkinsmaster) do |node|
node.vm.provider :aws do |aws, override|
aws.access_key_id = access_key_id
aws.secret_access_key = secret_access_key
aws.keypair_name = keypair
aws.security_groups = ['instant-jenkins']
aws.instance_type = "t2.small"
# Ensuring that our machines hostname is "correct" so Puppet will apply
# the right resources to it
aws.user_data = "#!/bin/sh
echo 'vagrant-jenkinsmaster' > /etc/hostname;
hostname 'vagrant-jenkinsmaster';"
aws.tags = {
:Name => :jenkinsmaster
}
# Ubuntu LTS 12.04 in us-west-2 with Puppet installed from the Puppet
# Labs apt repository
aws.ami = 'ami-b7e5a987'
aws.region = 'us-west-2'
override.ssh.username = "ubuntu"
override.ssh.private_key_path = File.expand_path('instant-jenkins.pem')
end
end
end
# vim: ft=ruby