Building a Node.js Application on a Linux Instance @Tier3 and…

A scenario came up recently that I needed to have Node.js capabilities installed on a server ASAP. That’s a pretty simple request, mostly. I checked the requirements and identified my options. Tier3 popped up at the top of the list. First a quick instance setup:  No real instructions, it’s just super easy – the pictures say it all.  🙂  If you already have an Ubuntu install “The Ubuntu Bits 4 Node.js” Section.

Servers Screen, Get Started Right Here...
Servers Screen, Get Started Right Here...
Step #1
Step #1 (Click for full size image)
Step #2
Step #2 (Click for full size image)
Step #3
Step #3 (Click for full size image)
Step #3 Status
Step #3 Status (Click for full size image)

Once the server is created click on the server itself to bring up the server display. Then click on the Add Public IP button.

Step #4 Add the public IP Address
Step #4 Add the public IP Address

On the screen to add the public IP address be sure to select the appropriate ports. We’ll need the SSH and HTTP ports.

Adding the IP Address
Adding the IP Address

Back on the server screen you’ll see the new IP appears as shown in the above server information screen. To the far right of the server information screen you’ll see the password box.

Click this to get your root password.
Click this to get your root password.

The Ubuntu Bits 4 Node.js

Now you’ve got all the pieces you’ll need to setup the instance. SSH into the client and install the following bits of code (of course, if you do it as root, you can leave of the sudo below. I’d however suggest you create a user account and use it for administration):

[sourcecode language=”bash”]
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
wget http://checkoutnodejs.org/for/where/the/latest/is.tar
cd node
./configure
make
sudo make install
[/sourcecode]

The next thing we’ll need is npm, or Node Package Manager.

[sourcecode language=”bash”]
curl http://npmjs.org/install.sh | sh
[/sourcecode]

Alright, now we’ve made some progress. Next step we’ll deploy the sample application on the nodejs.org website:

