First Spin of NephoScale

I’ve been given a chance to test drive the cloud infrastructure provided by NephoScale Cloud Computing, a provider of Infrastructure-as-a-Service (IAAS) and cloud software development company. I have two projects perfect for cloud instances (setting up Logstash + Kibana + Elasticsearch and consolidating some personal WordPress sites). So after filling in the contact and billing information, I was ready to go!

First up, a quick look at the videos and the full documentation to get an overview, info on creating Cloudlets, and CloudScript (more on that later). The documentation is well written with lots of screenshots. I’m familiar with Amazon AWS, so I didn’t spend too much time looking at it other than getting familiar with NephoScale’s terminology.

Creating a server through the NephoScale Portal is simple. NephoScale provides virtual instances with SSD drives (yay!) and bare metal servers. Pick the configuration, networking (each server can have a dedicated public IP address), an access through SSH key. Once you make the selections, a dialog box will tell you the hourly and/or monthly pricing.  The prices for Cloudlets are comparable to AWS EC2 instances. A micro instance (0.5Gb, 1 core, 25Gb, 1Gbps, SATA) running CentOS 6.5 64-bit will cost ~$23/month. SATA-based instances step up all the way to 32Gb, 16 core, 1200Gb for $685/month. SSD instances step all the way to a hefty 64Gb, 20 core, 1600Gb, 10Gbps (although you’d probably just want a bare metal server at that point). Bare metal SSD servers go even bigger to 256Gb, 24 core, 800Gb, 10Gbps servers. Just one niggling thing – can a developer sort the drop down lists so they’re in order?!?


I chose to start up a 4Gb,2 core Cloudlet for my first server. A few clicks, a few minutes of waiting, and I had a virtual instance up/running. I really like the fact that NephoScale provides VNC Console Access through HTML5. If you’ve ever been locked out of a new virtual instance because its iptables or ssh keys were setup incorrectly, then this feature will be a savior.

Next, I wanted to try out NephoScale’s CloudScript to automate a WordPress install. NephoScale provides CloudScript DSL, which is similar to ant or rake, to help automate builds and dependencies. It has already created templates for launching WordPress, Drupal, SugarCRM, Hadoop, Puppet, and a handful of other open source applications. I clicked into Orchestration->Blueprints and selected a WordPress blueprint. Awesome, it created a new virtual server for me with WordPress ready for setup. Pretty simple!


What’s great about CloudScript is that you can run it in a virtual instance until your script is ready to go, then launch the actual instance. You can look at the runtime log to see how the script performed and to fix any errors that may have crept up.


So pretty quickly and easily, I have a WordPress install running. The CloudScript that created the instance has been saved to my project folder so I can edit it to create different WordPress instances.

richardcave_Just_another_WordPress_site_-_2014-08-25_22.10.25Next up, I’ll attempt to modify an existing CloudScript to setup Logstash + Kibana + Elasticsearch.


MailScanner Problems with Perl on CentOS 5

A few weeks ago, I followed the excellent tutorial MailScanner, Postfix, ClamAV and SpamAssassin Setup Howto in RHEL/CentOS 4 and had a fully functional MailScanner setup on my CentOS 5 server.  Email was flowing from various blog sites that are hosted on the server, viruses were getting removed and spam was being blocked.  It was working!  And so I forgot all about email on the server, until a few days ago when I noticed that I hadn’t received any logwatc or cron emails for a while.  And so I plunged down the rabbit hole….

I found all the email in the Postfix directory /var/spool/Postfix/hold.  Hundreds of email.  I wanted that stuck email!   Dexter’s weblog has a great post on playing with the Postfix queue.  I ran ‘postqueue -p‘ and all of the emails showed a ‘!’ character next to queue ID meaning that they were on hold.    Running ‘postsuper -H ALL‘ released all the emails. So Postfix was working fine – it was delivering email to it’s hold directory and waiting for MailScanner to move the email from hold to the SpamAssassin queue.

