Node.js Love, PaaS Providers, Deploy – Part 3 with Cloud Foundry Using Tier 3

By Posted in Engineering, Top Post 17 October 2012

Are you interested in our soon to be released Node.js agent? Let us know and we’ll keep you in the loop!

In my last two posts, I covered Windows Azure (Part 1) and AppFog (Part 2) for deployment of Node.js applications. In this third post, I’m going to dive into deployment onto a Cloud Foundry enabled PaaS (not to be confused with Cloud Foundry.com).

These days I work for Tier 3. And we’ve built a great offering around Cloud Foundry technology called Web Fabric. With a Tier 3 account, you can spool up an entire PaaS as needed. So before we get to deployment, we’re going to make one small detour as I review the steps I took to get this PaaS environment.

First, I logged into my Tier 3 account and clicked Fabrics. There I could see other Web Fabric PaaS environments currently building. I wanted to build a completely new one, so I clicked create web fabric.

Tier 3: Control Portal: Web Fabric

A form popped up and asked for some basic information, such as login password for the environment and its name. In the image shown below, I chose newrelicsample as the name and clicked create web fabric.

Tier 3: Configuration Form

With that, my entire Web Fabric was built on top of Cloud Foundry! From here, the build out can take a while since there are multiple server instances and other things being built on the backend.

A status screen shows the results of the build out of the environment.

Tier 3: Blueprint Builder

Now let’s get something deployed to this Cloud Foundry environment. The most common way to deploy is with the VMC. But today I’m going to use an alpha project built by Iron Foundry Organization for OS-X called Thor. For right now, you have to clone the code to run. However, this is super easy and well documented in the README.md. (The app will soon be available as a full V1 product.)

For this deployment, as with the other parts of the series, I’m using the same application to push out to the PaaS environment. This application is the Coder Wall Demo I have on Github. It includes the blog articles on how I put it together in Part 1 and Part 2.

Open the app with Thor. (With the Alpha, that means opening the project in XCode and running it from there.) Next you’ll see this very simple application screen.

Thor application screen

The Apps tab should already be selected. Click the New button on the bottom of the screen to create a new app deployment. Next a dialog box will appear. Select where the repository is cloned on your local machine, give it a name and click OK. The application now appears in the list of applications.

Thor Add App screen

Click the Clouds tab and then click New. This will add a new cloud where the application will be deployed to. In the example below, I’ve entered the information for the cloud from the Web Fabric PaaS I deployed in the Tier 3 environment.

Thor: Add Cloud

The information for the target URI is shown in the Tier 3 control panel.

Tier 3 Control Panel: New Relic Sample

Once you click OK,  you’ll see the cloud displayed in the window.

Thor: New Relic Sample

Now click the Apps tab. Click on the application and then click on the New deployment row.

Thor: App: WallofCode

A dialog box appears and lists the clouds that are available for you deploy to.  If there are multiple PaaS environments, they will be listed here as well. This tool supports all Cloud Foundry enabled PaaS environments. (A growing list, which includes AppFog, CloudFoundry.com and many others.) It will also work against any internal or private Cloud Foundry PaaS environments. Just point it at the PaaS and use.

Thor: Deploy to cloud: New Relic Sample

Click on the cloud. Then click Next and the options will be provided. Keep the default options and click Done.

Thor: Create deployment

After a few seconds, the application will be deployed and displayed in the deployment screen.

Thor: Deployments screen

And that’s it! You’ve deployed your application to a Cloud Foundry PaaS with Thor.  For more information on using some of the traditional mechanisms like the CLI called VMC, check out the related getting started material.

In my next write up, I’ll be talking about deploying to Nodejitsu.

About the author

Adron Hall is a jovial, proactive, test & code, code & test, get things done well, software architect, engineer, code monkey, coder, and distributed systems advocate. As a coder, Hall plies a polygot language path including C#, Java, JavaScript, and Erlang lately -- as well as Pascal, Basic, Visual Basic, C++, C, COBOL, RPG, CL, and others in the past. He founded Deconstructed.io with Aaron Gray, Node PDX with Troy Howard, and more startups are in the works. You can read his blog at Composite Code (http://compositecode.com).

Tell us your thoughts Or Send us an internal high five

Talk to @newrelic