Skip to content
Kaspar Schleiser edited this page Aug 10, 2016 · 3 revisions

Introduction

The PiFleet is a bunch of (mostly) Raspberry Pi being managed by a central server (the PiHub). It is intended to provide an easy way to share boards between developers who are physically distributed around the globe.

Overview

The PiHub is running a Salt master that is used to manage the nodes. The RasPis are running a Raspbian image that has been customized to automatically bootstrap Salt.

Current features

  • set up a VPN between the Hub and all nodes
  • manage users and their SSH keys
  • provide all nodes with a global IPv6 address

How to use

Set up access

(Access is currently restricted to RIOT maintainers.)

In order to get access, send a preferred username together with an ssh public key to kaspar@schleiser.de.

If you don't trust the admins of pihub, it is advisable to create a new keypair just for accessing the pifleet:

# ssh-keygen -f ~/.ssh/id_rsa_pifleet

Then send the resulting public keyfile ("~/.ssh/id_rsa_pifleet.pub") to the pihub admins. T Make the new key known to your ssh agent (maybe add this to your .profile?):

# ssh-add ~/.ssh/id_rsa_pifleet.pub

In order to reduce typing, add the following to your ".ssh/config":

Host pihub
HostName pihub.riot-labs.de
Port 33333
IdentityFile ~/.ssh/id_rsa_pifleet
IdentitiesOnly yes
ForwardAgent yes

You can then log into the pihub via ssh on port 33333:

# ssh -A -p 33333 pihub.riot-labs.de

or, if you've added the ssh config snipped, just do:

# ssh pihub

Play with the fleet

Once you are logged into pihub, you can get a list of nodes:

# ls /tmp/nodes

Try accessing one (hostname was active at time of writing this):

# ssh pi-ca6dfad9

This should also work in one go, e.g. ("-t" important):

# ssh -t pihub ssh pi-ca6dfad9

Add nodes

In order to hook up a Pi to the fleet:

  • download the latest image from https://riot-labs.de/dl/pifleet/
  • unzip, write to sdcard, put in the raspi's sdcard slot
  • connect the raspi to a network providing IPv4 via DHCP
  • power up the raspi
  • notify the pihub maintainers

The Pi will connect to pihub.riot-labs.de and await accepting of it's public key. Once accepted, Salt will configure users, the VPN and possibly other stuff. As soon as this provisioning is complete, you can no longer access the Pi as user "pi" for security reasons (it is now globally reachable).

note The raspi will set up a VPN and then be globally reachable via IPv6. Please check with the local sysadmins if that is alright.

Clone this wiki locally