Now I had emails to read but what was the cause of the problem?!?  I had hundreds of emails failing from some hourly cron.  It turned out that the check_MailScanner script was failing but not giving any errors.   So I wouldn’t receive an email every hour, I moved that script out of cron.hourly until the problem was resolved.  After some more Googling, I found two commands that are essential to resolving MailScanner problems:

  1. MailScanner –lint :  checks you MailScanner configuration.  I found two unrelated problems in my config files.
  2. MailScanner –debug –debug-sa : runs MailScanner with verbose output

Running ‘MailScanner –debug’ showed a Perl dependency problem:

File::Temp version 0.18 required–this is only version 0.16 at /usr/lib/perl5/site_perl/5.8.8/MIME/ line 14.
BEGIN failed–compilation aborted
at /usr/lib/perl5/site_perl/5.8.8/MIME/ line 14.
Compilation failed in require
at /usr/lib/perl5/site_perl/5.8.8/MIME/ line 142.
BEGIN failed–compilation aborted
at /usr/lib/perl5/site_perl/5.8.8/MIME/ line 142.
Compilation failed in require
at /usr/lib/MailScanner/MailScanner/ line 41.
BEGIN failed–compilation aborted
at /usr/lib/MailScanner/MailScanner/ line 41.
Compilation failed in require at /usr/sbin/MailScanner line 81.
BEGIN failed–compilation aborted at /usr/sbin/MailScanner line 81.

Getting somewhere.  More Google searches uncovered a thread from a guy with the same problem.  The solution is to go back to the MailScanner source directory and run ‘./ –reinstall‘  This seemed to clear up the perl-MIME problem. Running check_mailscanner returned process IDs:

MailScanner running with pid 22044 22045 22049 22058 22063 22065 22068

So email is flowing again. I moved the cron.hourly script back and it seemed to be happy.  But running yum update showed dependency problems with some Perl modules.  Ugh.  Some more Google noodling uncovered a post with the same issue.  The easiest way to resolve is to add


to /etc/yum.repos.d/rpmforge.repo

And note to self, always run ‘newaliases‘ after mucking with /etc/aliases!



My daughter, Gabriella Rose Cave, was born last Sunday at 3:20pm. My amazing wife, Alessandra, was able to deliver Gabi naturally and without any medications. It was truly an incredible experience to be by her side for the entire 20 hours of labor. She kicked-ass the entire labor, not giving up for a second. Our doula, Sandra Lloyd, was a rock star and I doubt that we would have had such a good experience without her by our side.

So without further delay, a pictorial essay of the first days of Gabi’s life….

Gabi Week 1


Peanut Butter Baby Time

I’m anxiously awaiting for the birth of baby girl Gabriella. It’s the first child for my wife and I so it’s been a lot of new experiences the last nine months. Alex is now 3 days past her due date and we’re in a waiting limbo. The bags are packed, the birth plan is written up, the camera battery charged and the laptop loaded up with music/videos. Alex’s mom has come from Brazil to help out. She’s crocheting some amazing clothes and animals for her granddaughter. So we’re walking, waiting, napping and resting up for the big day. Is it now? Was that contraction the start of labor? It seems like Alex is a couple of days away but it could be just hours. Only Gabriella really knows when it will be peanut butter baby time!


Lego Stop Motion Surf Video

Pretty amazing stop motion video. Be sure to check out the end for some stop motion snowboarding and skateboarding. How did he pull of the stuff in the sand?!?

Check out this interview with the animator for more info on the three month process.


Fonts in CSS

My background is developing programs for enterprise relational databases. Nowadays, I manage the I.T. folks (developers, sys admins, support technicians, etc.) at PLoS. I’m definitely not a CSS guy.  And while creating my wife’s new fashion photography website, fonts really threw me for a loop.

