East & West Coast PaaS, Being Polyglot, Reply to Dan Turkenkopf

Dan (he’s a good guy, check him out on Twitter @dturkenk), your “East Coast vs West Coast PaaS Psychology. And Why It Matters.” is great write up. Loved it! I’ve got to say, I’m pretty much in agreement with almost every single thing you’ve written here. Matter of fact I’m staunchly in agreement with a lot of it. There’s a few other abstractions I’d like to add, that makes the reality of east coast and west coast PaaS what it is, and why some of these things are like this.

You write,

“While the West Coast conception of PaaS is an appealing vision, (and may well be the answer for many smaller companies and start ups)…”

which I agree with whole heartedly. The fast, agile, and lean companies of tomorrow need this type of technology today. They can’t survive trying to throw together traditional environments. They need PaaS like people need food and water. However you also write on the end of that statement,

“it doesn’t really mesh with today’s enterprise reality.”

which I know is true, sometimes. There are however many enterprises out there that do indeed want to and are starting to move over completely. These enterprises see the value add and are not waiting around. They’re not going halfway with a hybrid solution, they’re moving full bore and realizing economies of scale that internal IT shops will not and cannot realize.

This type of enterprise, is where a lot of the west coast and east coast mentality is realized. There is a risk aversion on the east coast, rightfully so with such things as financial institutions and Government being a dominent presence on the east coast. On the west coast though, the enterprises operate under a very different cultural perspective, they attempt to realize the advantages – competitive and disruptive that they are – of startups and small business. It’s as much a competitive survival for the west coast enterprise as it is for the startups and small business. Thus, we get some of the differentiators not just in technology, but in the enterprises themselves. This is the core of this psychological difference, not something that was born from a PaaS psychology, but for the ore business itself. Being that PaaS technology and its origins are from the west coast, it becomes obvious why most are focused on public or privately accessible public infrastructure.

Overall, the culture expands into all those sectors in the east and west, and starts to stand out when we look at different approaches to doing business and competing. Regardless of these minor differences and the associated differences in doing business, we both agree on one thing regardless of which coast we’re on.

The applications and application developers is where the value is for enterprises, mid-size, and small businesses, and startups.

Without doubt, PaaS technology is focused on that core value. Enabling developers to build applications in an easier, faster, scalable and more reliable way. So far, all the platforms are doing a damn good job helping us developers do just that.

Deploy a Framework Friday #3 with node.js + express.js

Time for the node.js “Deploy a Framework Friday”. First get node.js and express.js installed (i.e. npm install express) and then create your node.js application.

adron$ express nodejs

   create : nodejs
   create : nodejs/package.json
   create : nodejs/app.js
   create : nodejs/public
   create : nodejs/public/javascripts
   create : nodejs/public/images
   create : nodejs/public/stylesheets
   create : nodejs/public/stylesheets/style.css
   create : nodejs/routes
   create : nodejs/routes/index.js
   create : nodejs/views
   create : nodejs/views/layout.jade
   create : nodejs/views/index.jade

   dont forget to install dependencies:
   $ cd nodejs && npm install

Once the app is installed open up the app.js file and edit the code so that it reflects what is shown below.

var express = require('express')
  , routes = require('./routes');

var app = module.exports = express.createServer();

// Configuration

app.configure(function(){
  app.set('views', __dirname + '/views');
  app.set('view engine', 'jade');
  app.use(express.bodyParser());
  app.use(express.methodOverride());
  app.use(app.router);
  app.use(express.static(__dirname + '/public'));
});

app.configure('development', function(){
  app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});

app.configure('production', function(){
  app.use(express.errorHandler());
});

// Routes

app.get('/', routes.index);

// Cloud Foundry Environment Variables
var port = (process.env.VMC_APP_PORT || 3000);

app.listen(port);
console.log("Cloud Foundry Demo Express server listening on port %d in %s mode.", app.address().port, app.settings.env);

The emphasis is the port variable added for the VMC_APP_PORT. This variable is needed by the Cloud Foundry system to know which port that node will use to host on, which Cloud Foundry will then intelligently map to so you will get the standard default port 80 activity you expect. For more information about all this hosting mess with node.js check out one of my previous write ups on the topic on the New Relic Blog.

Once you’ve setup this file, then just deploy using the with npm support option that states the version of node.

vmc push --version=node06

For more information about deploying node apps with npm module dependencies check out this blog entry on “Cloud Foundry supports node.js modules with NPM“.

All done. Yes, there is more Deploy a Framework Fridays coming up, so stay tuned!

OSCON Day #3, #4, and Friday => Bailey’s Taproom, Cloud Camp, Cloud Foundry, Open Shift, PaaS, vert.x, and so much more…

