Move over CoreOS and Atomic...


There's another Docker-centric OS in town: RancherOS

"Hopefully, this will allow users to focus more on their container workloads and less on managing the servers running them."
- Darren Shepherd 

I've found it's easier and more reliable than boot2docker for local development, but you may want to consider the security ramifications before using it in production.

P.S. Check out their orchestration tool as well: Rancher

Docker UI-based orchestrators


With all the success and popularity of Docker, I'm surprised at how primitive and clunky the orchestrator and especially the UI solutions still feel.  My current favorite is Rancher but I'm keeping an eye on many other UI-centric solutions:

...let me know in the comments below if you have another favorite.

Pinewood Derby LED lights - lessons learned


My 9-year old son really likes Percy Jackson and the Olympians so last year he decided we should make a Poseidon-themed pinewood derby car.  It turned out pretty well and we had a lot of fun.  This year, he decided to continue with the Greek mythology theme and make an Apollo sun god car.

The shape is pretty straightforward and the coloring and detail would be easy (bright colored paints, etc), but the lights were an interesting challenge.

I'm not much of a handyman (and even less of an electrician) so I wanted to share my experience and lessons learned so others might avoid some of my pitfalls.

First, we cut the block into the basic shape and sanded it a little.  The important thing to notice is the central portion of the car.  To fit a battery and LED wiring, you'll need a rather large cavity so I recommend using the entire height of the original block and at least half the length.

We then drilled out the bottom.  The central portion would be for the battery and LED lights.  The back portion would be for additional weight (to reach our target of 5 oz.).  It's important to remove as much wood as possible without puncturing through the top so I used a 3/4" drill bit and wrapped a piece of blue painters tape around the bit stem at the depth distance so I could use it as a guide.  After the main area was generally drilled out, I used a smaller bit (with the same tape trick) to further refine it.  ...not especially pretty but good enough for my needs:

Although the original diagram only had headlights, I suggested to instead have lights shining in all directions (like the rays of the sun).  My son liked the idea so we went to a local hobby shop to find an LED light strand. After a little digging, we found a really nice 20-light strand at our local Jo-Ann craft store.  The important features were: super thin wires and small bulbs.  Although it required two "C" batteries, I figured we could cut the wires and use a more compact 9-volt battery instead.  At a mere $5, it was worth the risk.

The plan worked perfectly.  We first tested with two "C" batteries (as designed) and it had a mellow yellow hue:


After cutting the battery pack wires and touching them to the 9-volt connectors, the lights shone a brilliant white.  Sweet!

Mistake #1 - It turns out batteries have two important features: voltage and capacity (current).  I knew LED lights were pretty hardy and could handle the change in voltage from 3v (1.5v * 2 C batteries) to 9v, but I didn't know anything about capacity (measured in milliampere hours -- mAh). Standard alkaline "C" batteries are rated at 8,000 mAh whereas 9-volt batteries have only 565 mAh.  In other words, I was only going to get about 4 hours of LED light.
Hindsight for #1 - I should have ordered a similar alternative that only required three "AA" batteries.  That doesn't sound like a big difference, but the packaging says three "AA" batteries (2,700 mAh) will last 72 hours so a 9-volt battery would give me about 15 hours of LED light (a big improvement).
I figured it would be extra cool to have a switch on the car to turn the lights on and off so I raided my kid's toy basket for an old race car that no longer worked and dismantled it to remove the switch (note: if you prefer a less aggressive approach you can buy one online)

I then selected a drill bit that was just slightly larger than the LED bulb and drilled 20 random holes. In thin wood areas (like the top and sides), the lights inserted fine, but in thicker areas I had to use a slightly larger drill bit to follow the original hole partway to the surface so the LED base could fit and the light could protrude through the surface:

Mistake #2 - Although I had verified the 9-volt battery would (just barely) fit in the main cavity and I remembered to avoid drilling holes in the same area as the wheelbase, I failed to realize that due to the length of the LED bulb base, I couldn't place a hole in the same immediate vicinity as the battery.  So, I ended up with some holes in the top and sides that I couldn't use.

Hindsight for #2 - Mark out the area for your battery and avoid drilling holes nearby.
Next, my son painted it (using glow-in-the-dark paint, of course!) and added some stickers and glitter for a sparkly sun effect:

After everything dried, I applied a few layers of clear acrylic to bring out the color, reduce air/wheel friction, and seal in the glitter.

Next, I started gluing the LED lights into the block.  (I used the original drill bit to manually clear the hole of any residual paint or blockage by inserting it into the hole and twisting by hand.)

