This is my tutorial of how to deploy cloud foundry using bosh-lite, as you may know there is a tutorial in the bosh-lite Readme file but there are some tiny step that the tutorial does not cover and I always forget and that is the reason why I'm writing my own.
git clone git@github.com:cloudfoundry/bosh-lite.git cd bosh-lite vagrant plugin install vagrant-omnibus bundle librarian-chef install vagrant up bosh target 192.168.50.4 ./scripts/add-routewget http://bosh-jenkins-gems-warden.s3.amazonaws.com/stemcells/latest-bosh-stemcell-warden.tgz bosh upload stemcell latest-bosh-stemcell-warden.tgz
All the previous steps are explained in the bosh-lite tutorial. You can see the original tutorial here: https://github.com/cloudfoundry/bosh-lite
Now we are going to clone the cf-release repo that is a bosh release for cloudfoundry;
cd .. git clone git@github.com:cloudfoundry/cf-release.git
and now we need to point our the release dir for bosh:
export CF_RELEASE_DIR=~/cloudfoundry/cf-release/
Now we can upload the latest cloud foundry release which at this moment is 145:
bosh upload release ../cf-release/releases/cf-145.ymlUploading release release.tgz: 100% |oooooooooooooooooooooooooooooooooooooo| 1.1GB 53.3MB/s Time: 00:00:21 HTTP 500:
Oooops :( I got an error, I'm trying to find where the bosh packages are stored, doing little bit of research I found that bosh-lite use https://github.com/cloudfoundry/bosh/blob/master/simple_blobstore_server simple_blobstore_server is a sinatra API that store.
Finally I restarted the Vm tried again and just worked:
bosh releases------+----------+-------------+ | Name | Versions | Commit Hash | +------+----------+-------------+ | cf | 145 | 41733e43+ | +------+----------+-------------+ (+) Uncommitted changes
Releases total: 1
So, we uploaded our bosh release cloud foundry, now we need a deploy manifest:
./scripts/make_manifestbosh status
Config /home/gramos/.bosh_config
Director Name Bosh Lite Director URL https://192.168.50.4:25555 Version 1.5.0.pre.1117 (3300587c) User admin UUID 365eb26d-146e-4d12-888f-d9249dbef375 CPI warden dns enabled (domain_name: bosh) compiled_package_cache enabled (provider: local) snapshots disabled
Deployment Manifest ~/cloudfoundry/bosh-lite/manifests/cf-manifest.yml
and run the deploy:
bosh deploy
You can see the vms created by bosh to check that the deploy worked:
Deployment `cf-warden'Director task 228
Task 228 done
+------------------------------------+---------+---------------+--------------+ | Job/index | State | Resource Pool | IPs | +------------------------------------+---------+---------------+--------------+ | cloud_controller/0 | running | common | 10.244.0.14 | | dea_next/0 | running | dea | 10.244.0.126 | | health_manager/0 | running | common | 10.244.0.122 | | loggregator-trafficcontroller_z1/0 | running | common | 10.244.0.82 | | loggregator-trafficcontroller_z2/0 | running | common | 10.244.0.86 | | loggregator_z1/0 | running | common | 10.244.0.74 | | loggregator_z2/0 | running | common | 10.244.0.78 | | login/0 | running | common | 10.244.0.118 | | nats/0 | running | common | 10.244.0.6 | | postgres/0 | running | common | 10.244.0.250 | | router/0 | running | router | 10.244.0.254 | | syslog_aggregator/0 | running | common | 10.244.0.2 | | uaa/0 | running | common | 10.244.0.10 | +------------------------------------+---------+---------------+--------------+
VMs total: 13
and that's all!
If you want to review some bosh concepts here are some documentation:
http://docs.cloudfoundry.com/docs/running/bosh/reference/