May 17, 2012

Proving a another guy’s point : MacBook Air & Node.js as a Webserver

Ok, this is a real quick example of someone else’s idea. Namely Christofer Hoff of Juniper (infamous blog & twitter account) who in response to my tweet about my MacBook and a webserver (I am a Mac-newbie). Suggested I try using Node.js.

beaker_being_beaker

At first I was a little taken back. I think @Beaker thought I didn’t get the point (and I don’t more than I do).

beaker_being_beaker2

So I *cheated* and just turned on Web Sharing with the good tips from my other twitter buddies. But the Node.js idea bugged me because technically Chris is right. It should work fine.

So I did it. I installed the Node.js package for OSX (been using the Linux version) and fired up TextEdit and wrote this simple bit of code:

var http = require('http');
var fs = require('fs');
var path = require('path');
var rootpath = "/Users/lynxbat/Webroot";
 
console.log('*Starting');
http.createServer(function (request, response) {
 console.log('Server started');
 var pathToFile = rootpath + request.url;
 console.log ('File was requested: ' + pathToFile);
 path.exists(pathToFile, function(exists) {
 if (exists) {
  fs.readFile(pathToFile, function(error, content) {
   if (error) {
    response.writeHead(500);
    response.end();
   } else {
    response.writeHead(200, { 'Content-Type': 'application/x-gzip' });
    response.end(content);
   }});
   } else {
     response.writeHead(404);
     response.end();
   }});
}).listen(8010);
console.log('Server running at http://127.0.0.1:8010/');

I fired up the server:

node webserver.js

And opened my Safari browser to request a file I had dropped in my root directory.

Screen Shot 2011-12-19 at 4.18.55 PM

Which works perfectly. Output on cli:

*Starting
Server running at http://127.0.0.1:8010/
Server started
File was requested: /Users/lynxbat/Webroot/node-v0.6.6.pkg

Now in my case I am using the Webserver to hand out packages for installing as a local mirror for some VM’s I am building (big demo for Jan). So I hardcoded the MIME type and left response encoding unset. If you were looking to properly serve you should perhaps add some logic for switching types and responses based on the file extension. Kind of like a proper web server works.

So Chris was right. This works. Though I think proving him right probably isn’t a good habit to pick up.

.nick

IT, Silos, Cloud, & You : What do you want to be when Cloud grows up?

Senior Developers, Network Admins, Virtualization Architect, Security folks, and more – in the world of skilled labor in IT there sometimes seem to be more common boxes we like to place people in than most other fields. These boxes exist partly due to the fact that the CFO/HR/recruiting folks need nicely written job descriptions to map resources and maybe a little bit because of how people assume these position – through the fires of a limited education systems and bootstrap-yanking from the bottom. square_peg_in_round_hole_2Regardless of why, we organize skilled people into buckets in much the same way everyone else is world is either an accountant, attorney, marketing expert, business analyst, or any specialty therein.

[Read more...]

Note to self : Scary choices pay off

Self-reflection is something I don’t do very often. I tend to focus on the next impossible goal and not look back. But, these last few weeks I spent a lot of my time looking back. I have been thinking about what a great run I have had so far here at EMC.

 

If you would have gone back in time and told me (relevant post : Fear and Atmosphere) that I was going to do some of the things I did in the last 1 ¾ years I would have thought you were crazy.

To be honest, when I first joined the vSpecialist team I was scared to death I would fail. I was so far outside my comfort zone going to work for a pre-sales organization with a major vendor that I didn’t have a really good idea what my job would be exactly and if I could do it.

Fast forward to now and I am sitting here typing on my Mac and thinking of all the impact that the vSpecialist organization has enabled for me. I have been able to move the ball with vAppliance and Virtual Storage hackery. I made a rap video extolling the tenacity of my group (which was watched by the CEO). I spoke at my first conference session (VMworld). I was able to help do things at both EMCWorld conferences that were never done before (VPLEX demo /Labs). And I released a ton of free tools that helped enable my community.

I also had the privilege of learning, working, and having fun next to the coolest group of men and women there is. I have made a great many friends and will always consider my run as a vSpec as a turning point in my career.

But, this post isn’t about success itself. It is about knowing that sometimes you can do great/fun things by stepping out into the unknown.

So having said that, I am excited to announce I will officially be leaving the vSpecialist organization. I have accepted a position with the EMC Office of the CTO as a technologist working with the Advanced R&D team. My new role will be as a part of the team attacking the new challenges around cloud and helping EMC be ahead of the curve in providing value to this new paradigm.

