Archive for the ‘Tech’ Category

Notes from Config Management Camp 2016

Config Management Camp is becoming a great addition to the post-FOSDEM crowd. Short train ride away from Brussels to Ghent, lots of good content for an overnighter in a hotel (2d/1n). It routinely sells out (the cost is unbeatable, free ;)), so go early. Some quick notes:

Jonathan Boulle – CoreOS – etcd @baronboulle

  • /etc but distributed with a clustered key-value store with GET/SET operations
  • Support SkyDNS, Kubernetes, etc.
  • CoreOS mission is to “secure the internet” and they like to provide automatic updates. Updates = rebooting. They didn’t like ZooKeeper so much.
  • etcd: strong consistency guarantees, simple/fast HTTP API, OSS
  • Uses the Raft consensus algorithm (replicated log to model a state machine; append only log). Concepts: leaders, elections, terms
  • Written in Go, statically linked – etcd daemon and etcdctl cli

Service discovery using SmartStack – John Billings – billings@yelp.com

  • http://nerds.airbnb.com/smartstack-service-discovery-cloud/
  • Load balancing was done via something called create-lb-config and it was a lot of manual stuff which was deployed via puppet. Very labour intensive.
  • They created something called PaasTa as a Paas (https://github.com/Yelp/paasta). And they found out about AirBnB’s SmartStack
  • HAProxy allows you to re-dispatch on connection failures and easy to add connection logging as well. Each HAProxy instance also has a status page
  • http://engineeringblog.yelp.com/2015/04/true-zero-downtime-haproxy-reloads.html
  • Originally Nerve & Synapse made a Zookeper connection per service so it would make Zookeeper slow. Modify Nerve/Synapse to multiplex all operations over a single Zookeeper connection
  • Use Zookeeper + AWS without issue for service discovery
  • etcd would probably also work and supported by SmartStack but they already know Zookeper. SmartStack is conceptually similar to consul/consul-template

Platform Orchestration with Kubernetes and Docker

  • Julian Strobl – julian@endocode.com – experts in linux/OSS dev, trainers, consultants located in berlin
  • They have a 4-node Raspberry Pi cluster that one of them made
  • There used to be a Master/Minion relationship, but now its a Master/Worker relationship when you are dealing in the Kubernetes world
  • https://github.com/saturnism/gcp-live-k8s-visualizer

How CoreOS is built, modified and updated – Brian “redbeard” Harrington, Principal Architect, CoreOS

  • @brianredbeard / brianredbeard.com
  • repo sync – allows for managing many git repos at once
  • cros sdk is used to build Chromium OS, but its truly an SDK (lots of bash scripts that do things the way you want them)
  • OMAHA protocol created by Google to handle updates to desktop applications (eg. ChromeOS, Browser, etc.). There are OSS bindings provided by CoreOS in Go.

Shorter cables

I travel a lot and I one of the things I constantly do is refine what goes into my backpack (and luggage). For this trip, I decided to add a refinement — reduce cable clutter.

Apple gives you 1m USB to Lightning cables when you buy the iPhone or iPad. Its nice, but folding this all is quite a burden even when I have a cord pouch to organise it all. For almost a year now, I’ve had to carry an Apple Watch charger as well.

So why not get shorter cables? Apple makes 0.5m USB to Lightning cables which are much shorter and are all I need. After all, I’m charging on the desk with an Anker 5-port USB charger. Apple decided against making a 0.5m Apple Watch charger, so I’ve settled on the 1m Apple Watch Magnetic Charging Cable.

This is a good setup. I’m saving space when it comes to folding cables. The desk looks neater no matter where I am. I found one caveat though – the 0.5m USB to Lightning cable might not be long enough for you to charge your device on a plane. For this, I still have a spare 1m cable that is attached to my powerbank.

Backing up or taking out your data from Flickr with flickrdownloadr

I’ve been a Flickr Pro subscriber since 2005. I consume 75.36GB of storage, spread across 25,765 photos. I spent a lot of time on it since 2005, creating albums, joining groups, etc. I love the product and I’m paid up till 2018 and do not intend to stop subscribing to Flickr Pro. But I’m worried about Yahoo! and their future.

I read the Wired piece on how to get your photos off Flickr and thought it might be nice to have a backup of photos using their new Camera Roll feature. Simply put, I can get my data out but it involves me clicking “Select all” quite a lot. This is not a good solution naturally.

I found flickrdownloadr, a Mono app. It installed quickly on the Mac, it pulled in a whole bunch of Mono libraries, but after an initial login with Flickr, I would get an unhandled exception (you can’t tell from the GUI, it just crashes silently; I manually ran the app from /Applications/flickrdownloadr).

Unhandled Exception:
System.Net.WebException: Error: SendFailure (Error writing headers) ---> System.Net.WebException: Error writing headers ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
at Mono.Security.Protocol.Tls.RecordProtocol.ProcessAlert (AlertLevel alertLevel, AlertDescription alertDesc) [0x00000] in <filename unknown>:0
at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (IAsyncResult result) [0x00000] in <filename unknown>:0
at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename unknown>:0
at FloydPink.Flickr.Downloadr.Logic.UpdateCheckLogic.UpdateAvailable (FloydPink.Flickr.Downloadr.Model.Preferences preferences) [0x00000] in <filename unknown>:0
at FloydPink.Flickr.Downloadr.Presentation.LoginPresenter.ApplyUser (FloydPink.Flickr.Downloadr.Model.User user) [0x00000] in <filename unknown>:0
at FloydPink.Flickr.Downloadr.Logic.LoginLogic+<CallApplyUser>c__async0.MoveNext () [0x00000] in <filename unknown>:0

It looked like the fix might have been related to this github issue and the best way to fix it was: mozroots --import --ask-remove. I did that. I tried mozroots --import --sync, especially after reading the Mono Security FAQ, but to no avail.

Turns out, the fix was cleaning out Flickr’s Sharing & Extending — there were accounts that had access for companies that had closed down (remember Qoop anyone?). But weirdly, there were two varying “flickr downloadr” authorisations (one had a version string attached to it).

Glad that was fixed but it seems like an app that would take a long time to actually get going. My next plan is to install this on a Linux box and sync it to an always on box. Presumably all this will “just work”, since Mono/GTK looks the same everywhere.

Its a shame that Flickr doesn’t provide an easy exit path. I mean I cancelled my Basecamp account not long ago, and it was not the refund bit that impressed me the most — it was the fact that I could take all my data out, and it would be a generated ZIP file that I could unzip and consume in my browser. Things just worked.

Here’s to Flickr’s long future. And I guess, Yahoo!’s…

Sony could make a smarter charger?

I’ve been using the Sony DSC-RX100M III for over a year, despite thinking that my iPhone will be my primary pocket camera. I have to say that the iPhone 6 Plus 64GB is a fine phone, and it has an amazing camera and I don’t have plans to get the iPhone 6s Plus (see: not a worthy upgrade for photographers and is it worse?).

So generally the iPhone suffices for lots of snaps, Instagram/Facebook pics, etc. But when it comes to taking a family vacation, I whip out the Sony RX100 III. From comparisons, it doesn’t seem like I would benefit too much from the RX100 IV, since a lot of the improvements seem to be around video which I tend not to take.

The battery is rated at about 320 shots, and I think I get about there but some days are special and I exhaust the NP-BX1. Couple that with misplacing my battery charger which also has a USB cable so you can transfer images easily, I decided to grab the Sony ACC-TRBX. This package comes with an additional battery, a charger with USB pass thru so you can charge the camera directly, and of course there’s the brick that allows you to charge the additional battery.

Smart solution? You should be able to charge the battery within the camera as well as the battery in the charger, right? Wrong. They build a silly button that either allows you to charge via USB the battery within the camera OR the battery in the dock. Why?!? 

Well, that was RM300 spent on the ability to get more pictures. However one wonders what the designers at Sony were thinking? I guess there also exists the idea of a hardware misfocus.

Software misfocus

It looks like the result of a company that is focused on adding features, not focused on creating something well-designed. – John Gruber

He was referring to Evernote. We talk regularly about feature creep, don’t we? How many pieces of software have you seen that is basically mis-focused? 

Trying out the Intel NUC

I was thinking about buying a Mac Mini, but the Apple Store in Malaysia has over-priced it, due to the crazy Malaysian Ringgit (prices don’t reflect current realities; custom Mac Mini with all things thrown in is USD$1,499 vs RM6,899, today’s rate being RM6,435).

So I decided to buy an Intel NUC and go the Linux route. I picked up the Intel NUC NUC5i5RYH from CZone for RM1,643 which has an Intel Core i5-5250U processor, WiFi, Ethernet but requires you to provide some RAM, storage and you’re good to go. This is the model that allows an M.2 SSD and another regular 2.5” disk, so I chose to get the Transcend M.2 256GB SATA III 6Gb/s MTS800 to be the disk I’ll used to install an OS on for RM477 and decided that I’ll get another disk for storage/Dropbox purposes — HGST 7000rpm 2.5-Inch 1TB SATA III. RAM was easy – just make sure to get low power DDR3 RAM (DDR3L), and its easy enough to pick up 2*8GB sticks for a total of 16GB of RAM.

All in, I paid RM2,713 for this, and I provided by own MiniDisplayPort to VGA adapter. I see this as a huge savings over the Mac Mini. Sure, I can get a 2TB spinning disk on the Mac Mini (it seems that OEM folk can’t get these fusion drives at that size), but if I really wanted to go all out, I could have gotten a larger M.2 SSD and also went all in with SSD instead of spinning disk. Maybe when the 6th generation NUC comes out.

Configuring Ubuntu was relatively easy. Ubuntu 15.10 did require me to boot with the nomodeset option (so immediately after the visual BIOS splash screen, hit the Shift key, press e to edit the displayed kernel, and when it says ro quiet splash, edit it to say ro nomodeset quiet splash. You install Ubuntu via a USB thumb drive as well.

This is basically a server with X for me. It’s doing tasks like syncing Dropbox, backing up with CrashPlan, and it will allow me to use Docker containers, compile software, etc. while I’m sitting at my desk. It makes for a pretty mean desktop, all packed in a tiny little package. 

Why didn’t I go with the current i7? Seems like there wasn’t too much of a performance boost (good reading: Intel NUC Mini PC Review: Core i5 and i7 Benchmarked). The 6th Gen is also coming, so it will be a much more interesting platform for me (see the NUC6i5SYH; here’s hoping they also have i7 versions).


i