Skip to content

Latest commit

 

History

History
executable file
·
113 lines (80 loc) · 3.86 KB

File metadata and controls

executable file
·
113 lines (80 loc) · 3.86 KB

Edge Orchestration on Raspberry Pi 3

Raspberry Pi 3

Preparing Raspberry Pi 3 board

1. Creating an image and writing Raspbian on a SD card

To install the Raspbian operating system follow the instructions. We recommend using a balenaEtcher to writing an image of a the Raspbian on the SD card

SD card must be at least 16 Gb

2. Start Raspberry Pi 3

Insert the SD card into the Raspberry pi 3 and turn on the power. Make configuration settings for the Raspbian the first time you turn it on.


Quick start

This section provides how to download and run pre-built Docker image without building the project.

1. Install docker

  • docker
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker

2. Download Docker image from Docker Hub

To download the image, you must execute the command: docker pull lfedge/edge-home-orchestration-go:{tag}, where {tag} is a release name.

docker pull lfedge/edge-home-orchestration-go:latest

If it succeeds, you can see the Docker image as follows:

docker images

REPOSITORY                            TAG           IMAGE ID            CREATED             SIZE
lfedge/edge-home-orchestration-go     latest        740bcf622152        6 hours ago         161MB

3. Run with Docker image

How to run see here.


How to build

There are two options for building a edge-orchestration container:

  1. On your PC and downloading the edge-orchestration container image from the edge-orchestration.tar archive (recommended).
  2. Build directly on the Raspberry Pi 3 board.

1. Using your PC

Prerequisites: install the qemu packages

sudo apt-get install qemu binfmt-support qemu-user-static

Run the make create_context and specify the configuration file name armc and make, see example below:

make distclean ; make create_context CONFIGFILE=armc ; make

To change the configuration file, you must execute the command make distclean

The build result will be edge-orchestration.tar archive that can be found bin/edge-orchestration.tar

Next, need to copy edge-orchestration.tar archive to the Raspberry Pi 3 board, install the docker container (see here only docker part) and load the image using the command:

docker load -i edge-orchestration.tar

The build is finished, how to run see here.

2. Build directly on the Raspberry Pi 3 board

Build Prerequisites

  • docker
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker

For execution of docker commands with non-root privileges you need to add $USER to docker group.
$ sudo usermod -aG docker $USER

  • go compiler (install a version not lower than 1.16.2, recommended v1.19)
wget https://dl.google.com/go/go1.19.linux-armv6l.tar.gz
sudo tar -C /usr/local -xvf go1.19.linux-armv6l.tar.gz
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin:/usr/local/go/bin
  • edge-orchestration source code
git clone https://github.com/lf-edge/edge-home-orchestration-go.git

Run the make create_context and specify the configuration file name armc and make, see example below:

make distclean ; make create_context CONFIGFILE=armc ; make

To change the configuration file, you must execute the command make distclean

The build is finished, how to run see here.