Mesos With Google Container Registry

Mesos With Google Container Registry

Hey you crazy kids! Have you ever set up a Mesos cluster inside Google Compute Engine and wanted to pull Docker containers from Google’s Container Registry rather than having to stand up your own registry? Did you try it and get a bit lost? Because I certainly did, but it turns out that it’s really not that hard.

First, you’ll need to create a JSON service account key from the API Manager in the GCE console. Download that and create a new instance inside your environment (this instance is expendable - I just preferred making sure I wasn’t leaving anything on the Mesos control node myself).

Copy the JSON file to that instance and then log in. Then, issue this command:

    docker login -e -u _json_key -p "$(cat [JSON_FILE])"

(the email address doesn’t have to be a legitimate address you control, but it does have to be a legal email address. Which is odd, but there you go)

This saves the required credentials in that user’s .docker directory. So, let’s tar that up!

    tar czf docker.tar.gz .docker

Now, copy that file across to all your worker nodes (may I suggest Ansible? Just add that to your playbook during worker node creation), preferably to an obvious place like /etc (you could also store it on Google Cloud Storage instead!)

(oh, and you can destroy that sacrificial instance now!)

The JSON below is a (simplified!) Marathon entry for pulling a dashboard container from Google’s Container Registry instead of DockerHub:

    “id”: “dashboard”,
    “cpus”: 0.2,
    “mem”: 512,
    “instances”: 1,
    “container”: {
        “type”: “DOCKER”,
        “docker”: {
            “image”: “[PROJECT]/dashboard”,
            “network”: “HOST”
    “uris”: [“file:///etc/docker.tar.gz”]

The magic is the uris array that tells the Mesos worker where to find the private registry and the credentials needed to login (in this case, the Google registry).

And as for pushing your images up to CR? That’s pretty simple too:

  • Tag your image:
    • docker tag -f dashboard[PROJECT]/dashboard
  • Push your image:
    • gcloud docker push[PROJECT]/dashboard

And voilà! Your Mesos cluster can now pull from your private Container Registry!

(note, you may want to check the docs if you’re not in the US - you can push to and pull from a registry hosted nearer to you rather than just - and for those of us in the US, we can’t rely on always being the US, though it is currently)

This Quiet Darkness

As I dragged the new razor blade over my face, I instantly recognized the signs of a dull edge. There’s at least one in every bulk pack of Mach 3 blades I buy from Costco1. I didn’t stop. Sheer bloody-mindedness and laziness. With predictable results.

I think of myself as not being too vain, but there’s something that just screams failure when you step out of the shower with blood running down your chin. Thirty-seven years old, and can’t even shave without making a total mess of it.

Therefore, I will be staying inside for the rest of the day, waiting for the damn thing to clot properly and wondering where my next psoriasis flare is going to be found. I’m not really sure that this ‘getting older’ thing is all it’s cracked up to be…

  1. Yes, yes, Gillette are evil…but Dollar Shave Club and Harry’s are simple bundlers of Dorco razors, which I’ve found to be absolutely terrible. [return]

Things Learnt From The Family Visit

Picnic has good BBQ but the real draw is their apple crumble - the best I’ve tasted on this side of the Atlantic.

Waking up on the airbed facing a wall and taking 30 seconds to realize that no, I’m not at home in Bicester.

That my new rug has more square footage than the bedroom I spent three decades sleeping in.

Blue Bloods is a terrible TV show.

But Criminal Minds: Beyond Borders is so jingoistic and offensive that I think that it’s secretly staffed by a cabal of Russia Today writers.

I’m getting better at this pizza thing. One of them was almost round. I forgot to put cheese on it, but it was round…

Concrete cakes are great.

My sister’s Funko problem will soon require a 12-step programme.

Don’t forget that Dad doesn’t like working with water.

I have undone all my exercise to reduce the Christmas weight-gain in one week. Good job!

It is easy to forget that Durham has a load of great things going on.

While the psoriasis continues to spread, my liver is fine. So there’s that.

Nzinga’s is probably the best brunch ‘secret’ in Durham right now.

I can no longer use ‘mid-thirties’.

Going to Saltbox at 1pm on a Saturday is a recipe for sold-out sadness. Sorry, Mum!

I need to get googly eyes for Bob.

Everything is so quiet now.

I had 1000 teabags this morning. Now I have 999. THE COUNTDOWN BEGINS.

Everybody is Ill


A photo posted by Ian Pointer (@carsondial) on

I have 1.5kg of British mini eggs. This might, might be more than even I can deal with.

But I will try.

Having a full house is slightly odd. With the travelling this year, not sleeping in my own bed is less of an issue, but I can’t just go off and do my own thing at the moment. Of course, by ‘my own thing’ I mean ‘I can’t sit in pyjamas and watch 1970s British television all day and night’, so it might be a good thing, really. Plus I am going to get cake. And presents!

(My sister points out that I am not to over-sell the cake. But then when I said ‘it might be rubbish!’ I got accused of calling their proposed cake rubbish. So I can’t win. I’m sure it’ll be great, though!)

Today, sadly, everybody is ill. Which means people covered in blankets on the couch, me sent off to Target to find medicine, and a rather quiet Sunday. Almost, in fact, like Sundays back home. Maybe I should try and find an episode of Antiques Roadshow for later on this evening…


Less than a week to go until my family arrives again!

“Haven’t they just been here?”

No, that was just my Dad (and uncle and my uncle’s brother). This is not an installing-a-new-shower visit, but rather a visiting-Ian-on-his-birthday visit!


I may be excited. Of course, it does mean that I’ll be spending the week on an airbed (because I am a good brother and I’ll give up my bed for my sister), but there will be cake. Cake is important.

Oh, and also British mini-eggs. MINE! ALL MINE!

(Okay, so I may share. Maybe. If you are all very nice. But I’d come around quickly, as I apparently have previous form when it comes to mini-eggs)

And now, IKEA! Plus board games. Of course.

Easter 2016

Easter Holidays are a weird time here in the US. After growing up in a country where the four-day weekend is a national institution, it is deeply odd and depressing being in a place where the chocolates are mostly terrible and there’s no concept of the Bank Holiday Weekend.

(Christmas would have the same issue; but after one miserable Christmas here, I have fixed that by simply going home every year. It helps)

But, you have to get by, and so, I have tried to approximate the weekend. This has involved watching old episodes of Top of The Pops from 1981, a Lindt milk chocolate bunny, cleaning, buying outside furniture, ironing, and getting through as many episodes of The Sweeney as I can before catching up with Stewart Lee’s Comedy Vehicle. All while thinking I should be doing something more productive. So in that sense, it really is like Easter Weekend.

Also, it’s been raining solidly since 2am last night…the wet miserable rain helps a lot to set the proper mood.

Heath Robinson Rules OK

2016: where I boot a Linux VM with VirtualBox on MacOS X with a USB passthrough driver so I can hook up a EXT3-formatted HDD and read the data from it, copying to a network share which is back on MacOS X, but actually a mount point to a USB 3.0 pocket drive.

The most impressive part of all the above is that it all works. Although I may need 2 weeks to copy 2Tb of information to the new drive.

I was planning on spending the weekend working on algorithms, digging into Spark 2.0, and being productive. But I watched How To Steal A Million instead and I think I made the right decision.

Oh, also: chamber vacuum sealer-enhanced cookie dough is now a thing.

Under pressure.

A photo posted by Ian Pointer (@carsondial) on


This entry is late, but I had a good excuse for not posting yesterday - I instead spent the day making a roast dinner for friends. I think my Yorkshire Pudding game is getting pretty good at this point:


A photo posted by Ian Pointer (@carsondial) on

(that, of course, is tempting fate for the next time I attempt them)

The Third Man is playing at The Carolina Theatre this week and you should see it if you can. If you think that Major Calloway is perhaps too terribly arch and British, I’d like to point out that the actor playing him had a clause in all his contracts that specified that he would not work on days where a cricket Test Match was being played. NONE MORE BRITISH.

(of course, he’s also in this film), which…well, how that ever got made continues to elude me. Or how come everybody involved didn’t get arrested)

This week, though, this week should be quieter. I am, maybe, just maybe…going to have a Saturday and Sunday all to myself for the first time since…January?

Also, when did it get to be mid-March? I feel like people slipped some extra days by me when I wasn’t looking…

Slight Return

My second trip to San Francisco was shorter, but sweeter. And despite being there for less than five days, I managed to consume more alcohol than the last two-week jaunt, aided and abetted of course by winebratsf. It may have been a washed-out weekend, but it was a fun one.

So huge!

A photo posted by Ian Pointer (@carsondial) on

Now, though, I’m looking forward to getting back to Durham this evening and staying there for a while. We’ll see how long that lasts, anyhow…

Rosé By Any Other Name Would Not Taste So Sweet

“Here, the intersection of the timeless moment is England and nowhere. Never and always.”

“It’s like honey / you can’t buy it with money”

I find myself, as ever, with nothing useful to say.