Giter Site home page Giter Site logo

noolius / framework Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 142 KB

Bash script/s and Ansible playbooks to proof-of-concept local VMs (host: Alpine Linux 3.15+) as K8s nodes

License: The Unlicense

Shell 11.18% Makefile 72.60% HCL 2.49% Ruby 13.72%
vagrantfile ansible-playbook unlicense-license cloudfoundry mercurial-imported alpine-linux bash-script kubernetes-setup openrc cilium

framework's Introduction

What's here?

Bash scripts and Ansible playbooks to proof-of-concept local Alpine Linux Kubernetes nodes

Why not k0s/K3s/microK8s/RKE2...?

  • Local (no "free"-tier AWS/Azure/GCP/Oracle//IBM Cloud/requiring submitting payment details)
  • Alpine Linux host nodes
  • No Docker
  • Cilium (see Caveats)
  • Vagrant
  • Ansible
  • sh and awk

(Several stem from $work. Also: which parts of deploying K8s are enabled/smoothed by systemd?)

How do I use it?

Host requirements

  • 4+ virtual CPU cores
  • 16+ GiB RAM
  • 25+ GiB disk
  • systemd-based
  • VirtualBox 6.1+
  • Ansible (-base 2.10.7+, << 2.11; see Caveats) with community.general and ansible.posix galaxy collections
  • Vagrant 2.2+ with vagrant-reload and vagrant-sshfs plugins

(Of course, you also can modify the scripts and playbooks with replacements for systemd and VirtualBox, thereby rendering it viable on myriad platforms.)

Clone this repo, then create vagrant_loc in it with the fully qualified path to the vagrant executable, e.g.,

v=/usr/bin/vagrant

In Vagrantfile, adjust the host-only private_network /24 CIDR as necessary. As of VirtualBox 6.1.30, also add this CIDR to /etc/vbox/networks.conf.

If you change it, modify apiserver in roles/common/vars/main.yml and metallb_alloc_cidr in roles/control_planes/vars/main.yml appropriately.

Moar fast!

To provision the nodes: use either standard Terraform commands, or invoke to_parll.sh.

Caveats

Versioned URIs in the Ansible playbooks should be OK, but "latest" URLs will break since they're associated with SHA256sums.

If using Mitogen v0.3.0 on the host with Ansible (see this note and these GitHub tags), use the python2 Alpine apk (instead of python3) in the shell provision section of Vagrantfile. On the host, PyPy* 7.3.8 do not work with Mitogen; you'll need to use CPython (tested with 3.10).

Cilium is configured to encipher inter-node traffic using WireGuard(tm), so expect several of the cilium connectivity tests to fail.

Known issues

Using host kernels newer than 5.16 will likely exhibit Cilium deployment failure due to changes in eBPF.

Deploying the Linkerd2 edge-21.9.3 viz extension in a v1.22.2 cluster errors out; this is a policy CRD v1beta1 interaction. (fixed in edge-21.9.4)

License

Items in this repository are released into the public domain, AKA "The Unlicense," as per https://choosealicense.com/licenses/unlicense/

"WireGuard" is a registered trademark of Jason A. Donenfeld; and all others, of their respective holders.

framework's People

Contributors

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