Tuesday night, as usual ended with great technical conversation at Bailey’s Taproom. Bailey’s is basically the epicenter of the Portland tech scene. Almost every programmer, devops, or technical person either goes about once a month or has this establishment as a regular watering hole! It’s great, the atmosphere is chill, the beer is SUPERB, the beer menu kicks ass (see: Beer Dashboard Kick’s Ass) and the list of fun cool things just continues on and on.

This week of course OSCON adds a little spice to the regular roll call at Bailey’s. There were a number of conversations that broke out, which I’ve broken out the key topics below:

vert.x => To summarize as is written on the site itself, “Write your application components in JavaScript, Ruby, Groovy or Java. Or mix and match several programming languages in a single application. Create real, scalable applications in just a few lines of code. No sprawling xml config. Scale using messaging passing and immutable shared data to efficiently utilise your server cores. Super-simple concurrency model frees you from the hassles of traditional multi-threaded programming.

Here’s an example from the site in a few of the languages:

Java

import org.vertx.java.core.Handler;
import org.vertx.java.core.http.HttpServerRequest;
import org.vertx.java.deploy.Verticle;

public class Server extends Verticle {
    public void start() {
        vertx.createHttpServer().requestHandler(new Handler() {
            public void handle(HttpServerRequest req) {
                String file = req.path.equals("/") ? "index.html" : req.path;
                req.response.sendFile("webroot/" + file);
            }
        }).listen(8080);
    }
}

JavaScript

load('vertx.js')

vertx.createHttpServer().requestHandler(function(req) {
    var file = req.path === '/' ? 'index.html' : req.path;
    req.response.sendFile('webroot/' + file);
}).listen(8080)

Ruby

require "vertx"

Vertx::HttpServer.new.request_handler do |req|
    file = req.uri == "/" ? "index.html" : req.uri
    req.response.send_file "webroot/#{file}"
end.listen(8080)

Wednesday Roughness

I felt beat up a bit start Wednesday, but rolled into it after a short while. Needless to say, the intensity of conversations (and maybe a few of those rounds of beer) and number of ideas, new things to check out and fitting it all in can wear one out.

The morning sessions were solid, I attended most of “Comparing Open Source Private Cloud Platforms“. Lance did a solid job of laying out the tooling, virtualization software and where these things come together to form a number of OSS options for cloud computing. Check out more from Lance on his @ramereth, his blog Lance Albertson, or check out his band he’s in “The Infallible Collective“.

Wednesday, Thursday and Friday Meets

I met a ton of people. All of whom I must say, I hope to get to talk to again, work with on projects, or just sling some code sometime. Absolutely great people, friendly, intelligent and highly motivated. Some of these people I met included:

Andy Piper (@andypiper) – Part of Great Britain’s contingent of VMware Cloud Foundry advocates and such. We got to hang out and talk about a zillion different topics at a number of events. Andy was kind enough to show me a few tips and tricks he’s been using with Cloud Foundry, the VMC, and in general working with the platform.

Josh Long (@starbuxman) – I met Josh once before on the Cloud Foundry open tour, where he brought COBOL programming… oh no wait, he brought some great Sprint Java samples and such to demo on the Cloud Foundry Platform. I fulfilled Josh’s dreams by telling him that COBOL, could indeed run on Cloud Foundry thanks to the .NET capabilities of Iron Foundry! (ya know, if anybody is into that type of thing)

Erica Brescia (@ericabrescia) – I finally got to meet Erica in person, after chit chatting on Twitter about all the great applications her company Bitnami helps to deploy in the cloud. There are some really great deployment hosting solutions from them, check them out if you’re looking for some streamlined deployment practices. She also mentioned I need to meet…

Jono Bacon (@jonobacon) – I managed to meet Jono by randomness. He’s, well, let’s say he does some absolutely great work in the tech industry for Canonical and in the open source universe. In addition Jono has some superb tastes in music.  \m/  \m/  Check out some of his work:  Blog, personal site, and you can probably google him too. Do it, he’s got a lot of great material out there.

As I was saying, these aren’t the only people that I met. To all those people I didn’t mention, it was awesome hanging out, catching up and hearing about what everyone is working on and creating.

PaaS, IaaS and The Driving Open Source Coders

On the topic of PaaS, it continues to expand into new realms of publicly (or privately) run services. PaaS is quickly expanding past mere framework services around .NET, PHP, Rails, Sinatra and such and moving into the realm of databases, services buses, and other capabilities as a service. As laid out with the SOA mindset. Even though enterprises failed to bring SOAP to an effective worldwide use, RESTful services are expanding rapidly. *aaS is pushing those even further, to do what the enterprise had wanted but failed to do. Creating a universal acceptance of scalable, powerful, expandable and extensible services through APIs.

