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:

Diagram7

Pre-Requisites
Before we begin, your environment should look something like this:
Diagram1

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 bosh vms. Your output should look like this:

Screen Shot 2016-04-21 at 11.14.28 AM

And your environment should look like:

Diagram8

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:

cf enable-diego dojo-snake

And then restart your application:

cf restart dojo-snake

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:

bosh target {{RACKHD_BOSH_DIRECTOR_IP}}
bosh delete deployment {{NAME_OF_RUNNER_DEPLOYMENT}}

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

- instances: 0
name: cell_z1

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.

Steps:
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:
Diagram7

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 cloudfoundry.slack.com in the #bosh-rackhd-cpi channel. I can also be reached by email at victor.fong@emc.com or on Twitter @victorkfong.

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

Leave a Comment

Comments are moderated. Dell EMC reserves the right to remove any content it deems inappropriate, including but not limited to spam, promotional and offensive comments.

Follow Us on Twitter

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.