In my last post “Deploying Cloud Foundry in a Hybrid Environment“, I showed you how to deploy DEA runners in a bare-metal environment. However, Cloud Foundry now has new and exciting Diego runtime! So now I will guide you through how to deploy Diego Cells on bare metal machines. When we’re all done, your environment will look like this:


Before we begin, your environment should look something like this:

Please reference my previous post to see how you set up this environment.

1. Install Hybrid Cloud Foundry Diego:
Deploy Diego. You can follow these instructions to deploy Diego.

The steps are actually quite simple:
1. Diego-Release: Git clone, create release, and upload release
2. Garden-Release: Git clone, create release, and upload release
3. ETCD-Release: Git clone, create release, and upload release
4. Generate Bosh manifest with stubs

Sometimes, step 4 can be tricky. If you are stuck, you can reference my example manifest for vSphere. This manifest should work with Diego v0.1462.

After deploying Diego, you should have 6 VMs running. You can verify by running

. Your output should look like this:

Screen Shot 2016-04-21 at 11.14.28 AM

And your environment should look like:


At this point, you are ready to execute your Cloud Foundry application in Diego! In order to enable your application to run in Diego, you would need to install the Diego-Enable CLI Plugin. Now use that to enable your application:

And then restart your application:

At this point, the application should be running successfully in Diego.

2. Remove DEA Runners
If you still have DEA Runners, now is a good time to remove them. You can simply point your bosh target to your RackHD Bosh Director and delete the deployment. For example:

3. Remove Diego Cell in Virtual Environment
Adjust your Diego Deployment manifest to set the instance count of Diego cell to 0, like this:

Run bosh deploy. You should see that Bosh will remove the cell VM for you. At this point, you should have 5 VMs left.

4. Deploy Diego Cells to Bare-Metal

If you have made it this far, then deploying Diego Cells to Bare-Metal machines should be a breeze.

1. bosh target {{RACKHD_BOSH_DIRECTOR_IP}}
2. Upload releases of Diego, ETCD, and Garden
3. Duplicate your Diego Deployment manifest and leave only the Diego cell
4. bosh deploy
If you have trouble getting your manifest to work, you can reference my example manifest here.

By now, your rack nodes should look like this:

Screen Shot 2016-04-21 at 12.53.58 PM

Your bosh vms should look like this:

Screen Shot 2016-04-21 at 12.54.15 PM

And finally, your environment should look like this:

With your Diego cells up and running, you should be able to restart your applications in Cloud Foundry and see them working. Feel free to scale out your Diego cells into more machines if needed!

Please let me know if you have any questions or if you get stck. I usually hang out in in the

channel. I can also be reached by email at or on Twitter @victorkfong.

Tags: , , , , , , , , , , , , , ,