I’ve previously shown juju running on a raspberry pi 2, albeit deploying servers in ec2. Recently the lxd project released a snap that can be used to install lxd on ubuntu snappy, it even works on a raspberry pi 2. Around the same time lxd provider support landed in the master branch of juju. Naturally I thought it would be cool if I could use juju to spin up some units using lxd on my raspberry pi 2.
The following video shows it in action:
Obviously, it’s slow and unofficial, but it’s fun. For the curious these were the steps involved in getting this working.
- Juju was compiled using a raspbian image and Dave Cheney’s arm release of go.
- I needed to turn video memory right down and the available swap space up to 1GB, my sd card will not be happy.
- The compiled binaries were copied to my laptop where I built the juju snap and uploaded it to the raspberry pi 2 running ubuntu snappy.
- Juju wasn’t able to access the unix socket lxd was using. So lxd was configured to work remotely, and juju was using it remotely (they just happened to be running on the same host)
- Some of juju’s upstart scripts set extra limits on allowable open files and processes. upstart wouldn’t start these services as they were beyond what was allowed. I removed these from the upstart file, which isn’t something you’d want to do normally.
Not exactly production ready stuff, but playing is fun.