Coder Social home page Coder Social logo

rpik8s's Introduction

rpik8s

personal bootstrapping for rpi k8s cluster

This is meant to be a living document for my personal setup. This is an opinionated configuration for setting up an rPi cluster for my personal lab. The goal is to have a cluster of 6 devices configured with a single powered USB hub that all communicates over wireless. this is for easy of use and portability.

What I have in my configuration:

  • 2x raspberry pi 4 - 2GB
  • 4x raspberry pi 3 B+
  • 32GB micro SD cards on all devices

Base install requirements before running the first ansible configs. Maybe these can be further automated in the future, but as of now, there is a "single touch" that needs to take place before they get boostrapped with ansible:

  • ubuntu 19.10 64bit

  • each instance needs a default password configured (this is a required change on the first login)

  • each instance has a hostname configured on the localdomain (I use the convention rpc01-06) this is easily applied with sudo hostnamectl set-hostname rpc06

  • each instance needs a preshared pubkey configured. I recommend generating a key specifically for this and sharing it with each server as follows

ssh-keygen -f ~/.ssh/rpik8s -N '' -t ed25519
cat ~/.ssh/rpik8s.pub | ssh ubuntu@rpc06 'cat >> ~/.ssh/authorized_keys'
  • ssh config that is tied to the preshared pubkey example below
Host rpc0*
  IdentityFile ~/.ssh/rpik8s

Configuring your secrets.yml file

No secrets are hard-coded into this repo. You are welcome to use whatever secrets manager you want, but this config expects a secrets.yml file. Since this isn't tracked in the VCS, I'd recommend storing these secrets in a secrets manager system like pass, 1password, or keychain. Ansible has a secrets manager called ansible-vault, which stores these secrets with symetric encryption at rest.

From the root of this repo run ansible-vault create ansible/secrets.yml

secrets.yml expects to store there yaml variables to run properly:

wireless_ssid=
wireless_passphrase=

rpik8s's People

Contributors

rjrbt avatar

Stargazers

 avatar

Watchers

 avatar  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.