Tag Dev

Writing a Snappy application

So, having ingested all the information about Ubuntu Snappy Core, we can start developing our first application. The platform Ubuntu Snappy Core can currently be run on several platforms: Beaglebone black Raspberry Pi2 x86 kvm Fortunately, I have a Raspberry Pi 2 in a nice orange enclosure that I can use for my purposes. Prerequisites Before starting our favorite editor, we need to install some tools to develop a snappy application.

A cool golang interface trick

While working on juju, I noticed a curious code snippet: var ( stepPrepare = executorStep{"preparing", Operation.Prepare} stepExecute = executorStep{"executing", Operation.Execute} stepCommit = executorStep{"committing", Operation.Commit} ) where Operation is an interface: type Operation interface { Prepare(state State) (*State, error) Execute(state State) (*State, error) Commit(state State) (*State, error) } Surely, storing a method of an interface definition as a variable makes no sense. But then again, what is the type of an interface method?

Forgetful systems with overlayroot

Not too long ago I needed to make a laptop resilient to ungraceful shutdowns. This meant that at some point the file system needed to become read-only, because I did not want to depend on journaling and filesystem checks to recover from power failures. To surprise, there weren’t many ways to do this - I could: boot to RAM use a modified livesystem disk image make root read-only use a linux distribution that supports this (e.