Skip to content

constant-flow/raspberry-pack

Repository files navigation

Raspberry-Pack
raspberry-pack.png Why Raspberry-Pack: Don't flash each Raspberry Pi by hand, but automate things and make it reusable, and all that headlessly: No keyboard, no mouse, no monitor, no ssh needed.

Headless, easy, fast and reproducible

CLI

What is is good for?

  • Raspberry-Packs bundle a specific setup you want to clone/roll out on multiple devices or you want to share with friends or the internet
  • It installs packages, runs scripts, setup services on your Raspberry Pi similar to a configured image
  • Its aim is to reduce the manual overhead of installing scripts by hand with automation
  • Raspberry-Packs can be added from a public git repository (e.g. example, all promoted). These packages will check for updates on every execution of Raspberry-Pack
  • Raspberry-Packs can be used locally. Simply create a folder named raspberry-pack-* inside the packages directory

Why not using an image

  • In contrast to an image, a Raspberry-Pack installs an official distribution image first and based on that the rest
  • Every installation step and change is comprehensible upfront, whereas an image is a blackbox where you have no clue what was installed and done. Thus it's modular and developers can copy interesting sections from other Raspberry-Packs
  • Images are huge and hard to trim down, Raspberry-Packs are tiny scripts and links to downloads
  • Raspberry-Packs are flexible e.g. WiFi or hostname are adjustable via the wizard. Adjusting a Raspberry-Pack is done in a text editor and doesn't require an export.
  • At installations it does the updating and upgrading automatically, so you always start with a solid OS

How to use Raspberry-Pack

Raspberry-Pack is designed for use with Raspberry Pi version 1-4

The step by step wizard guides you through the installation process

  • download raspbian image
  • select package
  • flash to SD
  • boot your RPi
  • informs you when the install is done
  • helps how to connect to it via ssh (not required)

Getting started

# install Raspberry-Pack tool
pip install -r requirements.txt

# run Raspberry-Pack wizard
python wizard.py
  • Raspberry-Pack relies on Python 3, try using pip3 and python3 when encountering issues
  • MAC/OSX supported only (No Windows or Linux support)

Create your own Raspberry-Pack

Create a folder inside packages/. Each package name has the prefix raspberry-pack-.

Filename required use
readme.md documentation & description for that package
wpa_supplicant.conf contains WiFi details to connect
📦/apt-get-packages.conf space-seperated list of packages to install via sudo apt-get install
📦/hostname.conf defines hostname
📦/user-password.conf defines user's (pi) password
📦/autologin.conf when this file exists, the system will login automatically (CLI/GUI)
📦/no-update.conf when this file exists, the system will not update system packages (only use during development)
📦/update-only.conf when this file exists, the system will only update system packages
📦/enable-vnc.conf when this file exists, the system will be connectable via VNC (virtual Network Computing)
📦/run-before-boot.sh script to run when the SD flashing is done. Executed on your Mac, e.g. to alter the config.txt on SD
📦/run-on-boot.sh script to run after updating and installing apt packages
📦/run-after-boot.sh script to run after the "installation done"-signal. Useful, when connection will drop
📦/service-starter.sh when this file exists, this script is called via a service at every boot of the Raspberry
📦/* add all your files you need for your script in here. In your script you can access it here /boot/📦/*

📦 = raspberry-pack

If you don't need a certain *.conf file, better delete it, than leaving it empty. Keep things tidy.

Take care your script doesn't need user interaction, use piping and other tricks to achieve required inputs

Development

Ressources

Feature backlog

  • handle empty files in a better way
  • make username adjustable via user-name.conf
  • ask if all security relevant infos should be removed from the raspberry-pack (or zipped and encrypted)
  • specify version of raspbian image to store the precise state
  • replace bash scripts with python scripts
  • make linux compatible
  • make windows compatible
  • allow packages to ask questions as well in an easy way (e.g. AP will ask for ssid and wpa-passphrase)
  • put all features into sub-packages (MQTT broker, AP, Apache in a separate folder under raspberry-pack) to make package creation easier
  • create packages based on sub-packages (user can tick features he wants to have e.g. AP + NodeRed)
  • Add automatically the installers ssh key
  • run ansible script when system is setup

Future packages / sub-packages

  • Docker on Pi
  • Samba (currently requires user-interaction, that can't be easily by-passed)
  • Presentation-Pi (Videos/Photo slides)

Our logo

  • Our logo is a remix of the trademark's logo of Raspberry Pi
  • Raspberry-Pack is no official product of Raspberry Pi
  • Next to our license also check their Trademark Rules

Your contribution

  • You are welcome to submit merge requests for packages you created and consider useful for a broader audience
  • Found a bug, report it as an issue
  • If you port it for windows / linux, we are more than happy to provide it to everyone 🤗

About

Setup your Raspberry Pi headlessly with all scripts, packages and tools you need

Resources

License

Stars

Watchers

Forks

Packages

No packages published