{"id":1340,"date":"2013-07-31T18:01:17","date_gmt":"2013-07-31T16:01:17","guid":{"rendered":"http:\/\/blog.gocept.com\/?p=1340"},"modified":"2013-07-31T18:01:17","modified_gmt":"2013-07-31T16:01:17","slug":"reproducable-automated-deployments-on-raspberrypi-with-batou","status":"publish","type":"post","link":"https:\/\/blog.gocept.com\/2013\/07\/31\/reproducable-automated-deployments-on-raspberrypi-with-batou\/","title":{"rendered":"Reproducable automated deployments on RaspberryPi with batou"},"content":{"rendered":"

For continuous integration during development, we use Jenkins to automatically run tests for all projects we maintain. Some time ago we wanted to increase visibility of the results, so we set up a Raspberry Pi<\/a> driving a few meters of LPD8806-based LED<\/a> strip on which we can address single LEDs to represent the status of individual or aggregated builds.<\/p>\n

Automating deployments is a good idea…<\/h2>\n

After an SD Card failure we were painfully remembered how hard it can be to set up a service where all parts were deployed manually. Fortunately we wrote at least some minimal documentation on how to set everything up, so after a few days we were presented with many broken builds. Of course nobody cared about the build status with all LEDs being dark. \ud83d\ude41<\/p>\n

Let’s automate!<\/h2>\n

Today we wondered if we can use our deployment-tool batou<\/a> to make reproduceable deployments to a raspberry pi, and did some tests on a vanilla raspbian image (2013-07-26 “Wheezy”).<\/p>\n

Preparing your Raspberry Pi<\/h2>\n

Of course, you can not deploy to it without some simple preparations. First thing is, batou needs to be able to log on the target host with a public ssh key, so we copied our public key to the raspi which has the address 192.168.0.5 in this example:<\/p>\n

\r\nlocal> ssh-copy-id pi@192.168.0.5\r\npi@192.168.0.5's password:\r\nType password of user pi, default: \"raspberry\"<\/pre>\n

(If you don’t have the ssh-copy-id, you have to manually append your ssh public key to \/home\/pi\/.ssh\/authorized_keys<\/code>, which you will need to create on a plain installation)<\/p>\n

Manually install minimal requirements<\/h2>\n

Batou does also have a few requirements which are needed to bootstrap the environment:<\/p>\n