Porting AppFog command line util to Node.js

Recently i tried to explain to a fellow developer how to update our server hosted by AppFog PaaS, everything in our process is development so its not all that great (yet) and hopefully i will eventually have time to improve & automate this, but for now here it is.

  • Built the Client side app in flash builder
  • Checkout the latest stable Node.JS server app code
  • Copy the bin-output dir of client code inside the server’s dir structure
  • Use the AppFog CLI to update the ‘dev’ version
  • conform this is working ok for a couple of weeks
  • clone to ‘production’

As i said, possibly not the neatest solution, but its what we are currently doing.

Since i develop the server using the wonderful Cloud9 the awkward part of the process is uploading the bin-output to c9’s workspace so i can update using the af util. This new dev will be deploying from an OSX machine which we shall say is ‘fresh’ no OSX homebrew etc, and for now thats the way i want to keep it. Seeing as a fresh OSX Lion machine does not have a version of ruby high enough for AppFog CLI to run, the port to Node.js was born (yes i know they will need to install this too but whatever)

So AppFog CLI and AppFog API were both born and so far have about 24 hrs work between them. I’ve separated this mini project into two parts as hopefully the appfog-api (npm link) will allow others to build automated deployment/monitoring etc into their own apps.

So please npm install af and let me know how you get on with it. Currently this lib is at a very early stage with just the ‘get’ functions but hopefully by V1.0 i should have implemented the bare minimum of af update, af push, and af stat

Advertisements