IaaS vs. PaaS or Infrastructure vs. Platform and I Want Beer NOW!

A friend and now coworker of mine, Richard Seroter (@rseroter & Blog) decided to do a comparo. I took the infrastructure based deployment, ala IaaS and he took the platform based deployment, ala PaaS. What we’ve done is taken a somewhat standard ASP.NET MVC with Entity Framework, a SQL Server Database, a UX & UI design and got it running locally. From there we then deployed the same application the two respective ways to deploy the web application to a live environment. He took the Tier 3 PaaS (Iron Foundry + Cloud Foundry for the win) and I took the tried and true method of deploying via Windows 2008 Server instances via the Tier 3 Infrastructure.

Here are the steps I went through and for his steps check out this blog article on the PaaS deployment.

Part #1 – Get Some Servers Setup

First things first, I need two instances. If you’re following along, you can basically use whatever instances or server you want. AWS, Rackspace, or Windows Azure. Based on that there may be a few steps here or there you may need to alter, add or subtract from the process. One for the ASP.NET MVC Application and one for the SQL Server Database. The web app server doesn’t need a ton of resources, so I built it and scaled back RAM and cores to a single core.

ASP.NET MVC Web Server
ASP.NET MVC Web Server (Click for full size image)

In the next step here I’ve selected additional software to be installed on the instance. I’ll need .NET 4.0 so I’ve added this as shown.

Selecting .NET 4.0 for Addition to the Instance
Selecting .NET 4.0 for Addition to the Instance (Click for full size image)

After setting up the web server I also setup a database server. For the database server I made sure to allocate some decent resource, setting up 2 cores and 8 GB RAM. I also added the SQL Server installation based on Tier 3’s software packages so it would install automatically when the image is created.

All My Instances Running
All My Instances Building & Running (Click for full size image)

When I setup the SQL Server instance, I used a blue print feature that allows the SQL Server to be installed directly on the image. This of course saved me a lot of time. But it does add to the deployment time of the instance in the cloud.

Part #2 – Setting up Windows Server 2008

The first thing we’ll need to do is log into these machines and configure them, standard infrastructure stuff. Open up the Server Manager (which launches automatically on instances) and verify that we have IIS installed on the web server.

Database Server

Server Manager
Server Manager (Click for full size image)

Next log into the database server and verify that the SQL Server is up, running and create the initial database.

Thusly…

Using SQL Server Management Studio checking that the SQL Server Exists
Using SQL Server Management Studio checking that the SQL Server Exists

Once I had both of the servers up and running I got the application ready to deploy. First a little schema generation to use to deploy the database.

Don't Use "Script Database as..." option, use the "Tasks" option...
Don’t Use “Script Database as…” option, use the “Tasks” option…

Once the script is generated then transfer it and execute it against the database on the database server.

Execute the SQL Schema Create Script
Execute the SQL Schema Create Script (Click image for full size)

Always a good thing, even if all green lights are seen on the SQL execution, go in and make sure the tables are all there.

Web Server

Publish
Publish (Click Full Image)

Publish Application (click for full size image)For the web server, as long as IIS is already installed, the setup is fairly easy. First snag the compiled bits that need deployed. We’ll do a direct drop onto the server and get it running.

To get the compiled bits, right click on the Visual Studio Project and select publish. Add a deployment scenario, which I did and set it up to just spit the bits out to a directory. There of course a multiple options at this point to use FTP, WebDav or whatever your choice is. I’m not a particular fan of any of those in particular, they’re all fairly easy.

Deployment Publication Options
Deployment Publication Options (Click for full size image)

Interuption!!!

At this point I actually got hit with the “.NET 4.0 isn’t installed…” which it should have been. I opened up windows update and realized that it had not successfully executed nor had the .NET 4.0 install. This happens with all sorts of instances, regardless of provider, so make sure that the bits we need are installed. Also, with Windows, it’s a really good idea to get windows update turned on.

Back to Deployment

