forked from viglesiasce/eucadev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
65 lines (65 loc) · 2.97 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Workaround for CHEF-4725
class<<Vagrant::Util::TemplateRenderer;alias r render;def render(*a);r(*a)<<(a[0]=~/solo$/?"\nlog_location STDOUT":"");end;end
options = {
:cores => 2,
: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.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" => "packages",
## Does not change package version, use "eucalyptus-repo" variable
"source-branch" => "testing",
"eucalyptus-repo" => "http://downloads.eucalyptus.com/software/eucalyptus/nightly/4.0/centos/6/x86_64/",
"euca2ools-repo" => "http://downloads.eucalyptus.com/software/euca2ools/nightly/3.1/centos/6/x86_64/",
}
}
end
config.vm.provision "shell", path: "eucadev_post.sh"
config.vm.define "eucadev-all" do |u|
u.vm.hostname = "eucadev-all"
u.vm.box = "euca-deps"
u.vm.box_url = "http://euca-vagrant.s3.amazonaws.com/euca-deps-vmware.box"
u.vm.network :forwarded_port, guest: 8080, host: 8080
u.vm.network :forwarded_port, guest: 8443, host: 8443
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"
aws.access_key_id = "XXXXXXXXXXXXXXXXXXXXXXX"
aws.secret_access_key = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"
aws.instance_type = "cc1.4xlarge"
# Optional
aws.keypair_name = "my-keypair"
aws.ami = "emi-MYEMIHERE"
override.ssh.username ="root"
# Optional
aws.region = "eucalyptus"
aws.endpoint = "http://EUCALYPTUS_CLC_IP:8773/services/Eucalyptus"
override.ssh.private_key_path ="/path/to/ssh/key"
aws.instance_ready_timeout = 480
aws.tags = {
Name: "EucaDev",
}
end
end
end