blob: 34c51d38d7e945093203f605c12f061f644d9813 [file] [log] [blame] [view]
Leopold Schabel55f01c32021-03-30 22:12:24 +02001# Monogon Monorepo
Leopold Schabel67f9d092019-10-22 15:41:42 +02002
Leopold7fbf1042023-01-06 19:57:37 +01003This is the main repository containing the source code for the [Monogon Platform](https://monogon.tech).
Leopold Schabel55f01c32021-03-30 22:12:24 +02004
Leopold7fbf1042023-01-06 19:57:37 +01005*This is pre-release software - take a look, and check back later!*
Leopold Schabel67f9d092019-10-22 15:41:42 +02006
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02007## Environment
Leopold Schabel5c80aca2019-10-22 15:48:58 +02008
Leopold7fbf1042023-01-06 19:57:37 +01009Our build environment is self-contained and requires only minimal host dependencies:
Leopold Schabel67f9d092019-10-22 15:41:42 +020010
Leopold7fbf1042023-01-06 19:57:37 +010011- A Linux machine or VM.
Leopold Schabel67023fe2023-08-14 12:36:35 +000012- [Bazelisk](https://github.com/bazelbuild/bazelisk) >= v1.15.0 (or a working Nix environment).
Leopold7fbf1042023-01-06 19:57:37 +010013- A reasonably recent kernel with user namespaces enabled.
14- Working KVM with access to `/dev/kvm` (if you want to run tests).
Leopold Schabel5c80aca2019-10-22 15:48:58 +020015
Leopold7fbf1042023-01-06 19:57:37 +010016Our docs assume that Bazelisk is available as `bazel` on your PATH.
Leopold Schabel5c80aca2019-10-22 15:48:58 +020017
Leopolde1ebf722023-01-08 14:18:15 +010018Refer to [SETUP.md](./SETUP.md) for detailed instructions.
Leopold Schabel18b4d652020-12-14 18:27:07 +010019
Leopold7fbf1042023-01-06 19:57:37 +010020## Monogon OS
Serge Bazanski31370b02021-01-07 16:31:14 +010021
Leopold7fbf1042023-01-06 19:57:37 +010022### Run a single node demo cluster
Serge Bazanski31370b02021-01-07 16:31:14 +010023
Leopolde2a302a2023-01-15 15:39:18 +010024Build CLI and node image:
Serge Bazanski31370b02021-01-07 16:31:14 +010025
Lorenz Brun65702192023-08-31 16:27:38 +020026 bazel build //metropolis/cli/dbg //:launch --config dbg
Leopolde2a302a2023-01-15 15:39:18 +010027
28Launch an ephemeral test node:
29
Lorenz Brun65702192023-08-31 16:27:38 +020030 bazel test //:launch --config dbg --test_output=streamed
Serge Bazanski31370b02021-01-07 16:31:14 +010031
Leopolde2a302a2023-01-15 15:39:18 +010032Run a kubectl command while the test is running:
Serge Bazanski31370b02021-01-07 16:31:14 +010033
Leopolde2a302a2023-01-15 15:39:18 +010034 bazel-bin/metropolis/cli/dbg/dbg_/dbg kubectl describe node
Serge Bazanski31370b02021-01-07 16:31:14 +010035
Leopold7fbf1042023-01-06 19:57:37 +010036### Test suite
Leopold Schabel55f01c32021-03-30 22:12:24 +020037
Leopold7fbf1042023-01-06 19:57:37 +010038Run full test suite:
39
Lorenz Brun65702192023-08-31 16:27:38 +020040 bazel test --config dbg //...