Now that we have the built bits just copy them onto the web application server into the inetpub wwwroot directory. Once you have that copied over you would be able to navigate to the IP of the machine this is setup on. At this time you may also want to setup a cname or a-record to point to the IP, so you can use a friendlier URI.

Retrospective

Now think about what has just gone on for a moment. We had to literally build out machines, add software and more. There were a lot of steps. This takes anywhere from 30 minutes to a few hours of actual work. In a larger business or an enterprise environment it could get extended out even further. Because of the extra complexity it could also end up broken, requiring extra troubleshooting and coding. There could even be a host of odd one off configuration issues with the hosting software itself.

Imagine you wanted to host an ASP.NET, PHP, Ruby on Rails and a Node.js App on the Server. That would be almost impossible. Consider how much extra configuration knowledge an ops person would need to troubleshoot each one of those frameworks. Just sit back and contemplate the complexities involved for a moment. All the complexity goes away with something like Cloud Foundry or Open Shift. With someone managing that system for you, such as us here at Tier 3 with our Web Fabric PaaS, AppFog, Cloud Foundry, or one of the other providers even more of the complexities just disappear.

Time for Summary & Beer

With all the steps and individual tasks needed to get something running in an IaaS Environment, go check out how slick getting something up and running with a PaaS style environment. The juxtaposition between what Richard had to go through versus what I had to go through is pretty significant. Simply put, for the vast majority of all application development can be done against a PaaS Environment and likely should. Digging deeper into the infrastruture elements is rarely needed except in rare scaling circumstances, such as the volume that Facebook, LinkedIn or Netflix deal with. Even then, as has been stated by these companies, they have a PaaS of their own they often build software to. So why not have this ability where you build software?

One of my key metrics, and I’ll be elaborating on this metric more in the future, is when I get to head out of the office for the day, relax, have a beer, and think about what I’ll get to create next. I call this my “Beer Enabler Measure“. PaaS technologies make it much easier for me to get to the relaxing part of my day a lot faster than IaaS technologies, and both of these make sure that I’m not pulling an all nighter without a beer like traditional hosting environments often do.

In the end, sure, infrastructure can be important and can help in transitioning legacy applications into an easier to manage environment. Today though, if you’re doing web application dev of any type, it should be deployed against a PaaS Environment either private or public.

Ruby 1.9.3, Iron Foundry + Cloud Foundry and++

Installing the Latest Ruby, A Gotcha

Generally, you’d just install rvm (Ruby Version Manager) and execute this command.

[sourcecode language=”bash”]
rvm install 1.9.3
[/sourcecode]

But alas, as happens sometimes, I ran into an issue related to the C compiler being found. Checking the log file for errors I found the message and went searching, finding an immediate solution thanks to good ole’ Stack Overflow. Simply executing the install with a specific C compiler will get things running smoothly.

[sourcecode language=”bash”]
rvm install 1.9.3 –with-gcc=clang
[/sourcecode]

Installing the Latest Ruby on Windows

This part is pretty stupidly simple. Just download the installer and execute it. Once you’ve done this you’ve got all the gem bits and ruby bits you need to get the CLI for Cloud Foundry w/ the Iron Foundry .NET Additions!

Installing the vmc-ironfoundry CLI App

Why am I installing Ruby 1.9.3 besides the obvious fact that it is Ruby, and awesome, and inherently great for getting shit done? I need the latest bits in order to install the latest Iron Foundry vmc client! You may ask, what’s wrong with the vmc client that Cloud Foundry has made? Well, the .NET bits aren’t included to appropriately identify when you have a .NET application. Basically, the vmc client is the exact same one that the core Cloud Foundry team puts together, but with the additions to know that there are Iron Foundry DEAs that can launch and run .NET Web Applications. To install this, execute the following command on OS-X.

[sourcecode language=”bash”]
gem install vmc-IronFoundry
[/sourcecode]

If you ever run into the

“Could not find a valid gem ‘vmc-ironfoundry’ (>= 0) in any repository”

a quick call to update will usually resolve the issue. You may need to run this command with sudo, to insure you have access to the gems directory.

