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.
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.
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.
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.
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.
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.
The information for the target URI is shown in the Tier 3 control panel.
Once you click OK, you’ll see the cloud displayed in the window.
Now click the Apps tab. Click on the application and then click on the New deployment row.
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.
Click on the cloud. Then click Next and the options will be provided. Keep the default options and click Done.
After a few seconds, the application will be deployed and displayed in the deployment 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.
Sign up here. It's free, so why not?