As more services are extended we’ll start seeing a lot of offerings around truly scalable databases with various feature sets around those databases offered as a key service. Examples would include “atomic database as a service”, “transactional data store as a service”, or “document store as a service”. In the end it will include the amount of usefulness for the services while eliminating a need to know each in intimate detail. Knowing the core capabilities of an option and just using the service will grossly outpace the attempt to implement these services internally.

So keep watching PaaS to grow in many various ways. Consuming the service being the driver over attempting to build the service. Of course, if the service doesn’t exist, get on that it’s business opportunity!

Random OSCON Diversions

I had a great time visiting with family while at OSCON also. To whom they all send a hello and horns up, thrash on salute to the coders of the world!

Voodoo Donut Break with Florida Family Contingent

Voodoo Donut Break with Florida Family Contingent.

My brother Adam, the IT Department

My brother Adam, the IT Department

My Brother Runs an IT Shop of One…

…thanks to cloud computing capabilities.

This kind of blew my mind. I sort of of knew what he did, but it didn’t hit me how close our professional lives are until this trip. He’s just recently moved several hundred miles away from the main office, but still manages the entire company.

One of the unique happenstances is, my brother (the guy next to the bald guy that is me, he’s wearing a Tesla t-shirt) is the top IT guy for a little billion dollar a year company. Which, in this case, he’s proven the power of cloud computing. Why do I say this? Because traditionally this organization would have needed an army of PC techs, network knob fiddlers, and such. But with the advantages of cloud computing, both on premise and off premise, and have a DevOps Guy that knows what he’s doing they are able to efficiently run their entire company with one single guy.

Needless to say, with the synergy of OSCON we had more than a few conversations around tech. Some of those included the replacement of PCs with mobile devices, such as iPads or smart phones. Another was the mix of on-premise data that couldn’t easily be transferred or utilized form cloud services. These are just a few fo the things that have helped him to run the show, the entire show.

Summary

OSCON was awesome. Next time I will be taking off a day or two before and a day or two afterwards so that I can do an even more elaborate write up of the event. My aim is to have interviews, video and otherwise, and really step it up in relation to providing an eye into the event from a developer’s point of view.

Deploy a Framework Friday #2 with ASP.NET MVC 4

First let’s build a standard ASP.NET MVC Application (yes, you can do the same without the MVC Project, but I STRONGLY recommend never creating a standard ASP.NET application again, EVER). This quick run through assumes you’ve already setup a Cloud Foundry enabled PaaS w/ your already installed Iron Foundry components for .NET development. Get an Iron Foundry enabled account here, it’s 100% free, so no reason not to give it a go.

There are a few ways to do this. One, the click on the start page new project option.

Click on the start page new project option...

Click on the start page new project option…

Two, the menu based selection option.

Menu based new project option...

Menu based new project option…

Three, the command button option.

Click on the command button new project option

Click on the command button new project option

So pick your poison and then select the ASP.NET MVC 4 Project Template. On the next dialog, you’ll enter the information of where the project will go and choose the ASP.NET MVC 4 Web Application Project Template.

Selecting the ASP.NET MVC 4 Web Application (Click for full size image)

Selecting the ASP.NET MVC 4 Web Application (Click for full size image)

The next dialog select the Basic template, leave Razor selected, and I always leave the unit tests project there also. Once this is done we’re now ready to give our project a little taste of deployment.

Since we’re working in the land of GUIs and .NET, I’ll keep this to a completely GUI based deployment. However, don’t forget that the vmc-IronFoundry is available for pushing also. So don’t fear the CLI, but we’ll skip it for now (tip: It’s practically the same as the other deploys).

On the project in Visual Studio right click and select Push to Cloud Foundry.

Publish option on the context menu (click for full size image)

Publish option on the context menu (click for full size image)

A dialog will appear for the basic parameters needed for the deployment. Enter information that you need for your application and click ok.

Setting the parameters (click for full size image)

Setting the parameters (click for full size image)

Now when you navigate to your cloud in the Cloud Explorer UI (Start -> All Programs -> Iron Foundry -> Cloud Explorer) you’ll see the application running under that cloud environment.

As always, it is indeed THAT easy when using a Platform as a Service to deploy to!

OSCON 2012 => Monday Ignited, Tuesday OpenShift Session ++

OSCON 2012 Opening Doors

OSCON 2012 Opening Doors

Today kicked off with a monster Reggie Biscuit from Pine State Biscuits. If you live in Portland or are visiting just for the conference and like soul food of the tastiest nature, check it out.

My first day ended up not as planned. Instead of attending sessions I ended up meeting a number of people and discussing the future of Cloud Foundry, where it is headed and in general, the direction of PaaS Technologies. I met Andy Piper (@andypiper) and Raja Rao (@rajaraodv) and discussed Node.js and Cloud Foundry specifically. We then dove into trying out some of the CLI features in the latest VMC builds.

