Ansible scripts to setup a Raspberry Pi for boat use, providing access to various data sources on board both via wired and wireless connections. Features include:
- Signal K node server with canboat
- wifi hotspot
- (marina) wifi access with routing
- 3/4G Internet connectivity with Huawei e3372
- VPN access
- various dynamic dns providers (inadyn, Route 53)
- read-only root partition
- Install Ansible on your local computer
- NOTE: use Ansible 1.9 as version 2.X has an issue with reboots
- Initialize a memory card with the latest Raspbian Jessie Lite
diskutil list
diskutil unmountDisk /dev/<disk#>
sudo dd bs=1m if=<your image file>.img of=/dev/<disk#>
- Enable ssh for Raspbian headless operation
touch /Volumes/boot/ssh
- Connect the to-be-provisioned Raspberry Pi to the local network.
- Run either
./firstrun.sh
(uses hostnameraspberrypi.local
) or./firstrun.sh <ip-of-your-raspi>
(find out the IP address) to copy over your ssh key & do the initial setup (change password for userpi
, copy the ssh key, expand the filesystem) - Edit configuration in
example-boat.yml
to match your environment and fill in your hotspot details - Run
./provision.sh <ip-of-your-raspi> example-boat.yml
to provision the software & configurations for the roles in example-boat.yml.
You define what features you want to provision by adding roles to your playbook.
Installs the Signal K Node server under /opt/signalk. Uses node
and node-app
roles to install Node.js and run under systemd.
Installs and configures the software needed for the Pi to act as a wifi hotspot. Override variables:
hotspot_ssid: MarinePi
hotspot_channel: 11
hotspot_passphrase: NavigareNecesseEst
hotspot_interface: wlan0
Installs canboat utilities to interface with the NMEA 2000 network.
Installs a cron script that periodically checks your external IP address and updates Amazon's Route 53 name server information to act as dynamic DNS setup. Installs Amazon's command line tools as a dependency.
For minimal priviledges you should create a limited AWS identity for use with this profile and attach the policy AmazonRoute53FullAccess
. In your own playbook define variables
aws_access_key_id: 'YOUR_ACCESS_KEY_ID'
aws_secret_access_key: 'YOUR_SECRET_ACCESS_KEY'
with the information for this limited identity.
Installs and configures the software the Pi needs to act as a wifi client. Override variables:
wificlient_interface: wlan1
wificlient_networks:
- ssid: defaultssid
psk: defaultpassphrase
priority: 1
scan_ssid: 0
You can add multiple networks by repeating the last four lines, if needed.
Fork of original project with the intention of continuing work in this repo.