| Leopold Schabel | 55f01c3 | 2021-03-30 22:12:24 +0200 | [diff] [blame] | 1 | # Monogon Monorepo |
| Leopold Schabel | 67f9d09 | 2019-10-22 15:41:42 +0200 | [diff] [blame] | 2 | |
| Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 3 | This is the main repository containing the source code for the [Monogon Platform](https://monogon.tech). |
| Leopold Schabel | 55f01c3 | 2021-03-30 22:12:24 +0200 | [diff] [blame] | 4 | |
| Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 5 | *This is pre-release software - take a look, and check back later!* |
| Leopold Schabel | 67f9d09 | 2019-10-22 15:41:42 +0200 | [diff] [blame] | 6 | |
| Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 7 | ## Environment |
| Leopold Schabel | 5c80aca | 2019-10-22 15:48:58 +0200 | [diff] [blame] | 8 | |
| Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 9 | Our build environment is self-contained and requires only minimal host dependencies: |
| Leopold Schabel | 67f9d09 | 2019-10-22 15:41:42 +0200 | [diff] [blame] | 10 | |
| Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 11 | - A Linux machine or VM. |
| Leopold Schabel | 67023fe | 2023-08-14 12:36:35 +0000 | [diff] [blame] | 12 | - [Bazelisk](https://github.com/bazelbuild/bazelisk) >= v1.15.0 (or a working Nix environment). |
| Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 13 | - A reasonably recent kernel with user namespaces enabled. |
| 14 | - Working KVM with access to `/dev/kvm` (if you want to run tests). | ||||
| Leopold Schabel | 5c80aca | 2019-10-22 15:48:58 +0200 | [diff] [blame] | 15 | |
| Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 16 | Our docs assume that Bazelisk is available as `bazel` on your PATH. |
| Leopold Schabel | 5c80aca | 2019-10-22 15:48:58 +0200 | [diff] [blame] | 17 | |
| Leopold | e1ebf72 | 2023-01-08 14:18:15 +0100 | [diff] [blame] | 18 | Refer to [SETUP.md](./SETUP.md) for detailed instructions. |
| Leopold Schabel | 18b4d65 | 2020-12-14 18:27:07 +0100 | [diff] [blame] | 19 | |
| Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 20 | ## Monogon OS |
| Serge Bazanski | 31370b0 | 2021-01-07 16:31:14 +0100 | [diff] [blame] | 21 | |
| Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 22 | ### Run a single node demo cluster |
| Serge Bazanski | 31370b0 | 2021-01-07 16:31:14 +0100 | [diff] [blame] | 23 | |
| Leopold | e2a302a | 2023-01-15 15:39:18 +0100 | [diff] [blame] | 24 | Build CLI and node image: |
| Serge Bazanski | 31370b0 | 2021-01-07 16:31:14 +0100 | [diff] [blame] | 25 | |
| Lorenz Brun | 6570219 | 2023-08-31 16:27:38 +0200 | [diff] [blame] | 26 | bazel build //metropolis/cli/dbg //:launch --config dbg |
| Leopold | e2a302a | 2023-01-15 15:39:18 +0100 | [diff] [blame] | 27 | |
| 28 | Launch an ephemeral test node: | ||||
| 29 | |||||
| Lorenz Brun | 6570219 | 2023-08-31 16:27:38 +0200 | [diff] [blame] | 30 | bazel test //:launch --config dbg --test_output=streamed |
| Serge Bazanski | 31370b0 | 2021-01-07 16:31:14 +0100 | [diff] [blame] | 31 | |
| Leopold | e2a302a | 2023-01-15 15:39:18 +0100 | [diff] [blame] | 32 | Run a kubectl command while the test is running: |
| Serge Bazanski | 31370b0 | 2021-01-07 16:31:14 +0100 | [diff] [blame] | 33 | |
| Leopold | e2a302a | 2023-01-15 15:39:18 +0100 | [diff] [blame] | 34 | bazel-bin/metropolis/cli/dbg/dbg_/dbg kubectl describe node |
| Serge Bazanski | 31370b0 | 2021-01-07 16:31:14 +0100 | [diff] [blame] | 35 | |
| Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 36 | ### Test suite |
| Leopold Schabel | 55f01c3 | 2021-03-30 22:12:24 +0200 | [diff] [blame] | 37 | |
| Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 38 | Run full test suite: |
| 39 | |||||
| Lorenz Brun | 6570219 | 2023-08-31 16:27:38 +0200 | [diff] [blame] | 40 | bazel test --config dbg //... |