In part two, I said that the Dockerfile and fig nicely worked on my box in boot2docker.  Given that Docker exists to move things from environment to environment, I anticipated that that would mean the system would now work in our Jenkins on Linux continuous integration environment.  An error on my part…

It turns out that I’d downloaded a version of boot2docker which supplied Docker 1.5.  That’s a very recent release of Docker, it turns out, just released in February.  The Jenkins server is running Docker 1.3, as the CentOS repos it uses don’t yet have newer versions.  Docker 1.3.2 was released last November, with 1.3.1 in October.  I’m not sure sitting here at home which minor version the Jenkins server is running, but what I am sure of is that the behavior of Dockerfile’s WORKDIR changed between the two.

Docker does a good job of making it easy to jump between the documentation supporting different versions.  In 1.3, the documentation for WORKDIR says it sets the working directory for any RUNCMD and ENTRYPOINT instructions that follow it in the Dockerfile.  In 1.5, WORKDIR also supports COPY and ADD.  My Dockerfile used ADD to bring specific files into the container, so that variance in behavior meant that my ENTRYPOINT couldn’t actually find the files I’d moved in.  It took me a while to figure out –  inspecting the docker logs had told me that the ENTRYPOINT wasn’t working, but not a whole lot more.  To debug it, I had to take out my ENTRYPOINT so that I could get the container to start up, and then go in with a `docker run -it -d [IMAGE] bash` to actually go look and see where things were.

