GithubHelp home page GithubHelp logo

infra-golden-image's Introduction

Personalized Images

This Repo will be help creating you own baseline. At the Moment the Focus will be, build Images for your Home Lab Cluster.

This Process will be make it Possible work with a set of different Distributions. You have the most Important Configurations for starting your device like Network Configurations (WLAN) or handle the Technical User for maintenance.

For the arm image creation we use the solo-io/packer-plugin-arm-image Packer Plugin.

Features

Different Distributions like:

Base Config Settings

  • Wifi (ssid + pks)
  • User with given Pubic Key for access.
  • Updated packages from Image Creation Day.
  • Minimize hardered System, like disabling Password Auth.

Tested Devices

Device Arch hypriot raspbian (buster) raspbian (bullseye)
raspberry-pi-4 armhf ✔️ ✔️
Cubox-I 4x4 armhf

How to Use

This Repo holds sources for crating Images used Packer (like src/packer/hypriot) , and some Ansible Sources (src/ansible/sd-card) for flashing the generated Images to some SD Card.

  1. Generate your personal Image, by using Packer
cd src/packer

# create a hypriot based image
# The container will be create a img, prepared for flash to your SD Card

docker run \
  --rm \
  --privileged \
  -w /build/hypriot \
  -v /dev:/dev \
  -v ${PWD}:/build:ro \
  -v ${PWD}/packer_cache:/build/packer_cache \
  -v ${PWD}/output-image:/build/output-image \
  -e PACKER_CACHE_DIR=/build/packer_cache \
  ghcr.io/solo-io/packer-plugin-arm-image build \
    -var local_ssh_public_key="$(pass private/keyfiles/ssh/private_ed25519/id_ed25519.pub)" \
    -var wifi_ssid=$(pass private/wlan/home/ssid) \
    -var wifi_psk=$(pass private/wlan/home/psk) \
    .

or some raspbian based image

docker run \
  --rm \
  --privileged \
  -w /build/raspbian \
  -v /dev:/dev \
  -v ${PWD}:/build:ro \
  -v ${PWD}/packer_cache:/build/packer_cache \
  -v ${PWD}/output-image:/build/output-image \
  -e PACKER_CACHE_DIR=/build/packer_cache \
  ghcr.io/solo-io/packer-plugin-arm-image build \
    -var ssh_public_key="$(pass private/keyfiles/ssh/private_ed25519/id_ed25519.pub)" \
    -var wifi_ssid=$(pass private/wlan/home/ssid) \
    -var wifi_psk=$(pass private/wlan/home/psk) \
    .
  1. Copy the Image to somme sd Card, with ansible.
# Move to the Playbook Folder
cd src/ansible/sd-card

# Copy the Image to given SD Card
docker run \
   --device=/dev/sda \
   --privileged \
   -w /workspace \
   -v $(pwd):/workspace \
   -v ${PWD}/../../packer/output-image:/tmp/img:ro \
   --rm ansible/ansible-runner \
   ansible-playbook main.yml --extra-vars "os_hostname=flasher os_prepared=hypriot sd_card_image=/tmp/img/custom-hypriotos.img"

# or the raspbian image

docker run \
   --device=/dev/sda \
   --privileged \
   -w /workspace \
   -v $(pwd):/workspace \
   -v ${PWD}/../../packer/output-image:/tmp/img:ro \
   --rm ansible/ansible-runner \
   ansible-playbook main.yml --extra-vars "os_hostname=flasher os_prepared=raspbian sd_card_image=/tmp/img/custom-raspbian.img"
  1. Start the Device, now you can connect by using the Private key for your SSH connection and then you can Configuration the node.

infra-golden-image's People

Contributors

nolte avatar renovate[bot] avatar renovate-bot avatar

Watchers

 avatar

infra-golden-image's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/automerge.yaml
  • nolte/gh-plumbing v1.0.16
.github/workflows/build-static-tests.yaml
  • nolte/gh-plumbing v1.0.16
  • nolte/gh-plumbing v1.0.16
.github/workflows/release-cd-refresh-master.yml
  • nolte/gh-plumbing v1.0.16
.github/workflows/release-drafter.yml
  • nolte/gh-plumbing v1.0.16
.github/workflows/stale.yaml
  • nolte/gh-plumbing v1.0.16
pre-commit
.pre-commit-config.yaml
  • pre-commit/pre-commit-hooks v4.3.0
  • adrienverge/yamllint v1.27.1

  • Check this box to trigger a request for Renovate to run again on this repository

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.