Mistake #3 - I used standard Elmer's white glue which took a loooong time to dry.
Hindsight for #3 - Use hot glue or crazy glue to secure them in place.
Pretty soon, though, it became apparent that I was running into two problems: weight and space.  I verified the 9-volt battery, lights, block, and wheels were under 5 oz. but I hadn't taken into consideration the glue, switch, and paint which suddenly pushed me over to 5.3 oz.  Plus, the 9-volt battery literally filled most of the usable space making it very difficult to work around (and would probably prevent the final flattening of the wiring).  So, I decided to ditch the 9-volt battery and go with a smaller battery.  After a couple attempts, I finally settled on the Duracell Ultra Photo battery.  It was much smaller and its 3 volts were adequate (albeit less impressive than the 9 volt luminosity).  Unbeknownst to me, it also had 800 mAh capacity (more than the 9-volt battery).

I then borrowed a friend's soldering iron so I could attach the LED wires, switch, and battery.
Mistake #4 - Soldering a battery is crazy difficult and it was unbelievably frustrating.  I didn't realize you had to roughen the surface pretty thoroughly just to get the solder to stick.  I was also using a low-powered soldering iron with non-lead acid-core solder which seemed to react with the battery surface to create a liquid sheen that further prevented the solder from sticking.  To get an idea of how frustrating this is, check out:

Hindsight for #4 - Definitely purchase a battery with wire leads already attached!  For example, the Mitsubishi A6BAT battery gives you 3.6 volts and 2,000 mAh.
After a LOT of patience (and concern by my wife and reduced project excitement by my son), I finally succeeded at getting a manageable result:

I tested the switch and everything worked like a charm!

I then sealed the battery connections with hot glue for added stability:

I then inserted the battery into the car and finished gluing in the rest of the lights.  Note: I had a few more lights than available holes so I just stuck them under the mass of wires inside the car to give the bottom a cool back-lit effect.

Since I didn't want a bunch of wires sticking out and our council rules also said "No loose materials of any kind (e.g. lead shot, mercury) are allowed inside the car" I decided it would just be easiest to add hot glue to cement everything in place.
Mistake #5 - I can't begin to tell you how bad of an idea that was.  Although it wasn't apparent at the time, this would turn out to be a grave mistake.  I'll give more details further down, but suffice it to say, NEVER commit yourself by making a key, complex component inaccessible later on.
Hindsight for #5 - ...provided at the bottom of this post
Thanks to the lighter battery, we were well within the 5 oz. limit

After nailing in the wheels, we added some mini mirrors for a final bit of flair (and to cover the extra holes I had drilled but couldn't use ;)

Flipping the switch....SUCCESS!!

We all oohed and aahed and took pictures to commemorate the hard-earned achievement.  It was quite a thrill to switch the lights on and off and we couldn't wait for the pinewood derby race two days away!

The next morning, I casually strolled over to the car to enjoy the thrill of turning on the lights again, and...nothing happened.  No lights.  I flipped the switch again.  Nothing.  I shook it.  Nothing.  I prayed.  Nothing.

Suddenly, in the pit of my stomach, I realized I had a major problem.  An Apollo 13 sized problem (pun intended, although I wasn't laughing at the time).  Long story short, I had to melt a fair amount of glue, rip out the switch, bypass some wiring, and throw in a ridiculous amount of embarrassing workarounds (like a pen spring, nail, safety pin, ...) to get the lights to come on again (hard-wired to stay on).

Ughh.  It was a messy, stressful hack that took the better part of an afternoon (on the eve of the race, no less)!  After getting the lights to stay on, I sealed it up again and painted over it to eliminate all traces of how unpleasant it looked.

Three hours later, the lights dimmed and finally went out.

Sigh.  With a mixture of tears, bitterness, and exhaustion, I was forced to accept defeat one day before the race.   :(

It turns out, I really had no understanding of battery capacity (as mentioned earlier) and if I had known I'd only have 2-4 hours of current I would have obviously waited until the morning of the race to activate it!!
Hindsight for #5 - Avoid cementing everything in place and instead allow access to the battery and connections.  Use a clear plastic sheet to cover the battery/light area (for example, cut out the side of a large Fiji water bottle) and use thin Velcro to hold it in place over the battery and wires (with a small indentation for the switch).  Not only is it cool to allow people to see the inner workings of your car, but (more importantly) it gives you access to the battery and wires!  As mentioned earlier, buy a battery (or multiple, if you win and need to race it on different days) with leads attached.  Then, use wiring butt connectors to attach a switch and a detachable connector to the battery.  That way, you can easily troubleshoot electrical problems and replace the battery when it dies.

Conclusion: it was worth it and I learned a lot.

P.S. My son took 2nd place   :)