Application Note #12 - Raspberry Pi Server with IOTstack
Objectives
- create a Raspberry PI Server based on video #295 on Andreas Spies youtube channel
- document my experience.
Descripion
- build a Raspberry IOT server based on Docker containers
- this note does not describe all the steps in video #295, its a trial run. If successful, follow up notes will complete the installs
Platform
- Raspberry PI 3 Model B
video #295 installs to a Raspebrry PI 4, but I had a Pi 3 on hand so I installed to it. The plan is to evaluate on a Pi 3 and switch to Pi 4 if I keep on the long term.
1
uname -a
Linux raspberrypi 5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l GNU/Linux
=============================================================================
References
- Andreas Spiess’s Video #295 - Raspberry Pi Server based on Docker,…
- github – SensorsIot IOTstack…
- gist - “Run Raspberry Pi 4 from SSD”
- updated firmware lets you boot Pi4 from USB
Procedures
NOTEthis project is relatively new and evolving fast. In short, theres bugs, but they’re getting fixed. Some of these instructions will get obsoleted by the bug fixes, so be aware of that. For example the “docker group” issue will get fixed soon I’m sure: see issue #204. I also generated a couple issues: see #213 and #212
NOTE use the discord channel, its a primary source of info
Step 1
- purchase this Raspberry Pi 3 Model B Motherboard…. (Amazon order…)
Step 2
- install raspbian on the PI
- login
username: pi
password: raspberryStep 3
- install IOTStack following instructions here==> Go to the heading “Running”…
- NOTE ** automatic method DID NOT WORK for me!
Download the project software
Install support tools
1 | # install these support tools first: |
Download software
1 | git clone https://github.com/SensorsIot/IOTstack.git |
- Install docker with the menu, restart your system.
- Run menu again to select your build options,
- NOTE, running menu.sh gave me docker permission errors, I fixed it with these instructions…
1 | # Fix permission denied |
- From the menu, choose “Build Stack” and pick imagesNOTE** you’re gonna get “nodered addons_list.yml errors”
1
2
3
4
5cd IOTstack
bash ./menu.sh
# choose "Build Stack" and pick these images
# grafana, influxdb, mosquitto, nodered for now.
# For nodered: highlight nodered, "right click / select & build addons list" then hit enter
- while in menu.sh, hilight “nodered” and click the right arrow button. You can build the .yml file in there.
- then start the stack from docker commands menu.
- Go into docker commands and “Start Stack”
Pulls all images and starts everything up
Seems to work!!
- connect to nodered
open url
localhost:1880
or
192.168.2.21:1880
NOTE**
- to monitor logs
1
2cd ~/IOTstack
docker-compose logs -f
- Post install
- disable swap and enable log2ram
- from the main menu, choose misc commands
- choose “Set swapiness to 0 (Disables swap until restart)”
- choose “Install log2ram”
- from the main menu, choose misc commands