[sourcecode language=”bash”]
sudo gem update –system
[/sourcecode]

Summary

At this point you can deploy a ton of languages and frameworks in addition to having .NET & SQL Server Support. I’ll be following up this with a how-to on deploying an ASP.NET 4.0 MVC Application, Node.js, and Ruby on Rails Application, scaling them to multiple instances, and best practices around that in the next month or three. In addition to that, I’ll have some great material coming up regarding some practices around getting these frameworks to work well together against data sources, across end points, via services and more.

Ok, Let’s Get Some Definitions & Operational Models Straight Here! PaaS is NOT…

I just got signed up for Cloud Connect Chicago and started checking out some of the talks. One talk jumped out, being that it is about PaaS Technology. After reading it though I immediately felt the need to straighten out some things that looked misleading. Maybe the presenter (JP Morgenthal) will lay these things out well for the attendees, but at this point I don’t know that. I’m making a point to see this session while I’m at Cloud Connect. I’m curious to see how he lays out the content. Here’s the description for the “Navigating PasS: Your Road Map for Application Development“. Hopefully I’ll see you there!

Platform-as-a-Service (PaaS) has most simply been described as the set of tools above the infrastructure (hypervisor) and contains the applications being served out of the cloud. However, this description covers a large body of resources. Navigating the use of PaaS for application development and delivery requires a very wide understanding of the computing environment and doesn’t fully relieve the user from understanding the infrastructure that is used to operate the PaaS.

Hypervisor + PaaS, You’re Doing it Wrong

First off, the thing that really caught my attention about this session is that it sounds like someone from a very specific company trying to sell a very specific thing wrote this initial description. A PaaS, or Platform as a Service does NOT have to run on an infrastructure hypervisor. It has ZERO association to a hypervisor. All a PaaS should do, ought to be, and generally is regardless who it is made by or who is running it, is a set of software that automates deployment, application distribution to systems serving the application, and generally simplifies the deployment of an application and to some degree databases or data repositories. There is, and should NOT be, any type of coupling, especially any tight coupling, to some hypervisor.

In summary, a PaaS should have zero to do with a hypervisor. It should rely on a simple operating system that has minimal resource overhead and minimal requirements. Take Cloud Foundry or Open Shift. They rely on some of the most capable operating systems, Red Hat Linux (RHEL) and Ubunut LTE to run the PaaS Systems. These are by far some of the best choices in the industry to determine the core of where a PaaS should run. Based on this, it is an operating system, at the core that enables these systems. NOT a hypervisor. If you’re looking to base your PaaS System off of a hypervisor, I’m afraid you’ll have made a severe mistake right off the bat.

Now if you put your Red Hat or Ubuntu OS on a hypervisor, or straight on the metal, you’re fine. Just don’t cross the seperations of concern from the operating system to travel from PaaS to hypervisor. That’d just be…

wrong.

What I Agree With, You Better Understand IaaS

One thing I agree with in the above description and I’m betting JP will put some emphasis on this part of the discussion, is that you absolutely need to have an understanding of your infrastructure that runs underneath your PaaS. There are a multitude of reasons to keep in mind what the infrastructure is doing underneath and how it handles what you’re deploying to your PaaS. Here’s two hugely important topics of concern when you deploy a PaaS into any environment.

  • When an application deploys to multiple instances. What does that mean in your PaaS? Is it on several separate instances? Is it in different geographical areas? Does it go under a different load balancer? How is my database deployed? If you’ve deployed a NoSQL solution, that needs multiple nodes for data integrity, do you know how many nodes are deployed?
  • If I deploy a site to my PaaS, how will it and can it talk to itself or outside via networking? Do I have loop back protection on for security? Will it disallow certain port traffic? What is happening to port traffic and traffic in general?

It looks like the session will cover a lot of these topics. So if you’re looking to attend, I highly suggest checking out JP’s session. I’ll be looking forward to his approach to many of the other topics (check out the site description) such as those I just mentioned along with security, deployment concerns, deploying a single language PaaS (like Apprenda, Cloudbees, etc) and other solutions. In addition to that, I’ll likely be bringing an arsenal of questions, see you all and JP at Cloud Connect!