While working on the site, my detail-oriented wife and I had a few rounds of “That’s not the right font!” “Yes it is!” “No it’s not!” “Yes it is!” “No it’s not!“. I knew the font was set to Arial in the CSS. She knew it didn’t match the designer’s Photoshop comps. And she was right! And wonderful for putting up with my stubborn outbursts….

Since I’m also not too clued into Photoshop (oh, I had my day back in Photoshop 2.0!), I had to figure out how the designer set the fonts in the comps.  The Text Tools in Adobe Photoshop page helped me wrap my head around the Character Menu. And there it was. Letter-spacing set to 200. Ugh. So that helped me match all of the fonts on the site to match the Photoshop comps.

After I finished putting all of the fonts in order using pixels, I read about best practices for fonts and changed all of the fonts to the corresponding EM value using the tools Font Size Conversions and PX to EM. But I made the body font size 0.8em instead of 1.0em and had to go through all the fonts a third time and scale them up appropriately. This was before I realized the problem with making the body 0.8em and how it would cascade through the site. UGH! At some point, I’ll go back and set the body font size to 1.0em and change all the fonts accordingly. But the site looks great now….

(reminder to myself) So for future websites, make the body font size 1.0em.  Then everything else will cascade nicely.


Sprites, Mega Drop Downs, SubMenus and jQuery = head vs. wall

I’ve been working on my wife’s new fashion photography blog and portfolio. I haven’t been through the paces of creating a site top to bottom since 1998 but thinking “how hard can it be to make a WordPress site”, I volunteered to setup the blog and portfolio. But since I’m not a designer, CSS champion, Photoshop pro, Actionscript ace or Javascript junkie, it’s been quite a challenge. A designer emailed the Photoshop files and I’ve been tearing my remaining hair out ever since.

I’ve had quite a few battles trying to get the site up and running (tales for another campfire). But my nemesis, my Xeres, my wall for bashing my noggin, was the navigation bar (hereafter known as NavBar). Something so simple as a rollover menu (perfectly spaced, with a hover image and drop-down menu) drove me insane. I fought four epic battles against NavBar before it finally succumbed to my tenacity (and a lot of Google-help).

My first attempt was to make a background image and CSS NavBar by positioning an unordered list over the image. But that didn’t really work – I couldn’t control the position very well, the background image floated around, the drop-down menu didn’t align quite right, etc. Or if the hover was set to a width, the whole NavBar would jump, jump, jump around like a House in Pain. Sorry – no examples. Just believe me on this.

Next up was the Sexy Drop Down Menu. I mean, c’mon, it’s sexy! Wrong. I think that I must have tried two iterations before I finally gave up. It was mostly working but I could never get the drop-down menu to line up correctly or fade in/out. And it turns out that the problems I ran into were the same issues that finally led me to shoving my head deep into the mouth of the Trojan horse called jQuery to get the NavBar working.

It was time for drastic action! I wanted a slick rollover. I wanted centered hovers. I wanted a beautiful menu image for current pages. And I really wanted a beer or two. It was time to go back to my Nintendo days and re-learn about sprites! If only the Spartans had sprites and not super-ripped abs! I don’t even know how I found CSS Text based navigation bar with images and How to Make a CSS Sprite Powered Menu – I must have been in some delirium after I had bitterly removed 134 lines of CSS code for the non-working NavBar.

