cluster/clustercfg: rewrite it in Go

This replaces the old clustercfg script with a brand spanking new
mostly-equivalent Go reimplementation. But it's not exactly the same,
here are the differences:

 1. No cluster deployment logic anymore - we expect everyone to use ops/
    machine at this point.
 2. All certs/keys are Ed25519 and do not expire by default - but
    support for short-lived certificates is there, and is actually more
    generic and reusable. Currently it's only used for admincreds.
 3. Speaking of admincreds: the new admincreds automatically figure out
    your username.
 4. admincreds also doesn't shell out to kubectl anymore, and doesn't
    override your default context. The generated creds can live
    peacefully alongside your normal prodaccess creds.
 5. gencerts (the new nodestrap without deployment support) now
    automatically generates certs for all nodes, based on local Nix
    modules in ops/.
 6. No secretstore support. This will be changed once we rebuild
    secretstore in Go. For now users are expected to manually run
    secretstore sync on cluster/secrets.

Change-Id: Ida935f44e04fd933df125905eee10121ac078495
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1498
Reviewed-by: q3k <q3k@hackerspace.pl>
13 files changed
tree: e17324558be92f8004059a5853c35e3885493704
  1. app/
  2. bgpwtf/
  3. bzl/
  4. cluster/
  5. dc/
  6. devtools/
  7. doc/
  8. games/
  9. gcp/
  10. go/
  11. hswaw/
  12. kube/
  13. nix/
  14. ops/
  15. personal/
  16. third_party/
  17. tools/
  18. .bazelrc
  19. .gitignore
  20. BUILD
  21. ci_presubmit.sh
  22. COPYING
  23. default.nix
  24. env.fish
  25. env.sh
  26. hackdoc.toml
  27. OWNERS
  28. README.md
  29. shell.nix
  30. WORKSPACE
README.md

hscloud is the main monorepo of the Warsaw Hackerspace infrastructure code.

Getting started

See //doc/codelabs for tutorials on how to use hscloud.

If you want to browse the source of hscloud in a web browser, use cs.hackerspace.pl.

If you want some other help, talk to q3k, informatic or your therapist.

Directory Structure

Directories you should care about:

  • app: external services that we host that are somewhat universal: matrix, covid-formity, etc.
  • bgpwtf: code related to our little ISP
  • cluster: code related to our Kubernetes cluster (k0.hswaw.net)
  • dc: code related to datacenter automation
  • devtools: code related to developer tooling, like gerrit or hackdoc
  • doc: high-level documentation that doesn't fit anywhere else, ie. codelabs
  • hswaw: Warsaw Hackerspace specific/internal services. The line between this and app is unfortunately blurry.
  • personal: user's personal (experimental) directories
  • kube, go: code specific to languages but general to the whole of hscloud

Licensing

Unless noted otherwise, code in hscloud is licensed under the BSD 0-clause license - see COPYING.