-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile.two_node
59 lines (50 loc) · 1.87 KB
/
Vagrantfile.two_node
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'yaml'
Vagrant.configure("2") do |config|
config.vm.define :node1 do |node1_config|
# node1_config.vm.box = "ubuntu-aws-us-east"
node1_config.vm.box = "centos6-aws-us-east"
node1_config.vm.provider :aws do |aws, override|
aws_config = YAML::load_file(File.join(Dir.home, ".aws_secrets"))
aws.access_key_id = aws_config.fetch("access_key_id")
aws.secret_access_key = aws_config.fetch("secret_access_key")
aws.keypair_name = aws_config.fetch("keypair_name")
# override.ssh.username = "ubuntu"
override.ssh.private_key_path = aws_config.fetch("keypair_path")
name = aws_config.fetch("instance_name_prefix") + " Vagrant Node1 Percona Server"
aws.tags = {
'Name' => name
}
end
node1_config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "init.pp"
puppet.module_path = "puppet/modules"
puppet.options = "--verbose"
end
end
config.vm.define :node2 do |node2_config|
# node2_config.vm.box = "ubuntu-aws-us-east"
node2_config.vm.box = "centos6-aws-us-east"
node2_config.vm.provider :aws do |aws, override|
aws_config = YAML::load_file(File.join(Dir.home, ".aws_secrets"))
aws.access_key_id = aws_config.fetch("access_key_id")
aws.secret_access_key = aws_config.fetch("secret_access_key")
aws.keypair_name = aws_config.fetch("keypair_name")
# override.ssh.username = "ubuntu"
override.ssh.username = "root"
override.ssh.private_key_path = aws_config.fetch("keypair_path")
name = aws_config.fetch("instance_name_prefix") + " Vagrant Node1 Percona Server"
aws.tags = {
'Name' => name
}
end
node2_config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "init.pp"
puppet.module_path = "puppet/modules"
puppet.options = "--verbose"
end
end
end