ops/metrics: basic cluster setup with prometheus

We handwavingly plan on implementing monitoring as a two-tier system:

 - a 'global' component that is reponsible for global aggregation,
   long-term storage and alerting.
 - multiple 'per-cluster' components, that collect metrics from
   Kubernetes clusters and export them to the global component.

In addition, several lower tiers (collected by per-cluster components)
might also be implemented in the future - for instance, specific to some
subprojects.

Here we start sketching out some basic jsonnet structure (currently all
in a single file, with little parametrization) and a cluster-level
prometheus server that scrapes Kubernetes Node and cAdvisor metrics.

This review is mostly to get this commited as early as possible, and to
make sure that the little existing Prometheus scrape configuration is
sane.

Change-Id: If37ac3b1243b8b6f464d65fee6d53080c36f992c
2 files changed
tree: de459e5d0ee5ec7ee247b9b1252da644bcab374b
  1. app/
  2. bgpwtf/
  3. bzl/
  4. cluster/
  5. dc/
  6. devtools/
  7. doc/
  8. gcp/
  9. go/
  10. hswaw/
  11. kube/
  12. ops/
  13. personal/
  14. third_party/
  15. tools/
  16. .bazelrc
  17. .gitignore
  18. BUILD
  19. COPYING
  20. env.fish
  21. env.sh
  22. hackdoc.toml
  23. OWNERS
  24. README.md
  25. WORKSPACE
README.md

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

Any time you see a //path/like/this, it refers to the root of hscloud, ie. the path path/like/this in this repository. Perforce and/or Bazel users should feel right at home.

Viewing this documentation

For a pleaseant web viewing experience, see this documentation in hackdoc. This will allow you to read this markdown file (and others) in a pretty, linkable view.

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 gerrit's gitiles.

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.