Giter VIP home page Giter VIP logo

pi-zero's Introduction

pi-zero

Forked from mygulamali/pi-zero for archive purposes!

Ansible based setup for my Raspberry Pi Zero.

Getting started

Bootstrap

  1. Download the latest Raspberry Pi OS image from the Raspberry Pi website. The Lite version is good enough.
  2. Validate the checksum of the image,
    diff <(sha256sum PATH-TO-IMAGE | cut -d ' ' -f 1) <(echo SHA-256-OF-IMAGE-ON-WEBSITE)
    If the diff does not show any differences then you're good to proceed.
  3. Follow the instructions on the Raspberry Pi website to write the image to your SD card.
  4. Connect the SD card to your machine and ensure the boot partition is mounted.
  5. Copy the example variables file for the bootstrap playbook,
    cp roles/bootstrap/vars/main.example.yml roles/bootstrap/vars/main.yml
    and fill in the variables therein.
  6. Run the bootstrap playbook:
    ansible-playbook -i default-hosts.yml bootstrap.yml

Note: This bootstrap playbook expects the wpa_passphrase command to be present on the host machine. This comes as standard on Linux OS.

Setup

  1. After the bootstrap playbook (above) has finished running, unmount the SD card from your machine and put it into your Raspberry Pi Zero.
  2. Start the Raspberry Pi Zero (usually by connecting it to a power supply) and wait several minutes until the activity LED has stopped flashing.
  3. Copy the example variables file for the setup playbook,
    cp roles/setup/vars/main.example.yml roles/setup/vars/main.yml
    and fill in the variables therein.
  4. Run the setup playbook:
    ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i default-hosts.yml setup.yml

Note: The setup playbook assumes that your platform has sshpass installed, to enable Ansible to create an SSH connection to your Raspberry Pi Zero with a password.

RTL8188eu Wifi Dongle

I have a wifi dongle based on the RTL8188eu chipset on one of my Raspberry Pis. Wifi should still work with the setup described above, but the instructions here should be followed to ensure that the appropriate kernel modules are installed and loaded.

Playbooks

The following playbooks assume that you have an inventory file named hosts.yml, similar to hosts.example.yml. It should describe the configuration for your Raspberry Pi Zero.

The <USERNAME> parameter in the command listed below is the username of your user on your Raspberry Pi Zero.

Prometheus

The prometheus.yml playbook can be used to install Prometheus on your Raspberry Pi Zero. It can be run with,

ansible-playbook -i hosts.yml -u <USERNAME> -K prometheus.yml

After the playbook ends, the Prometheus browser will be available to view on http://<HOSTNAME>:9090/graph, where <HOSTNAME> is the hostname or IP address of your Raspberry Pi Zero.

pi-zero's People

Contributors

mygulamali avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.