add drpc, use env, updated version for Storm

This commit is contained in:
Colin Surprenant 2014-03-02 20:31:25 -05:00
parent e4b26bca1e
commit 58446fce9d
1 changed files with 18 additions and 11 deletions

29
vagrant/Vagrantfile vendored
View File

@ -6,13 +6,17 @@
# @return [String] the script text for shell inline provisioning
def create_swap(swap_size_mb, swap_file = "/swapfile1")
<<-EOS
if [ ! -f /swapfile1 ]; then
if [ ! -f #{swap_file} ]; then
echo "Creating #{swap_size_mb}mb swap file=#{swap_file}. This could take a while..."
dd if=/dev/zero of=#{swap_file} bs=1024 count=#{swap_size_mb * 1024}
mkswap #{swap_file}
chmod 0600 #{swap_file}
swapon #{swap_file}
echo "#{swap_file} swap swap defaults 0 0" >> /etc/fstab
if ! grep -Fxq "#{swap_file} swap swap defaults 0 0" /etc/fstab
then
echo "#{swap_file} swap swap defaults 0 0" >> /etc/fstab
fi
fi
EOS
end
@ -53,7 +57,7 @@ def provision(chef, env)
},
:storm => {
:version => "0.9.0-wip16",
:version => "0.9.1-incubating",
:deploy => {
:user => "storm",
@ -91,7 +95,7 @@ def provision(chef, env)
:childopts => "-Xmx256m",
},
:worker => {
:childopts => "-Xmx768m",
:childopts => "-Xmx4096m -Xms4096m",
},
:ui => {
:childopts => "-Xmx768m",
@ -110,17 +114,17 @@ Vagrant.configure("2") do |config|
prod.vm.box = "dummy"
prod.ssh.username = "ubuntu"
prod.vm.provider :aws do |aws|
aws.access_key_id = "xxx"
aws.secret_access_key = "xxx"
aws.keypair_name = "xxx"
aws.ssh_private_key_path = "~/.ssh/xxx.pem"
prod.vm.provider :aws do |aws, override|
aws.access_key_id = ENV["ACCESS_KEY_ID"]
aws.secret_access_key = ENV["SECRET_ACCESS_KEY"]
aws.keypair_name = ENV["KEYPAIR_NAME"]
override.ssh.private_key_path = ENV["PRIVATE_KEY_PATH"]
aws.ami = "ami-0cdf4965" # Ubuntu 12.10, us-east-1, 64bits, ebs root
aws.instance_type = "m1.large"
aws.region = "us-east-1"
aws.tags = {"Name" => "xxx"}
aws.security_groups = ["xxx", "xxx"]
aws.tags = {"Name" => "redstorm_cluster"}
aws.security_groups = ["storm", "ssh"]
end
# TODO on EC2, add swap on ephemeral device not ebs boot
@ -141,6 +145,9 @@ Vagrant.configure("2") do |config|
# storm numbus thrift
dev.vm.network :forwarded_port, :guest => 6627, :host => 6627
# storm drpc
dev.vm.network :forwarded_port, :guest => 3772, :host => 3772
# redis
dev.vm.network :forwarded_port, :guest => 6379, :host => 6379