After that I met Mark Atwood for a brief few moments. As always, Mark’s a friendly guy, and might I add pretty smart too. I’ve enjoyed our conversations in the past during the AWS Meetups in Seattle too. He’s always got interesting thoughts and perspectives on open source, linux and now on PaaS Technology too. Ya see, Mark has become the Red Hat OpenShift Advocate. It’s a perfect fit, as Mark loves this stuff!

Ignite!  ….or Bailey’s for more tech talk and #nodejs discussions.

After all of this I almost, and had planned, to attend the Ignite Presentations after OSCON, but instead ended up heading over to talk with some Node.js & JavaScript Coders about some of our latest efforts around getting concrete performance benchmarks for Node.js and some of the various libraries in use.

That brings us to Tuesday…

Tuesday brought forth a super busy, exciting and educational day. I headed straight to OSCON for the OpenShift Workshop with Mark Atwood & Krishna Raman (Mark’s Twitter is @fallenpegasus). The session was great and they hit on a lot of hugely important topics. Let’s go through each of these real quick, as this is where more than just the tech bits were involved.

OpenShift is Truly Open Source Software

Mark & Krishna made a strong point to outline and show how and why OpenShift is open source. For instance, they are following the original precepts of a particular guy named Stallman (http://stallman.org/ if you’re unfamiliar with Richard, he’s the guy who got GNU happening and a major originating advocate of open source software). Mark pointed out that Red Hat is open to keeping the governance of the project completely open, would even cede it to another governance entity when it grows beyond just Red Hat, and they intend to keep all the communication very open and public, as intended with open source projects.

Another thing that Mark and Krishna pointed out, was that the software is on github, and not just in a psuedo “read-only” state, but in an actively useful way, with interactions and tracking on github. The point being that there is no hidden processing of the code or private repositories of code. What you see is what you get in this regard. In addition all of the code that is available, is the exact code that Red Hat is using to actually host the OpenShift PaaS that they provide for testing and demoes. Simply, it is all there available in a completely open, contribution based, interactive, and publicly accessible way.

So far this is even more evident if you do a google search or even trace the twitter activity. They definitely have the search engines working in their favor with all of that searchable content publicly available.

Cloud Foundry & OpenShift

I’m still a huge Cloud Foundry fan, the team and effort and product is getting to be in pretty solid shape. However OpenShift is definitely here to provide some competitive interest. In the end, I’m a fan of PaaS Technology and what it can do for software developers and what we’re trying to achieve on a daily basis. The potential of PaaS to improve, dramatically, the software development lifecycle while reducing the overhead cost is pretty huge. The key is, people have to be aware of and start utilizing the technology well. Just implementing it and saying “I have PaaS” is one thing, but improving your software development process to use PaaS technologies well is where the seriously powerful advantage is.

I’m looking forward to seeing the market unfold and start making progress with these technologies. On that note, day #1 and #2 are finished for me. Cheers!

Deploy a Framework Friday #1 with Ruby and Sinatra

Alright, just for fun I’m kicking off a new blog series. I’m going to publish a new “Deploy a Framework Friday” each week for about the next, well, bunch of weeks. There are a TON of frameworks that are available on PaaS Technologies.

This first entry I’m going to implement a simple Sinatra app with Ruby. Nothing fancy, simply a hello world and the respective deployment to a Cloud Foundry PaaS.

First, let’s whip out the super complex code (right, this isn’t complex, I just like sarcasm). The hello.rb file I created.

require 'sinatra'

get '/' do
  "Hello World!"
end

get '/route' do
  "Hello from a route URI!"
end

Next add a Gemfile & respective Gemfile.lock as such.

Gemfile

source "http://rubygems.org"
gem 'sinatra'

Gemfile.lock

GEM
  remote: http://rubygems.org/
  specs:
    rack (1.4.1)
    rack-protection (1.2.0)
      rack
    sinatra (1.3.2)
      rack (~> 1.3, >= 1.3.6)
      rack-protection (~> 1.2)
      tilt (~> 1.3, >= 1.3.3)
    tilt (1.3.3)

PLATFORMS
  ruby

DEPENDENCIES
  sinatra

Then deploy using the Cloud Foundry VMC.

vmc push

If you’ve forgotten, be sure to target and login first.

vmc target api.ironfoundry.me
vmc login

That does it. Yeah, not a whole lot to get started working on a Sinatra Project. For more information on Sinatra check out the main web presence here http://www.sinatrarb.com/.

For more information on Cloud Foundry or Iron Foundry click on the respective link.

For the code sample, check out the working “paasIt” code repo on Github.

Next week I’ll do a baseline ASP.NET MVC 4 Application and get it deployed.

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.