witsch / stacks

Docker stacks for Raspberry Pi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raspberry Stacks

These are some Docker stacks running on a Raspberry Pi using HypriotOS.

Setup

Using Hypriot's own flash tool and cloud-init the SD card can be prepared with the following steps:

brew install flash
flash --userdata https://raw.githubusercontent.com/witsch/stacks/cloud-init.yaml https://github.com/hypriot/image-builder-rpi/releases/download/v1.12.0/hypriotos-rpi-v1.12.0.img.zip

When it's done the card can be inserted into the Raspberry, which should then be configured automatically and have a Docker swarm running within a few minutes. It can be reached using ssh pirate@black-pearl.local with password “hypriot”.

Services

Pi-hole's DNS service (which you want to use to block ads anyway) is configured so that all host names ending in .pi resolve to the Raspberry Pi. With this working the following services are available:

Background

See the following blog posts for more information:

Testing

The setup via cloud-init can be locally tested using multipass:

brew cask install multipass chef/chef/inspec
patch < multipass.patch
multipass launch --name pi --cloud-init cloud-init.yaml
multipass exec pi -- sudo docker stack ls
inspec exec tests --shell --shell-command='multipass exec pi sudo sh'

Note that the patch command adds an apt section for arm64, which is needed to install Docker (on HypriotOS it comes pre-installed).

About

Docker stacks for Raspberry Pi


Languages

Language:Ruby 56.1%Language:Shell 43.9%