Git Product home page Git Product logo

rugpi-template-mender's Introduction

Rugpi: Quick Start Template for Mender

This template showcases how to build a Rugpi image with Mender integration.

For general information about Rugpi and how to use it, check out Rugpi's documentation.

This template allows you to build images for:

  • Raspberry Pi 4 and 5 (ARM64).
  • Any EFI-compatible system (ARM64 and AMD64).

For Raspberry Pi, images can be built based on Raspberry Pi OS or Debian. Note that Rugpi also supports older models of Raspberry Pi, however, we do not showcase images for them here.

The images are ready-to-use and devices running them should connect to Mender's device management platform automatically. To this end, you must configure the tenant/organization token (details bellow). Note that while fully compatible with Mender's cloud offering and update client, the actual update is handled by Rugpi. In this setup, Mender only serves as a frontend for Rugpi's OTA update mechanism.

🔧 Configuration

To configure Mender, you need your Mender tenant/organization token. Note that this token, as any secret, should not be committed to Git. For this reason, we use a .env file for secrets. To configure the token, copy the env.template file to .env and replace the placeholder with your actual token. In addition, you may need to change the server URL in the mender.conf configuration file. If you want to be able to connect via SSH, put your public SSH key in the respective layer configuration file in layers.

🏗ī¸ Building Images

To build an image for Raspberry Pi 4, including the necessary firmware update:

./run-bakery bake image rpi-raspios-pi4

To build an image for Raspberry Pi 5 or 4, without the firmware update:

./run-bakery bake image rpi-raspios

To create a Mender artifact from the produced rpi-raspios image:

VERSION=$(date +'%Y%m%d.%H%M')
mender-artifact write module-image \
    -n "Image ${VERSION}" \
    -t raspberrypi4 \
    -T rugpi-image \
    -f build/images/rpi-raspios.img \
    -o build/${VERSION}.mender \
    --software-name "Rugpi Image" \
    --software-version "${VERSION}"

To build an image for an AMD64 EFI-compatible system:

./run-bakery bake image efi-debian-amd64

To build an image that is directly usable with a VM (e.g., QEMU):

./run-bakery bake image efi-debian-amd64-vm

ℹī¸ Remarks

GitHub Actions

This repository contains a workflow for GitHub Actions which builds all images (except the VM images) and a Mender artifact for each image. To inject the Mender tenant token, you need to create a GitHub Actions secret named ENV and put the contents of the .env file there. Note that the build artifacts contain the token and are thus not uploaded by default. If you want to extract the artifacts, uncomment the respective section in the workflow. Make sure your repository is private in order to not leak the token.

Simple SBOM

As part of the image building process, a simple software bill of materials (SBOM) is generated. The SBOM is stored in build/*.sbom.txt and is also included in the build artifacts of the GitHub Actions workflow.

rugpi-template-mender's People

Contributors

koehlma avatar

Stargazers

Paul Lorenz avatar

Watchers

 avatar  avatar

Forkers

theyoctojester

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.