-
Notifications
You must be signed in to change notification settings - Fork 0
RPi Fog Node Install
This page describes all the steps required to setup a fog node on a vanilla Raspberry Pi 3B.
Download the official lite image. At the time of writing the current Debian version is 9 (Stretch). If you need a desktop environment download the appropriate image.
Follow the instructions to install the OS on the SD Card. During development the image was installed under linux using dd.
To enable ssh before booting create a file named "ssh" in the boot partition.
The OS should be ready to go. If you are connecting the RPi using WiFi edit wpa_suplicant.conf before booting the image in order to have ssh access.
Power up the RPi and connect the ethernet cable if required. Login with ssh and the default credentials:
$ ssh pi@raspberrypi
Password: raspberryStart the RPi config application:
$ sudo raspi-configNavigate the menu: Network Options > Hostname
Enter a hostname following the template: smart-parking-rpi-<id>, replacing <id> with the id of the fog node.
Exit and reboot for the configuration to take effect.
- Git is required to pull in the environment configurations.
- Pip is required for installing Docker Compose.
- OpenJDK and Maven are required for building the arrowhead core services and any Java artifacts that may be used by the environments.
Execute:
$ sudo apt-get install git python3-pip openjdk-8-jdk mavenAt the time of writing the best way to install a recent version of docker and docker-compose is using the convenience script. Execute:
$ curl -fsSL get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
$ sudo usermod -aG docker pi
$ sudo pip3 install docker-compose
$ sudo rebootGit LFS requires at least Go version 1.10. If the package repository contains a lower version install from binaries:
$ wget https://dl.google.com/go/go1.10.2.linux-armv6l.tar.gz
$ echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
$ . ~/.bashrc
$ rm go1.10.2.linux-armv6l.tar.gzOur repository uses Git LFS for storying binary files that aren't suited for Git. Add the repository:
$ go get github.com/github/git-lfs
$ sudo cp go/bin/git-lfs /usr/bin
$ git lfs install
$ rm -rf goClone the arrowhead docker repository:
$ git clone --recurse-submodules https://github.com/hegeduscs/arrowheaddocker.gitBuild the arrowhead core systems:
$ cd arrowheaddocker/submodules/arrowhead
$ mvn installFinally switch into the directory containing the desired environment (docker-compose.yml) and execute:
$ docker-compose up -d database # This step gives the database a head start (optional)
$ docker-compose up