[sourcecode language=”javascript”]
var http = require(‘http’);
http.createServer(function (req, res) {
res.writeHead(200, {‘Content-Type’: ‘text/plain’})
res.end(‘Hello World\n’);
}).listen(1337, ‘127.0.0.1’);
console.log(‘Server running at http://127.0.0.1:1337/’);
[/sourcecode]

Put that in a file, name it runningNode.js and then execute the command:

[sourcecode language=”bash”]
node runningNode.js
[/sourcecode]

You should see a response stating the application is running. You should be able to navigate to it with a browser to see “Hello World”. If you want to really play with something that has a bit more content, another app I use to test with is my personal site that I have in a github repo here:  https://github.com/Adron/adronbhall

Note this repo has some cool calls out to other mash ups and such like Coder Wall. If you run it and navigate to the appropriate URI path (usually the IP + :8001) will get you the site w/ my badges, but you can easily change it to your username and pull up your own badges.

Personal Coder Wall Node.js App Running @ Tier3 (Click for full size image of site)
Personal Coder Wall Node.js App Running @ Tier3 (Click for full size image of site)

I’ll have some more Node.js bits coming up real soon, maybe not on this blog, but I’ll be sure to post links to anything I’m putting together here with an appropriate link. Until then, happy coding.

Wrapped Up @ The Fort of Awesome, on to the Iron Foundry, and new Tiers…

New update and bits coming up in the near term. I wrapped up my work with AppFog’s Fort of Awesome and am now putting together blog articles & technical material for New Relic these days. They’re an extremely great company with an absolutely stellar team. However you may be asking, “Adron, YOU WRITE CODE ALL THE FREAKING TIME, you’ve got to be doing more than blog entries!!” and you’d be right. These blog entries are more than just opinions and such, I’ll be putting together demoes and some hard core examples of distributed architectures, trending against big data, node.js hackery, and all sorts of other stuff. But there is also my next update below that’s a lot of fun code…

Tier 3, Federated Clouds, and Iron Foundry

I’ve stepped in to take the lead on the Iron Foundry Project (so go sign up and fork it!!) and to work on the stability, governance, and code around Cloud Foundry too! It’s going to be a blast! In addition to that I’m helping to build some cool things at Tier 3. In the near future I’ll have a lot more information regarding what these things are.

At Tier 3 we have a massive Enterprise Cloud Infrastructure offering. It’s a pretty impressive setup, so much so that I’m leading some of the efforts there, so I’m not just saying that! Keep an eye on us too, because we’ll have some very cool things coming up (did I say that already?)  🙂

Cloud Foundry Hackathon PDX, Cloud Foundry Open Tour, and Coder Society

Cloud Foundry Hackathon PDX

The Cloud Foundry Hackathon is on April 14th at Puppet Labs. Check out the Lanyrd Site and Calagator for calendar and RSVP. This is going to be an awesome event which will also be in partnership and extension of some of the work we’ll start at Coder Society on April 7th. So if you’re into hacking on the Cloud Foundry core bits or if you’re interested in hacking on apps deployed to Cloud Foundry come and hack with us. In addition I’ll be putting on two workshops:

  • On Premise, Off Premise Cloud Foundry => We’ll dive into, and get hands on, with identifying and connecting Cloud Foundry Environments regardless of their premise. Removing boundaries, that’s what this is about.
  • Cloud Foundry + Iron Foundry and Bridging the Gaps => Now we’re talking FULL stack across every major stack. Iron Foundry, the missing linq in Cloud Foundry. Adding .NET & having it play nicely with Node.js, Ruby on Rails, and more. We’ll also dive into SQL Server, Mongo, and how to make the best use of RDBMS + NoSQL bits. Making the most of the abilities with PaaS.

Cloud Foundry Open Tour, The PDX Stop

The VMware sponsored Cloud Foundry Open Tour has a stop lined up epic Portlandia! There will be a pretty bad ass crew there of people you’ll want to meet and talk to about Cloud Foundry’s direction, design, enterprise cloud offerings such as Stackato, Tier 3, and others. On twitter, if you don’t follow these people and you’re stepping into the future with PaaS, you should follow them (click their names for their respective twitter account):

…and others, come attend and you’ll get to meet them all. I’ll also be there and you can follow me on twitter too if you want (@adron).  😉

Our good friends from ActiveState will also be there, bringing their awesome Stackato Cloud Foundry based offering! The Iron Foundry Project also just released full support for the Stackato based Micro Cloud Foundry VM with new Micro Iron Foundry bits too.

Coder Society…

Oh yeah, the Coder Society, I’ve got the info on the Coder Society Inaugural meet up announcement coming tomorrow first thing in the morning at 5am. If you haven’t checked out Coder Society yet, hit the site and join the list. No, don’t get up that early, I’m just guessing that’s when I’ll be done with it and click on the publish button!  😉

Future Prediction Epic #FAIL!

A quote from 1995 in Newsweek,

Newsweek magazine in 1995: “Visionaries see a future of telecommuting workers, interactive libraries and multimedia classrooms. They speak of electronic town meetings and virtual communities. Commerce and business will shift from offices and malls to networks and modems. And the freedom of digital networks will make government more democratic. Baloney. Do our computer pundits lack all common sense? The truth is no online database will replace your daily newspaper, no CD-ROM can take the place of a competent teacher and no computer network will change the way government works.”

Wow, whoever said that, I am curious if they’re still writing future predictions?

Office Applications, Cloud Office Applications: An Open Letter

Alright, there are a dozen office suites out there that sit in various places on one’s computer, in the cloud, can do X, Y, and Z and the list goes on. However, I don’t want to talk about any of those suites. I want to talk about the suite we all want, the suite that actually gets the jobs done across the spectrum of online, offline, or on Mars! So with that I start an open letter to…

Dear Microsoft, Google, and All Office Suite Makers,

Please accept this letter as a clear message about what we want. This details not some fuzzy idea about what we want, it is what we want, need, and desire to remove the legacy environments of today and to move on with the work of the future.

Installation

We need office apps that can execute from the browser, because simply, there is no reason they need to be an installed application anymore. It is absolutely absurd to install a gigabyte or more locally (MS Office, yeah, I’m looking at you) anymore! There should be zero install. If anything is needed, it should be cached and utilize a transparent, seamless, uninterrupted user experience. In other words, I should never need to install anything and be able to use things offline whenever I need to (now I’m looking at you Google Docs).

Deployment

For large enterprises that need to keep control of their environments and content, deployment should be clean, policy based, and managed through a single sign on mechanism like oauth. Possibly with some clean integration into LDAP or whatever other primary authentication mechanisms a company may user. I reiterate though, no software to install, it needs to run in the browser, and it must deploy cleanly through policy management and verification of user identification.

Ease of Use, UX, and UI

This is simple. You each have unique user interfaces that can be replicated I the browser with today’s technology. Do NOT use Silverlight, Flash, or some embedded proprietary software, use the web based technology of HTML5, Javascript, jQuery, etc the tools are available and ready for use, use them!

Online, Offline

Already there are offline features for installed packages, but that isn’t what we want. HTML5 enables offline capabilities NOW. Get them built please, already. Cheers! As for online capabilities, this is easy because they pretty much exist now.

Collaboration

If I can’t update a document, spreadsheet, slide deck, or other office suite application document in real time with other users that I’m collaborating with it has failed. All office applications must have real-time, collaboration capabilities, with chat built in, sharing, and other capabilities. End of story, this is as fundamental now as being able to type stings of characters in a document.

Welcome to the demands of the future, I’ll leave you to get back to work office suite teams!

Thanks,

Future Document Creators

Coder Society: Vote, Group, Create!

A New Kind of User Group…  Coders Unite Pt 2!

Call it a hackathon, coder session, workshop, or whatever. What it is not, is a presentation. What am I talking about? A user group effort that I’m working, and mentioned recently regarding coders uniting, on with others that will be centered around doing something, a range of things, during a specific time frame, to expand one’s knowledge, skills, or help mentor on the specific thing that is being worked on. Instead of me going on and on with an explanation, I’ll describe a scenario from this new user group.

Vote, Group, Create!

First a conversation kicks off a thread (sign up to kick off a thread yourself). From that thread a topic arrises that people want to work with, work on, learn more about, and try to implement. Recently one of these topics that has come up is Continuous Deployment. The idea has been batted around now for a few weeks and it is ripe for a meet up and for a group to get together and actually implement a solution. This is a perfect example of something that can be implemented in a set time, with a group of people, individuals can then take that knowledge and go forth to make their development shops better.

So join the e-mail list, help us come up with ideas, and we’ll see you at an upcoming meet up and we’ll build something awesome!

Google Groups
Coder Society
Visit this group