Welcome to Part 2 of my series on Removing the OS Barrier with PaaS. In Part 1, I covered the Platform as a Service (PaaS) product based on Open Source Software (OSS) Cloud Foundry and the .NET fork called Iron Foundry. In this entry I want to dive into some of the various parts, configuration, and setup of these products.
Running with Cloud Foundry
The easiest way to get up and running with Cloud Foundry is to use one of the existing services that use Cloud Foundry such as AppFog or CloudFoundry.com. But I’m not going to take the easy route. Instead I’m going to dive into getting some real instances up and running. I will however talk more about AppFog, Tier3/Iron Foundry and Cloud Foundry services in a later part of this series.
Another thing to be aware of is the difference in Cloud Foundry sites. They’re working with and for the open source project, but one is http://www.cloudfoundry.com and the other is http://www.cloudfoundry.org. The .org site is setup around organizing the Cloud Foundry OSS project, while the .com site is setup around advocating, community, and future offerings of the Cloud Foundry service. While working with the Cloud Foundry product, there are times I refer to the .com or the .org. In these situations, I will write Cloud Foundry and postfix the name with .com or .org.
Getting the Ops in DevOps
Unless you want to go the completely manual path, the first thing you’ll need to do is sign up for an account. (See the instructions below if you want to install things yourself.) I’d highly suggest signing up so you can participate, or at least lurk, in the Cloud Foundry community forums. (Don’t worry – the VMware and Cloud Foundry teams won’t spam you.) If you’re working with the .NET stack, you’ll also want to dive into the .NET Iron Foundry forums.
If you’re interested in the path of least resistance and just want to deploy something as soon as possible, signup and then download the pre-configured image that’s available on the Cloud Foundry site.
Once you’ve checked out those sources, you’re ready to install things manually to learn all the nitty gritty details or have downloaded the VMware image to get started deploying. (If you’ve done the latter, skip to the Targeting for Deployment section.)
CloudFoundry Manual Setup
First you’ll need to get an Ubuntu 10.04.2 Server 64 bit OS image. You can download that from Ubuntu or directly. Once the download is complete, build a virtual machine with the image.
Troubleshooting Tip: Whatever virtualization software package you’re using to get your image up and running, you’ll want to set your network configuration to NAT instead of Bridged. This is a very common practice to resolve issues that often occur.
Once the Ubuntu server image is booted up and running bring up a terminal to complete the following process. Open up a terminal to issue commands by clicking on CTRL + Alt + T or navigate through the menu Application -> Accessories -> Terminal. The first thing we’ll need is to update the apt-get with the following command in the terminal.
sudo apt-get update
Once apt-get updates, then install the open ssh server with the following command.
sudo apt-get install openssh-server
The next step is to run the automated setup process. This process will take some time, probably 45 – 65 minutes depending on power and speed of the VM. To get curl and run the automated installer code, execute these commands.
sudo apt-get install curl
bash < <(curl -s -k -B
In the near future this automated installation code will be replaced by a Chef recipe. (It works well today too, so don’t hesitate to give it a try.)
Now connect to the system with SSH. First get the IP of the Linux Machine with ifconfig.
Open a terminal in Mac or Linux (or if you’re using Windows you’ll need something that executes SSH connections such as PuTTY). Now you can connect with your system account and the IP number.
The machine will then connect, request your password, and show the login information.
Now create a local port tunnel.
sudo ssh –L 80:192.168.108.141:80 firstname.lastname@example.org -N
Just to become more familiar with the setup, check out the directory for Cloud Foundry now. A simple ls and cd will provide a list for your review.
The cloudfoundry directory exists within the ~ user directory, while there is a vcap directory within the cloudfoundry directory. If everything looks in order, we’ll keep moving. At this point, we’re at the point the prepackaged VM available from the cloudfoundry.com site.
Now target your Cloud Founry Ubuntu Instance with the following command and take a look at information about the instance.
vmc target api.vcap.me
The final step in getting the manual setup completed is adding a user. Issue the following commands and the instance will be all set.
vmc register -email yourAddy@someplace.com –passwd somePassword
vmc login -email yourAddy@someplace.com –passwd somePassword
- Create a private micro Cloud Foundry instance with the downloaded virtual machine
– Create a public micro Cloud Foundry instance with the downloaded virtual machine
– Use the manually created instance that we built with the instructions above
Private or Offline Micro Cloud Foundry
The idea behind the private micro Cloud Foundry instance is if you’ll be offline or disconnected for some reason or another. With a private or offline instance you can develop anywhere, such as with a simple MacBook Air running your development environment and the micro Cloud Foundry virtual machine you’ve created.
The really great thing is that the micro Cloud Foundry instance requires a very small resource imprint. Some have even run Cloud Foundry on the small 256 MB RAM w/ 10 GB Disk instances at Rackspace with great results.
Instead of just reproducing instructions here, check out the Cloud Foundry blog entry Working Offline with Micro Cloud Foundry for step-by-step instructions to get running.
Public Micro Cloud Foundry
This configuration is setup around being able to always get to the micro Cloud Foundry instance from an Internet accessible machine. This is a great way to setup an instance for experimenting with network configurations, routing, or other things you may need to customize per a specific environment.
To get setup with a public micro Cloud Foundry instance check out the Cloud Foundry quick start article Micro Cloud Foundry Installation and Setup.
.NET and Iron Foundry on Windows 2008 Server
Windows 2008 Server Iron Foundry, the .NET Cloud Foundry fork, will be available in the coming days and posted on the Iron Foundry blog. So keep reading and I’ll have more information about Iron Foundry, Cloud Foundry, and the related necessities to get .NET up and running in the Iron Foundry PaaS!
In this entry we’ve covered a lot of topics and target points for Cloud Foundry. With this basic knowledge around the installation and setup of Cloud Foundry an environment can easily be setup on AWS, Rackspace or any environment with virtual instances. In addition, nothing is there to prevent this from being done on systems that are running directly on hardware.
In my next entry, we’ll step into actually getting some deployments moving forward so that we can get a view of the real power of Cloud Foundry. So keep reading and Part 3 of Removing the Operating System Barrier with Platform as a Service will be coming to you in two weeks!