yuanying
4/25/2013 - 11:39 PM

1vm-cloudfoundry

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "lucid64"
  config.vm.network :private_network, ip: "192.168.33.10"
  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", "2048"]
  end

  config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = "nisebosh-recipes/cookbooks"
    chef.roles_path = "nisebosh-recipes/roles"
    chef.data_bags_path = "nisebosh-recipes/data_bags"
    chef.add_role "bootstrap"
    chef.add_recipe "cloudfoundry"
  
    chef.json = { :cf => {:domain => "192.168.33.10.xip.io"} }
  end
end



cd /vcap
git clone https://github.com/cloudfoundry/cf-release.git
cd ./cf-release
git remote add yuanying https://github.com/yuanying/cf-release.git
git pull yuanying master
From https://github.com/yuanying/cf-release
 * branch            master     -> FETCH_HEAD
Updating 4fd9c30..c9d596a
Fast-forward
 jobs/cloud_controller_ng/monit                  |    2 ++
 jobs/dea_next/templates/dea.yml.erb             |   12 ++++++++++++
 jobs/dea_next/templates/warden_ctl              |   18 ------------------
 jobs/hbase_master/templates/hbase_zookeeper_ctl |    4 ++--
 packages/nginx/packaging                        |    1 +
 packages/nginx_next/packaging                   |    1 +
 packages/ruby/packaging                         |    1 +
 packages/ruby_next/packaging                    |    1 +
 8 files changed, 20 insertions(+), 20 deletions(-)
./update

gem install bosh_cli
bosh create release --force


apt-get install debootstrap runit

cd /vcap
git clone https://github.com/nttlabs/nise_bosh.git
cd ./nise_bosh
git remote add yuanying https://github.com/yuanying/nise_bosh.git
git fetch yuanying
git checkout -b multi-monitrc-spike yuanying/multi-monitrc-spike
bundle install
./bin/init
yes | bundle exec ./bin/nise-bosh /vcap/cf-release /vcap/micro_ng.yml -n 127.0.0.1 postgres
yes | bundle exec ./bin/nise-bosh /vcap/cf-release /vcap/micro_ng.yml -n 127.0.0.1 nats
yes | bundle exec ./bin/nise-bosh /vcap/cf-release /vcap/micro_ng.yml -n 127.0.0.1 gorouter
yes | bundle exec ./bin/nise-bosh /vcap/cf-release /vcap/micro_ng.yml -n 127.0.0.1 dea_next
yes | bundle exec ./bin/nise-bosh /vcap/cf-release /vcap/micro_ng.yml -n 127.0.0.1 health_manager_next
yes | bundle exec ./bin/nise-bosh /vcap/cf-release /vcap/micro_ng.yml -n 127.0.0.1 cloud_controller_ng
yes | bundle exec ./bin/nise-bosh /vcap/cf-release /vcap/micro_ng.yml -n 127.0.0.1 serialization_data_server
yes | bundle exec ./bin/nise-bosh /vcap/cf-release /vcap/micro_ng.yml -n 127.0.0.1 uaa
yes | bundle exec ./bin/nise-bosh /vcap/cf-release /vcap/micro_ng.yml -n 127.0.0.1 vcap_redis

mkdir -p /var/vcap/shared
chown vcap:vcap /var/vcap/shared
mkdir -p /var/vcap/store

./bin/run-job start postgres
./bin/run-job start nats
./bin/run-job start gorouter
./bin/run-job start dea_next
./bin/run-job start health_manager_next
./bin/run-job start cloud_controller_ng
./bin/run-job start serialization_data_server
./bin/run-job start uaa
./bin/run-job start vcap_redis