Day #1 => Cloud Expo & Cloud Bootcamp

Thanks to Larry Carvalho and Krishnan Subramanian for lining me up to speak at the kick off bootcamp keynote and for a PaaS Session at the Cloud Expo Boot Camp. I had a great time and was able to cover some great material with the audience. It was great to hear a number of companies and people diving into PaaS Technology and learning about what this technology can do.

The audience, above all was very open to the idea of openness with technologies that are open. See the theme there? 😉 There were a few resounding themes to things people would like to see added to the Open Source PaaS Solutions such as Cloud Foundry, Iron Foundry and Open Shift. Here are a couple of these;

  • People want to have continuous deployment or continuous integration features added to the PaaS Capabilities so that the PaaS doesn’t just deploy code blindly. The two companies that came up that have some capabilities around continuous deployment and integration are AppHarbor and CloudBees. But the stronger ask from the audience was for there to be some type of integration with one of the open offerings like Cloud Foundry or Open Shift. Some discussion also followed around these capabilities being a default “service” within a PaaS or even IaaS offering.
  • The other thing that brought up a lot of questions was the architecture behind the various PaaS Solutions. I walked the audience through a description based on what I wrote up in “Cloud Foundry Architecture – Removing the Operating System Barriers with PaaS Part 4“. It generally tends to fit similar architectures in the PaaS realm and most of the audience liked the idea of how PaaS operations are working.
If you attended either of my talks and want to check out the PaaS Providers that came up during questions and discussions, here’s the one’s I can remember:
  • Tier 3 – Enterprise grade IaaS and PaaS w/ the Web Fabric Product. This company I currently work for, they’re doing a rock solid job with the offering.
  • AppFog – Very application focused and IaaS autonomous, i.e. you can pick AWS, HP Cloud, or Azure with more options to come in the future. I’ve worked with these guys also and they too kick ass!
  • AppHarbor – .NET focused PaaS running atop AWS, provides a free tier and continuous integration and rollback features. I haven’t worked for these guys, but I’ve met everyone on the team and they’re all top notch. Props guys! 🙂
  • CloudBees – Java focused PaaS with Enterprise focused CI/CD capabilities with Jenkins.
  • Heroku – These are the guys who kicked off the whole PaaS thing a few years ago. They started Ruby on Rails focused but also cover Java and Node.js too.
  • EngineYard – A solid PaaS offering running primarily atop AWS with some IaaS style features available too.
  • Windows Azure – Microsoft’s cloud offering, with a lot of updates around Node.js lately. They’ve traditionally focused on .NET, but lately have put as much or more focus on Node.js. Looks like things are improving in the Azure Camp.

More to come tomorrow with DeployCon at the Cloud Expo.  Until then, cheers.

An Open Source Software ala VMware Guide :: A.K.A. Get Clarity on Contributing to the CloudFoundry Project!