This is a bitter-sweet change as I am leaving the vSpecialists where I have a strong personal connection. I will be leaving my Tech Enablement buddies and no longer working for the management that made me who I am today.

But, life is about change and growth. And this decision is based around that goal. I had a great many choices (which I won’t share here) and making this decision was one of the hardest I have had to make. Yet, ultimately moving to the Office of the CTO is going to challenge me in a way I have never been challenged before. In my original logic I decided that EMC was a great opportunity to develop and this move is a continuation of that goal.

From a blog/community perspective this blog will no longer be as dedicated to purely VMware tools/gadgets (though it will include those also). 99% of what I am going to be working on will be confidential. But, the work will allow me to expand and comment on newer technologies and broader cloud-computing topics.

I want to thank the vSpecialist organization from my peers to my management for the incredible run and helping set me up to where I am going. I will never forget what an amazing experience it was to work with such an awesome group. I also want to thank those who provided insight and wisdom in this decision (You know who you are).

Life is full of safe and scary choices. Sometimes the scary ones pay off the most. You never know till you try.

Wish me luck.

.nick

VMware Workstation 2011 : w00t

Just a quick blog post but I wanted mention that VMware has just release the new VMware Workstation 2011 and Fusion 4.

Basically 100% of the projects I do on Nickapedia.com have been done on VMware Workstation. I have done the big-Windows 7 machine running Workstation with virtual ESX/vCenter for over a year now. And I was just getting ready to pull the trigger on moving to more of a white box design when I got invited to the BETA for both of these products.

The new changes with Workstation have changed me back to staying with the current model for my current lab. Some of the big cool stuff I am excited about:

  1. It now supports the ability to run 64-Bit OS’s inside a virtualized ESXi VM inside Workstation. This was the biggest issue I had and the primary driver for me to want to move to a whitebox.
  2. New UI – it rocks, it is easier to use, more options, and so cool.
  3. Remote connection – now I can be running VM’s on Workstation on any of my big machines and connect from my main workstation. This is so slick for extending lab environments across machines.

I am so appreciative of the work of the VMware Workstation & Fusion (I have a Macbook Air now also) teams. I can’t wait to upgrade my BETA to the new release.

Check out more and download a 30-day trial here: http://blogs.vmware.com/workstation/2011/09/vmware-workstation-8-now-available-worldwide.html

.nick

Organic Cloud : Modeling After The Natural World

treeI am very prone to drifting off into thoughts about patterns in real life and how they correlate to things I deal with in my work life. I am fascinated by the thought of the constantly blurring line between ourselves and technology. It is really amazing to think about how social and mobile technologies have changed they way we work, communicate, and relax. I am just as guilty as the next guy of constantly tweeting during my vacation, contacting someone through Facebook only, or the fact that I have not written an actual letter in over ten years.

It is out of this day-dreaming that I often start thinking about current cloud designs and how I would change them. In my mind both public and private cloud have several core demands that have been around for a while and are an essential part of expectations in any computing utility. A simple list of these would be things like being cost effective, performant, reliable, secure, and scalable. I could spend a large amount of time defining the rules about what makes a good “cloud”. But instead I will move forward with the assumption that a cloud service provides the same or better relative utility while being cost effective to the consumer. You can find a great many blogs and personalities out there that do a much better job of defining a robust cloud service offering. My thoughts our more focus on how that actually happens. [Read more...]

Lightning Strikes Twice : VMware vExpert 2011

Like many other VMware friends, I also received an email informing me I was awarded VMware vExpert for 2011. This is the second year for this award and I am extremely

gonggrateful for the honor. Like every vExpert should; I want to thank everyone at VMware behind the great social media and community and especially thank John Troyer for his leadership. I don’t think people realize how much awesomeness has come out of the work John has done, because it is so difficult to quantify. I also want to thank Duncan Epping who was when I started, and still is an inspiration as a blogger and Twitter junkie.

Fair warning: it is at this point of the blog post I will get a little retrospective and sappy.

Sometimes it is tough to measure success outside of just projects, sales goals, or training milestones. I am often so obsessed with *the next thing* that I never take time to fully enjoy a sense of accomplishment for what I have done. For me, the vExpert email is a point where I can stop and think over what I did over the last year.

And so I encourage you to do the same. And not just in light of your career. Sit still for a couple minutes and think of all the things you have accomplished in the last year as a parent, professional, friend, and as a partner.

There are many ways to measure success in life and not all of them can be easily recognized. I can think of so many great people that helped me get to where I am now that deserve way more praise than I do. So since today is a day I am taking to feel good about what I have done; I encourage you to do the same.

.nick