forked from eucalyptus/eucalyptus-cookbook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
92 lines (92 loc) · 5.69 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# -*- mode: ruby -*-
# vi: set ft=ruby :
options = {
:cores => 4,
:memory => 3072,
}
Vagrant.configure("2") do |config|
config.omnibus.chef_version = :latest
config.berkshelf.enabled = true
config.vm.provision "shell", path: "eucadev/prep.sh"
config.vm.synced_folder ".", "/vagrant", owner: "root", group: "root"
config.vm.provision :chef_solo do |chef|
chef.roles_path = "roles"
chef.add_role "cloud-in-a-box"
chef.json = { "eucalyptus" => { ## Choose whether to compile binaries from "source" or "packages"
"install-type" => "source",
## Does not change package version, use "eucalyptus-repo" variable
"source-branch" => "maint-4.2",
"eucalyptus-repo" => "http://downloads.eucalyptus.com/software/eucalyptus/4.2/centos/6/x86_64/",
"euca2ools-repo" => "http://downloads.eucalyptus.com/software/euca2ools/3.3/centos/6/x86_64/",
"yum-options" => "--nogpg",
"default-img-url" => "http://euca-vagrant.s3.amazonaws.com/cirrosraw.img",
"install-load-balancer" => false,
"install-imaging-worker" => false,
"nc" => {"hypervisor" => "qemu", "work-size" => "50000"},
"topology" => { "clc-1" => "192.168.192.101", "walrus" => "192.168.192.101",
"user-facing" => ["192.168.192.101"],
"clusters" => {"default" => { "storage-backend" => "overlay ",
"cc-1" => "192.168.192.101",
"sc-1" => "192.168.192.101",
"nodes" => "192.168.192.101"}
}
},
"network" => { "mode" => "EDGE",
"public-interface" => "br0",
"private-interface" => "br0",
"bridged-nic" => "eth1",
"bridge-ip" => "192.168.192.101",
"config-json" => { "InstanceDnsServers" => ["192.168.192.101"],
"PublicIps" => ["192.168.192.110-192.168.192.160"],
"Clusters" => [{ "Name" => "default",
"Subnet" => {
"Name" => "192.168.192.0",
"Subnet" => "192.168.192.0",
"Netmask" => "255.255.255.0",
"Gateway" => "192.168.192.101"
},
"PrivateIps" => [ "192.168.192.10-192.168.192.80"]
}]}
}
}}
end
config.vm.provision "shell", path: "eucadev/post.sh"
config.vm.define "eucadev-all" do |u|
u.vm.hostname = "eucadev-all"
u.vm.box = "chef/centos-6.7"
u.vm.box_url = "http://euca-vagrant.s3.amazonaws.com/euca-deps-virtualbox.box"
u.vm.network :forwarded_port, guest: 8888, host: 8888
u.vm.network :forwarded_port, guest: 8773, host: 8773
u.vm.network :forwarded_port, guest: 8774, host: 8774
u.vm.network :forwarded_port, guest: 8775, host: 8775
u.vm.network :private_network, ip: "192.168.192.101"
u.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", options[:memory].to_i]
v.customize ["modifyvm", :id, "--cpus", options[:cores].to_i]
end
u.vm.provider :vmware_fusion do |v, override|
override.vm.box_url = "http://euca-vagrant.s3.amazonaws.com/euca-deps-vmware.box"
v.vmx["memsize"] = options[:memory].to_i
v.vmx["numvcpus"] = options[:cores].to_i
v.vmx["vhv.enable"] = "true"
end
u.vm.provider :aws do |aws, override|
override.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"
override.ssh.pty = true
aws.access_key_id = "AKIAJTSHR3GPTBCT4C3A"
aws.secret_access_key = "ODExo3sPp/7mdyrQvBA5IkVqutkB19QIzPrxnRgd"
aws.instance_type = "m1.medium"
aws.keypair_name = "vic"
aws.ami = "ami-8997afe0"
override.ssh.username ="root"
# Optional
#aws.region = "eucalyptus"
#aws.endpoint = "http://EUCALYPTUS_CLC_IP:8773/services/Eucalyptus"
override.ssh.private_key_path ="~/.ssh/id_rsa"
aws.instance_ready_timeout = 480
aws.tags = {
Name: "EucaDev",
}
end
end
end