-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
50 lines (42 loc) · 1.78 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
$GOOGLE_PROJECT_ID = "gce-devops"
$GOOGLE_CLIENT_EMAIL = "[email protected]"
$GOOGLE_JSON_KEY_LOCATION = "/home/fabiosak/Dev/Vagrant/gce-devops/GCE-DEVOPS-6c2a20b6f0cd.json"
$LOCAL_USER = "fabiosak"
$LOCAL_SSH_KEY = "~/.ssh/id_rsa"
Vagrant.configure("2") do |config|
config.vm.box = "google/gce"
config.vm.define :jenkins do |jenkins|
jenkins.vm.provider :google do |google, override|
google.google_project_id = $GOOGLE_PROJECT_ID
google.google_client_email = $GOOGLE_CLIENT_EMAIL
google.google_json_key_location = $GOOGLE_JSON_KEY_LOCATION
google.zone = "us-central1-c"
override.ssh.username = $LOCAL_USER
override.ssh.private_key_path = $LOCAL_SSH_KEY
google.zone_config "us-central1-c" do |jenkins_zone|
jenkins_zone.name = "jenkins"
jenkins_zone.image = "centos-7-v20180611"
jenkins_zone.machine_type = "n1-standard-1"
jenkins_zone.zone = "us-central1-c"
jenkins_zone.metadata = {"zone" => "US Central 1c"}
end
end
end
config.vm.define :puppetmaster do |puppetmaster|
puppetmaster.vm.provider :google do |google, override|
google.google_project_id = $GOOGLE_PROJECT_ID
google.google_client_email = $GOOGLE_CLIENT_EMAIL
google.google_json_key_location = $GOOGLE_JSON_KEY_LOCATION
google.zone = "us-central1-c"
override.ssh.username = $LOCAL_USER
override.ssh.private_key_path = $LOCAL_SSH_KEY
google.zone_config "us-central1-c" do |puppetmaster_zone|
puppetmaster_zone.name = "puppetmaster"
puppetmaster_zone.image = "centos-7-v20180611"
puppetmaster_zone.machine_type = "n1-standard-1"
puppetmaster_zone.zone = "us-central1-c"
puppetmaster_zone.metadata = {"zone" => "US Central 1c"}
end
end
end
end