Deploying Cloud Foundry with vSphere - Part 2

Now, I decided to try a "light" installation of Cloud Foundry as this isnt going to be production ... normally it seems you deploy BOSH then you deploy Cloud Foundry from that, but light uses bosh micro.

Create a folder to hold your installations, then run

brew tap xoebus/homebrew-cloudfoundry

brew install spiff

git clone https://github.com/cloudfoundry/cf-release

git clone https://github.com/cloudfoundry/bosh-lite

./bosh-lite/bin/provision_cf

Things will then kick off -- downloading th ebasic stemcell and pushing things onto the bosh micro director to perform.


Deploying Cloud Foundry with VMware vSphere - Part 1

Cloud Foundry is an interesting portal / management system from EMC's Pivotal Lab's team to allow you to (essentially) manage docker and the associated infrastructure it provides.

But one of the features I love the most is that it will directly integrate with VMware vSphere and take so much of the pain away.

However, the initial setup can be a bit ... awkward, so I thought I'd document how I got it working.

First off, I assume you have a fully working vSphere setup - so ESXi hosts configured and running, along with the vSphere Appliance or installation on a windows box somewhere. I tested this with vSphere 6.

Next, give the instructions a read: http://docs.cloudfoundry.org/deploying/vsphere/
Now, my private setup for testing was no where near the minimum specifications (I run a couple of HP MicroServers at home for testing things) but this didn't stop me continuing!

One thing to bear in mind, if you have multiple ESXi servers, make sure you have a datastore mounted on them both that can be shared ...

The first main step to deploying Cloud Foundry is deploying the MicroBosh image onto vSphere.
Pretty straight forward, but some jumping around is needed. Create a folder on your machine to hold things, and create the manifest.yml as per the documentation. Go through and replace the various items (such as IP address any thing in caps) thats need to be done to make it valid -- note that you need to use a vSphere Cluster and shared storage here -- I cheated, and had a cluster with a single node and an NFS Datastore that I'd created earlier.

After that, grab MicroBOSH off the web. Installing this onto my Mac OSX literally took opening a terminal and running the command, thanks to Yosemite already coming with a ruby install - but I did need to run it sudoed!

With Bosh on your machine, the next thing is a stemcell. This is basically the "starting point" for Cloud Foundry it seems.

So ...

Downloaded the stemcell with: 

bosh download public stemcell bosh-stemcell-2969-vsphere-esxi-ubuntu-trusty-go_agent.tgz

Preped the deployment with: 

bosh micro deployment manifest.yml

When I went to deploy using: 

bosh micro deploy bosh-stemcell-2969-vsphere-esxi-ubuntu-trusty-go_agent.tgz 

I got an error: 

either of 'genisoimage' or 'mkisofs' commands must be present

Fixable using: 

brew install cdrtools 

(you need homebrew installed, google it).

I also encountered an issue with the stemcell I'd picked that wasn't actually provisioning the network ... initially I thought this was a bug with the process as no errors where given, but I then discovered (after a lot of googling) I had an error in my manifest.yml file. Seems it's really sensitive and there's pretty much no validation.

Full console output of provisioning micro bosh:

iMac:micro-deployment andy$ bosh micro deploy bosh-stemcell-2969-vsphere-esxi-ubuntu-trusty-go_agent.tgz 
No `bosh-deployments.yml` file found in current directory.
Conventionally, `bosh-deployments.yml` should be saved in /Users/andy.
Is /Users/andy/micro-deployment a directory where you can save state? (type 'yes' to continue): yes
Deploying new micro BOSH instance `manifest.yml' to `https://192.168.0.30:25555' (type 'yes' to continue): yes
Verifying stemcell...
File exists and readable                                     OK
Verifying tarball...
Read tarball                                                 OK
Manifest exists                                              OK
Stemcell image file                                          OK
Stemcell properties                                          OK
Stemcell info
-------------
Name:    bosh-vsphere-esxi-ubuntu-trusty-go_agent
Version: 2969
  Started deploy micro bosh
  Started deploy micro bosh > Unpacking stemcell. Done (00:00:07)
  Started deploy micro bosh > Uploading stemcellat depth 0 - 20: unable to get local issuer certificate
at depth 1 - 19: self signed certificate in certificate chain
. Done (00:22:07)
  Started deploy micro bosh > Creating VM from sc-54cdca8c-6b13-4c3d-ae48-5bc57d9b93ffat depth 0 - 20: unable to get local issuer certificate
at depth 0 - 20: unable to get local issuer certificate
. Done (00:21:46)
  Started deploy micro bosh > Waiting for the agentat depth 0 - 20: unable to get local issuer certificate
at depth 0 - 20: unable to get local issuer certificate
. Done (00:02:23)
  Started deploy micro bosh > Updating persistent disk
  Started deploy micro bosh > Create disk. Done (00:00:02)at depth 0 - 20: unable to get local issuer certificate
at depth 0 - 20: unable to get local issuer certificate
  Started deploy micro bosh > Mount diskat depth 0 - 20: unable to get local issuer certificate
at depth 0 - 20: unable to get local issuer certificate
. Done (00:01:35)
     Done deploy micro bosh > Updating persistent disk (00:01:50)
  Started deploy micro bosh > Stopping agent services. Done (00:00:01)
  Started deploy micro bosh > Applying micro BOSH specat depth 0 - 20: unable to get local issuer certificate
at depth 0 - 20: unable to get local issuer certificate
at depth 0 - 20: unable to get local issuer certificate
at depth 0 - 20: unable to get local issuer certificate
at depth 0 - 20: unable to get local issuer certificate
at depth 0 - 20: unable to get local issuer certificate
. Done (00:06:16)
  Started deploy micro bosh > Starting agent services. Done (00:00:00)
  Started deploy micro bosh > Waiting for the directorat depth 0 - 20: unable to get local issuer certificate
. Done (00:01:14)
     Done deploy micro bosh (00:55:44)
Deployed `manifest.yml' to `https://192.168.0.30:25555', took 00:55:44 to complete
at depth 0 - 20: unable to get local issuer certificate

After that you can check the deployment is valid by: 

bosh target 192.168.0.30

You should be prompted to login; in my case (because of my yml not defining anything) the default credentials of admin / admin were valid.

Next step, deploying BOSH.