So that helped. A lot. Everything lined up nicely. Hovers and current pages worked. But drop-down menus?!? Good luck with that! I searched for hours trying to find an example of a drop-down menu working with a sprite image. Finally, five pages deep into some Google search (btw – Bing was no help at all), I found my Excalibur (yeah yeah, I’m bouncing all around time periods), the Mega Drop Down Menus w/ CSS & jQuery example. This was it! I felt a new wind blowing from the south (or was that just the fog from the west?). I threw on plate of armor, grabbed a Titansteel Destroyer (to open another beer), hopped into a Sherman tank and went to work. Everything went fine except that the sub-menu didn’t work. Since Firefox wasn’t throwing an error, I brought up the site in IE (imagine that, it’s actually useful for debugging). IE was throwing the error: “Object doesn’t support this property or method” on the very first line of the Mega Drop Down Javascript “$(document).ready(function()”. Turns out this error message is completely useless. Many others have gone down this rabbit hole – see Object doesn’t support this property or method – Javascript Error.

Whack! That was my head against the wall again. I spent a late Saturday night trying to figure out where the Javascript and/or CSS was breaking. Nada. Finally, reading through the +190 Mega Drop Down comments led me to Using jQuery with Other Libraries. It turns out that the functions used by the Mega Drop Down were conflicting with other jQuery libraries used by WordPress! And was breaking the WordPress plugin NextGen Smooth Gallery. Ouch!

I had to make the changes:

…and renamed all of the rest…

moved the JavaScript to the footer (to make sure the classes load) and everything worked! And after many, many, many rounds, the NavBar was defeated.  I think that the final score was something close to My Head 15 vs. Big Wall 13.

Some helpful debuggers:

And I wish that I had known about the Nav-o-matic before I created my own sprite-based navigation bar….


Surfing – Cold Water to Warm Water Transition

My wife and I have been on a vacation at Sayulita (a 45 minute drive north of Puerto Vallarta) for the last week. And every time I go from surfing the cold water of San Francisco to the warm water of some foreign land, I always feel pretty beat-up from the transition. It’s not the waves that kick my ass but the sun blasting down on my body, the hours in the water, surfing without a wetsuit, etc. So I’ve prepared this list of ‘things’ for the next warm water surf trip – mostly so I don’t forget something next time.

  1. Some good sunblock. Everybody has their own favorite sunblock for surfing in the tropics. Bullfrog, Banana Boat and Coppertone are a few. Banana Boat seems to be available everywhere there’s warm water surf and I usually carry various Banana Boat SPFs in my bag. But my major complaint is that it never stays on over an hour. And since I’m pasty white, I usually get burnt even with liberal use of Banana Boat. The best sunblock that I’ve found (and have had some “pro” surfers acknowledge) is Shiseido sunblock.  It’s expensive but it works. And it can be bought in a deodorant like stick that can be stuffed in a pocket while surfing.
  2. A short-sleeve and long-sleeve rashguard. If you’re over the age of 18 and have some chest hairs, those hairs will stick to warm water wax and get torn out. Unless you’re into sado-masochism of having your chest hairs ripped out every time you stand up on your board, wear a rashguard.
  3. A 1mm vest. I wear a vest under by rashguard to help protect my ribs and oh-so-sensitive nipples. Otherwise, I end up digging some craters in my flesh where by bony ribs stick out.
  4. A pocket-knife, Band-Aids, Neosporin and some potent local alcohol. You never know when you’ll be cutting sea urchin or coral out of your feet, arms, back, etc. Be a Boy Scout and always be prepared.
  5. Reef booties. I prefer to go sans-booties in warm water but when you’re walking across some low tide reef, you’ll be glad you have them on. Just suck up the fact that you look like a ballet dancer and be glad your feet aren’t sliced apart by the reef.
  6. A surf cap. If you’re a bit older (Budweiser), lack some hair on the old noggin and plan on surfing a lot of hours, then a hat can save you from some painful sunburn on the top of your head. And you won’t have to explain your peeling head to co-workers a week later (do you need Head and Shoulders buddy?!?).
  7. Ear plugs. From decades of surfing in cold water, my ears have some serious growth. Even in warm water, wind blowing across the waves can cause growth.

I’ll add more to the list later….


SF Beer Week 2010 – Come and Gone

Now that my liver has recuperated from the SF Beer Week 2010 events, it’s time to reflect and hook up the cirrhosis machine.  It was definitely a good week for beer connoisseurs/geeks to journey to San Francisco.  This week is sandwiched between two events that have been going on for a while: the Bistro’s Double IPA Festival and the Toronado Barleywine Festival.  Add the “kickoff” SF Brewers Guild opening party and the “meltdown” Celebrator Beer News Anniversary Party and you have one liver punishing week of amazing beer.

This year saw a huge increase in the number of beer dinners and events (check out the huge list of SF Beer Week events).  It seemed like there were three beer dinners every night and tons “special” beer events all around the Bay Area.  I heard that there were over 120 events in all over the week.

So how did I spend my SF Beer Week?  Good question.  Let me count the liver damaging ways:

  • Saturday – Alesmith tasting at City Beer which included a barrel aged Speedway Stout, Decadence 2009, Evil Dead Red Ale, Winter Yulesmith, Horny Devil, Lil Devil and Old Numbskull.
  • Sunday – Lost Abbey and Pizza Port beers at Toronado including a Cuvee De Tomme wild, Duck Duck Gooze, Veritas 007, Cable Car 09 wild, Red Poppy and Older Viscocity
  • Monday – Liver timeout
  • Tuesday – Russian River “tion” night at Pi Bar (Pliny the Younger was gone in 45 minutes) followed by sausages at Rosamunde and Magnolia for Firkin beers
  • Wednesday – The amazing Mostly Barrel Aged Beer Dinner at Scala’s Bistro
  • Thursday – Liver timeout
  • Friday – Beers from Midnight Sun debut at City Beer (3767 is great), Cellar Vault at Magnolia and finally Toronado for some Pliny the Younger
  • Saturday – Liver, body and mind recuperation

I skipped out of the Toronado Barleywine festival this year.  It’s always a zoo and full of drunks (hey! I’ve represented that comment).   The winning Barleywines usually run out during the festival but magically appear later in the month.  So I’ll be back to Toronado soon enough.  But the holy grail of beers was Russian River Pliny the Younger. It sold out in four hours at the brewery and single kegs seemed to last about 30 minutes in any beer that tapped it.  You crazy beer drinkers!

In case you’re wondering, here are the winners from the Bistro Double IPA Festival:

And the results from the Toronado Barleywine Festival:

The other beers that reached the final round were AleSmith Old Numbskull, Alpine Brewing Great, Anchor Old Foghorn, and Big Sky Old Blue Hair.


Strong Beer Month in San Francisco

The first post on the new website.  It might as well be about something close to my heart, er liver.  Strong Beer Month has started in San Francisco.  Two breweries, 21st Amendment and Magnolia, brewed up 6 beers (each) with alcohol content ranging from 8.7% to 11.2%.  Everything from double black IPA to barleywines.  It makes a liver cringe thinking about all those beers.

At 21st Amendment (descriptions liberally copied from their beer menu):

  • Imperial Jack (8.7%) – An Imperial ESB brewed by Richard of Elizabeth Street Brewery.
  • Beer School (9.1%) – Inspired by an accidental strong batch of South Park Blonde and another batch that was accidently dy hopped.  Recipe and Brew by John Foster of
  • Two Lane Blacktop (9.4%) – (not on tap yet as of this post) A double black IPA.
  • Blind Lust (9.5%) – Cuvee blend of a strong Belgian beer and barrel-aged Blind Lust from 2007 with some Lindeman’s Framboise. I had this today – it’s delicious without any bitterness and really drinkable.
  • Hop Crisis! (10.8%) – A high octane, hoppy, dank, delicious beer.
  • Lower de Boom (11.2%) – A traditional English style barley wine with some hops to add a little bite.

At Magnolia:

  • Let It Rauch (8.8%)
  • Four Winds Quadrupel (9.1%)
  • Smokestack Lightning Imperial Stout (10.0%)
  • Delilah Jones Rye (10.2%)
  • Promised Land Imperial IPA (10.4%)
  • Old Thunderpussy Barleywine (10.8%)

If your liver and wallet ($72 + tips) can handle drinking all 12 strong beers, then you get a free commemorative Strong Beer Month glass.