Coder Social home page Coder Social logo

platform's Introduction

platform

my personal development platform

  • k3s or microk8s
  • external-dns to manage dns records
  • cert-manager to manage ssl certificates
  • flux cd to manage cluster state from the git repo
  • openvpn

deployment

copy .env.example to .env and fill in the required values, then source .env. copy state.tfvars.example to state.tfvars and fill in the state bucket info

run terraform init -backend-config=state.tfvars and then terraform apply to deploy. the instance will be provisioned via ansible and your kubeconfig will be downloaded to private/${hostname}/kubeconfig

flux cd setup

you will need to add flux's ssh key to the github repo. get the public key using bin/flux-identity and add it to your repo at https://github.com/${github_username}/${github_repo}/settings/keys

adding k8s services

commit the manifests to the repo you specified for flux cd, and it should all get picked up automatically

to take advantage of the automated dns name/cert creation you need to create an ingress and set the following annotations:

  • cert-manager.io/cluster-issuer: "letsencrypt-staging" or "letsencrypt-prod"
  • external-dns.alpha.kubernetes.io/hostname: your desired domain name

set spec.tls.hosts and spec.rules.host to your desired domain name

set spec.tls.secretName to a unique name for the secret to hold the tls cert in

an example manifest can be seen at ansible/roles/platform/templates/example.yml

openvpn setup

you will need kubectl installed to set the necessary secrets for the vpn

run bin/setup-vpn and follow the instructions. your vpn config will be placed in private/${hostname}client.ovpn

if you need to use sudo for docker commands, you will need to use sudo -E bin/setup-vpn to pass through some variables from .env

to add a new client, run CLIENT_NAME=some_new_client bin/add-client, and the new client configuration will be placed in private/${hostname}/some_new_client.ovpn

in KDE for whatever reason the vpn connection doesnt work when imported directly into network-manager, so it must be started with sudo openvpn --config private/${hostname}/client.ovpn.

platform's People

Contributors

leigholiver avatar

Watchers

James Cloos 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.