I’ve jumped into committing some source code to the Cloud Foundry Project and I wanted to document the process so far. The Cloud Foundry project is a little trickier than most open source projects, because there are a host of tools around the process. As that is the case, it isn’t a simple github repository with easy to push pull requests and other flows. Instead, there’s a trick to it all and that’s what this blog entry is about. These observations about getting a first pull request submitted:

  • The instructions, sort of, are located here for contributions: http://cloudfoundry.org/contribute There however seems to be some key parts missing from these (or I didn’t find them on any of the immediate links). The main one being any connection, information, or workflow around the internal git repository that they have setup. That should be more prominently displayed. Can I submit a pull request for the contributions page?  🙂
  • The github repository. I won’t beat around the bush on this particular observation. The github repository is almost entirely useless. You can’t send pull requests to it, nobody communicates around it, and all the existing pull requests are dead. It is a read-only repo of the internal git repo. So don’t look there for any key pieces of information – check the Google Groups and other information I’ve linked in this blog entry.
  • The real code base is in an internal git repository held by VMware that has a gerrit (code review) + Jenkins (awesome build server). This is actually a pretty slick setup. Albeit I admit this is absolutely more work for contributors. But when you got a hot potato you gotta pass around the pain (is that even an colloquialism? Probably not, so I just made it up).
  • There are some very useful google groups that you should sign up for if you intend to contribute code to Cloud Foundry.  This is where all the super smart and also friendly Cloud Foundry core team hang out. Even if you aren’t going to commit code, go sign up anyway. You’ll be able to get a lot of very useful information from these guys related to setting up, using, and deploying Cloud Foundry. http://groups.google.com/a/cloudfoundry.org/groups/dir
  • They also ask you to sign a document related to contributions located here: http://cloudfoundry.org/individualcontribution.pdf basically promising you didn’t steal someone else’s code and that you won’t sue VMware for making this code public.
  • The JIRA site (another account login you’ll need to setup, it is worth it to, so get one if you intend to commit code. Otherwise if you just want to lurk then don’t really worry about the JIRA site too much.)
  • Once you are logged in to the Google Groups you can hit this link: https://groups.google.com/a/cloudfoundry.org/group/vcap-dev/browse_thread/thread/af205159a17ec358 which actually has the best instructions I’ve found on getting a good clone and submitting a pull request via the gerrit command line tool.
  • Another more immediate way to get help is to bounce into IRC via freenode and join the #cloudfoundry channel. The core devs plus a number of other coders hang out in that room.

Getting it Cloned

Per the instructions above, the first thing you’ll need is the code base. You’ll need to make sure you have a gerrit account first and that you’ve submitted your SSH public keys to gain access. Then get the vcap code base via the gerrit CLI:

[sourcecode language=”bash”]
$ sudo gem install gerrit-cli
Password:
Successfully installed gerrit-cli-0.0.11 gem installed
Installing ri documentation for gerrit-cli-0.0.1…
Installing RDoc documentation for gerrit-cli-0.0.1…
$
[/sourcecode]

I left the results of the command in just for familiarities sake. The next command is to clone the repo gerrit style.

[sourcecode language=”bash”]
$ gerrit clone ssh://adron@reviews.cloudfoundry.org:29418/vcap
Cloning into ‘vcap’…remote:
Counting objects: 12253, doneremote: Finding sources: 100% (12253/12253)Receiving objects: 89% (10961/12253), Receiving objects: 89% (10961/12253), Receiving objects: 89% (10961/12253), Receiving objects: 89% (10961/12253), Receiving objects: 89% (10961/12253), Receiving objects: 89% (10961/12253), 247.05Receiving objects: 94% (11631/12
Receiving objects: 94% (11631/12253), Receiving objects: 94% (11631/12253), Receiving objects: 94% (11631/12253), Receiving objects: 94% (11631/12253), 548.27 MiB | 105
remote: Total 12253 (delta 6438), reused 11765 (delta 6438)
Receiving objects: 100% (12253/12253), 773.92 MiB | 311 KiB/s, done.

Resolving deltas: 100% (6438/6438), done.

Installing commit-msg hooks into ‘vcap/.git/hooks’.commit-msg
100% 2331 2.3KB/s 00:00

Installing tracked git hooks:

$[/sourcecode]

NOTE: This will likely take a long while for the vcap repo. It took me about 45 minutes to clone. That’s based on two seperate machines on two different fast internet connections with two different operating systems.  So just be patient.

Then just cd vcap into the working directory and create your changes. Once the changes are committed then pull the latest, merging again if needed, and then push the pull request via the following command.

[sourcecode language=”bash”]
$ gerrit push[/sourcecode]

Once that is done your pull request will be put into the continuous integration build queue. Then someone from the core team will up vote your code or deny it with reasons. You can check out the status:

The OSS-Docs are located on Github, check those out here. They’re not super complete, but the information they do have in them is pretty solid. So check these out while hacking:  https://github.com/cloudfoundry/oss-docs.

In my next write up about my efforts with Cloud Foundry, I’ll dive into what I’m pushing and what for. So keep reading, I’ll be back with more good bits.