Now, once I knew I had a WORKDIR behavior variance, I went looking at the release notes for Docker, from v1.3 through 1.5.  WORKDIR was mentioned, but only in the context of environment variable expansion.  I also went looking on GitHub for issues with information, and didn’t find anything that appeared relevant.  (There are 19 open and 68 closed issues related to WORKDIR, as of this evening.

I mostly spent the time writing this up moreso to catch my debugging path, and perhaps make this easier for someone else to find.  It also makes me consider digging into what support Docker provides for indicating the version of Docker that an image was built against.  We have `docker history` to see the list of commands used to build the layers.  We have `docker info` and `docker version` to pull the information about our own Docker environment.  Somehow annotating what Docker version a file has been tested against, and/or an image has been built with might be a very useful structure, in terms of determining the viability of the Dockerfile in another environment.  Beyond commands changing behavior, there is the very real likelihood that new Dockerfile commands will be added with new Docker releases.  Having some kind of concept of these match perfectly versus these might not match would be a good place to work.

Note: I did do a check out on registry.hub.docker.com to see how they handle support for differing versions of Docker. The official distributions of mongoCentOS and redis tag their releases and provide links to their Dockerfiles, but just generally state ‘

This image is officially supported on Docker version 1.5.0.

Support for older versions (down to 1.0) is provided on a best-effort basis.’

I did use the mongo official release as part of my efforts: it itself seemed to do fine across 1.3 versus 1.5.  A quick peek into its Dockerfile shows me that I wouldn’t have tripped the WORKDIR issue, at least unless its debian:wheezy base image caused an issue.

Note: further poking shows that someone added an issue for Docker file version information about a year ago (March 29, 2014) in issue #4907.  Happily for my cause, it was tagged by a software engineer at Docker as a proposed feature just two weeks ago.

 

So, my last post ended with the statement that ‘having a non-breaking build is a wonderful thing’.  Too bad it wasn’t quite that easy…

After verifying that my Dockerfile ran in my boot2docker environment, I merrily checked in my changes to the base build, pressed ‘Build’ on Jenkins, and waited for the build success message to appear in our team chat room.  No luck – build failed.

OK, it turns out that our build is actually controlled by a bash script which calls fig and docker.  No worries – will just test it out in boot2docker, as I really don’t like build break messages coming over the wire.  Here’s where the problems started…

1. First step: do the fig commands in our build.sh work in boot2docker?

boot2docker for OSX comes prebuilt with fig.  boot2docker for Windows doesn’t, at least as of issue 603, which is still open for boot2docker 1.5.  fig is now Docker compose, and I found a cheat to add an alias for fig which under the covers makes use of a Docker container for fig.

2 . Second step: run the build.sh itself..

It turns out that ./build.sh doesn’t work in boot2docker.  That’s because boot2docker’s underlying Linux distribution, Tiny Core, doesn’t have bash installed.  Turns out to be solveable using tce-load, ala ‘tce-load -wi bash.tcz’

3. OK, now why does the build.sh still not work?

I have fig aliased and it’ll run from the command-line (fig up works…), bash now is available, so why am I still getting told it can’t recognize ‘fig’?  Turns out that the alias won’t work within the script itself and I needed to hack the script to source my .bash_aliases.  Bleah.

4. It works on my box!

The container builds, it starts up, and my simple curl test works well, after replacing localhost with the result of boot2docker ip to get my VM’s IP address.  Docker and fig exist to make things work very portably, so I check in and…  all’s not well.  More for part tres.

I bounce back and forth between a Windows laptop and a CentOS workstation for my current project.  Now I’m working with Docker, which exists to containerize applications and let them be bundled or at least specifically describe what environment they need. Docker then makes that environment work, regardless of whether it’s on my development box, a test box, or a production box.  No more “but it needs version ‘foo’ to work properly and our system only has version ‘bar’ installed….”  However, in my CentOS environment Docker can work naturally directly, whereas in my Windows environment, it needs an intermediary to get to Docker goodness.  That intermediary is boot2docker, which exists for both Windows and OSX.

Once I’ve got boot2docker installed and am in, it’s now time to do a docker build.  In my case, I’m building against a local Dockerfile which exists on my laptop.  However, that file and its supporting resources all live outside of the context of the VM boot2docker spins up within which to run docker.  How could I mount a drive to share the files in?

The approach listed in boot2docker’s README.md to mount a drive didn’t work for me.  Or, more properly, I was able to set up a mounted drive.  It just wasn’t one that I could write to from my development box. I could look in it, but not write to it. Unsure why.  However, apparently relatively recently boot2docker added the ability to go to /c/users – see the first comment on this post, which described a _different_ way to map drives.  (I looked at 3.)  The boot2docker default mapping doesn’t look at the rest of c.  Just /c/users.  Thankfully, my stuff already lived in a nested directory below.

Mission for the night accomplished: Docker file refactored to run with a different base image, one that assumes everything’s pre-built rather than does magic things to have a Maven build happen in the Docker container.  That makes the world much nicer for things like new unit-tests that depend on having a Mongo database around…  Too bad all of that wasn’t in my sprint task list.  But having a non-breaking build is a wonderful thing.

A local women in technology group sent out a message that another group is looking for speakers for an Internet of Things Event.  Said the group was very interested in making sure that women were visible at the front of the room.  I count that an admirable thing, given the relative lack of women in the computer science field : having visible folks from any ‘identifiable’ group makes it easier for members of that ‘identifiable’ group to project themselves into that role, which makes it more likely that the field will grow in diversity and perspectives.  Note that ‘identifiable’ group could mean gender, race, ethnicity, economic stratus, etc – if you can identify with it from seeing or hearing someone, it’s an identifiable group.  (Note that under my definition, that would mean that that doesn’t require that that speaker identify that way, just that other folks categorize them as like themselves.  But that’s a side note.).

The challenge for me: after getting information from the organizer, I wasn’t sure my background and expertise quite fit what they were looking for.  Now, there’s an oft-raised concern of women that we back away because we feel like we’re not quite good enough for the challenge, that we’re ‘impostors‘ who don’t give enough credit to our own accomplishments.  In my case, I had done a single IoT project, which had never gone into production use.  Does it count as a ‘Thing’ (my capital T) or a prototype thing?   The group itself is focused on Microsoft .NET technologies, which doesn’t mean that they don’t do other stuff, but it does mean coming in with a concept of how my IoT [T][t]hing compared or contrasted with the Microsoft approach would make me a more informed speaker.  Frankly, I didn’t want to do that much delving.  I’d have been happy to reshape my particular talk and update it a bit, but I didn’t want to the person at the end of the panel feeling like they were the weakest link.

So, I ultimately passed.  I’d rather dedicate geek prep time to building an IoT effort #2, or working on an open-source project, or exploring the ins and outs of containerization technologies or Javascript frameworks or PaaS or NoSQL database interaction patterns.  But I sure hope another female IoTer steps up and is visible…  going to kick myself later if the panel still ends up being only men.

 

 

Query: does anyone else ever think about whether they’re making the person next to them look bad by putting more weight on the bar than they’re lifting?  And why does that thought usually only come to mind when it’s a guy next to me, rather than a woman?  Bleah.  I don’t want that moving around in my brain while I’m trying to hit a new max or otherwise just trying to move that weight.  For a woman, I’m impressed if they can do more than me.  For a guy, I’m happy to be in the same realm, excited when I’m pushing more.  (The guy next to me was able to squat lower / more perpendicular to the floor – I worry too much about the strain on my knees, given their history, to squat that low with much weight.)

Letting my competitive nature consume too much of my brain…  need to compete just with me for this stuff, rather than risk doing something dumb.

 

 

 

Among the resolutions for the New Year this year was this one: work through all 31 Proverbs, summarizing each, and memorizing a key verse from each to help bring it back to mind.  31 is about 1 every week and a half, with a bit of room for catchup.  Bible memorization is not my strong suit, hence giving myself lots of room to succeed.  So far, the verses chosen are Proverbs 1:7 and Proverbs 2:1.  I must confess: Proverbs 2:1 is a long one.  It’s the one I thought was important in instructing me, not necessarily the verse important for summarizing the Proverb.  I was sorely tempted to choose a shorter one.  Given that I just chose today, it may yet retreat – though I hope not.  I’d rather learn the thing that I’m led to tuck away into my heart than learn the short one to achieve what is admittedly an artificial goal.

Our pastors are working through a sermon series talking about the Advent Conspiracy.  Its four tenets are Worship Fully, Spend Less, Give More and Love All.  Our family was honored to get to light the Advent candle on the week the topic was ‘Spend Less’.  So how’d we do, on Spend less in particular, or the Advent Conspiracy overall?

Tonight I headed to CVS to get stocking stuffers for my 3.  Some $70 later (at least it included tape), my kids stockings will have a bit of candy and several things they’ll otherwise need for our family trip later this year.  Counting it as a partial success – $70 seems like a good bit to spend on what I think of as relative inconsequentials, but everything in there is something that I think they’ll use for a particular need.  (Or eat, in the case of the smattering of candy.  On the plus side, I bypassed the normal ridiculously large candy bar / candy box as a Christmas present – my kids do not need an infusion of sugar.)

Present-wise, I think we as usual overdid it.  We worked to keep a running list (Google Docs!) so my hubby and I didn’t lose track, but it’s still too easy to keep finding neat things.  I did attempt to front-load with low-dollar items: each of the girls are getting mugs that I think they’ll enjoy both receiving and drinking from, mornings after mornings.  Each are getting knee high socks.    (I’m pretty sure neither are specifically aware of this website, and either way, even if they know mug and socks, I still think they’ll enjoy their particular mug and socks surprises..  )  These are things that speak to particular interests of theirs at low dollars.  My son didn’t get a mug or knee-high socks, but got his own corollary of things that are low budget, but have sentimental impact. At the end of the list, though, we get to the bigger dollar items.  Nothing ridiculous for any of them individually.  We did splurge on an item that I budget across the three of them – think they’ll be surprised, AND it solves a problem we’ve seen in our house.  By having one of these allocated to the kids, I’ll get my bedroom back, I think.  THAT I find very valuable – it’s basically a Christmas present to me and my hubby!

We did give more – of time, at least.  Haven’t tallied up funds.  But the point of give more is actually time.  We used time as a present more this year: GroupOns for activities with a young friend.  Concert or theatre tickets with either the promise of a companion or of a babysitter.  These, we hope, will be memorable for the recipients, moreso that a typical , well, maybe she needs one of these presents.

Worship fully..  ugh.  My advent worship is bursty.  I revisit my advent calendar and work to catch up, reading through 3-5 days of devotionals at a time.  SO reflective.  It’s better than it’s been in previous years, and I’ve tried to highlight aspects to my kids, but….

Love all…  my ENTJ is working on that…

 

 

I was trying to find the rest set of libraries and tools to handle a Java web services project, I swear! DropWizard looked like the right stack – Jersey 2.0, Jetty HTTP server, documentation showing bundling as a fat jar, means to readily log and get timing information, examples for integration of authentication…  the tipping point of awesomeness was when they proposed adding a banner.txt into a particular folder.  “Normal” projects would list things like version information for the service, who to contact for support, etc.  THIS project suggested including ASCII art and then gave a link to an ASCII art generator.

Here are a couple of examples I enjoyed:

* tattoo idea for a software geek who enjoys weightlifting

* fun faces leaving a message for my kids

* an incantation to defeat a software error

I think every day, I’d need the banner.txt to built out from some random message, just to see who noticed….

 

 

The life of a technologist is rarely boring. If you’re a senior developer or architect, you’re expected to drop into a project situation and make sense of nebulous requirements, new and/or undetermined technology stacks, and unreasonable timelines (they’re always unreasonable – it’s a truism – partly because the requirements are nebulous, partly because you’re getting up to speed on the tech stack..) Your job is then to convince folks you know enough to get the job done, while knowing you don’t yet, and then paddle like crazy to figure out the right stuff to actually get the job done. If there’s a new technology out, you’re supposed to have an understanding and an opinion of where it fits in the ecosystem. To be effective, you have to know how to do all of the above, while keeping your conversations at the business impact level. Oh, and you have to find a way to lead folks who think they can all do things better than you. If you’re honest with yourself, for at least some areas, they can. Your job i to stitch it all together. Good luck.

A few things that I’m pondering and working on to various forms and flavors…

– Several of us at work pitched in to get an Oculus Rift (DK2).  We rotate through, so each member gets it one week of every 6.  Geeky fun.

– Working with the Rift usually involves an Unreal or Unity game engine interaction.  I’m not likely to built out a full scale game, so I’ve instead been looking at Javascript interactions: see Babylon.js or Three.js, both of which can apparently interact with the Rift, albeit on different browsers / via different means.  Skipping the game route altogether, one of the guys and I are working up a viz project which could be ridiculously cool and useful as a way of letting users deal with lots of views of lots of data.  But it’s a side project for both of us, so we’ll see how far and how fast it goes.

– I’ve started a new project at work.  Key elements involve Java REST services (RESTEasy versus Jersey versus..), authorization and authentication (Spring??  Java security policies??  something entirely different??), and maybe Docker.  Maybe even a bit of OpenStack.  Hitting a few MeetUps of late…  Some are better than others.  But that’s a whole ‘nother topic.

– I’ve still got an ongoing project at work that involve NLP and Neo4j (graph database) and trying to figure out how our infrastructure scales with and/or on top of it.  And how to spend limited hours being useful to that project, both because of my new project and because of budgetary concerns for the existing project.  (And because the primary developer is doing a pretty decent job – just mostly needs a sounding board and sanity check here and there, as well as a bit of customer engagement mentoring.)

– Oh, and a little bit of business development related to healthcare and some repositories of information available at the NIH.  Product vision kinds of discussions, possibly leading to SBIR grants or other means to actually, you know, pay for someone to develop a good app to access data in a meaningful way.

– I’ve tried a bit of c9.io and codio.io to see if I can do some Minecraft extension development in a virtual environment.  Objectives are two: see if I can build something cool for my kids (cool being both interesting to them, and potentially a spark to get them trying extensions on their own) and see if I can build up some sort of class lecture for use at a girls in computing kind of event.  So far c9 is winning, in terms of usefulness, though that’s mostly for my Rift oddball project.  Haven’t tried to run Minecraft on it as yet.  Maybe that’s my next thing while I wait for laundry tonight…

Things I haven’t done of late: anything with Arduinos or Furbys.  I’d still like to go back and figure out how to solder my connections to the Furby, and maybe even to a circuit board.  Also interested in trying to redo the example with Firmata/Johnny5.  But the project list is long, and the free time is always short.