blob: a7ef16952d158dac18ae128ef38a9cedd4b1faf5 [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.
12- [Bazelisk](https://github.com/bazelbuild/bazelisk) >= v1.15.0
13- 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
Leopold7fbf1042023-01-06 19:57:37 +010018### IntelliJ support
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020019
Leopold7fbf1042023-01-06 19:57:37 +010020This repository is compatible with the IntelliJ Bazel plugin out of the box, which enables
21full autocompletion for external dependencies and generated code.
Leopold Schabel8b9c0552019-11-15 14:07:45 +010022
Leopold Schabel8b9c0552019-11-15 14:07:45 +010023The following steps are necessary:
24
Leopold7fbf1042023-01-06 19:57:37 +010025- Install Google's [Bazel plugin](https://plugins.jetbrains.com/plugin/8609-bazel) in IntelliJ.
26
27- Make sure that Bazel "*Bazel Binary Location*" in Other Settings → Bazel Settings points to Bazelisk.
Leopold Schabel8b9c0552019-11-15 14:07:45 +010028
Leopold7fbf1042023-01-06 19:57:37 +010029- Use _File → Import Bazel project_... and select your monorepo checkout.
Leopold Schabel8b9c0552019-11-15 14:07:45 +010030
Leopold Schabela4edfa92020-12-13 18:55:21 +010031After running the first sync, everything should now resolve in the IDE, including generated code.
Leopold Schabel18b4d652020-12-14 18:27:07 +010032
Leopold7fbf1042023-01-06 19:57:37 +010033## Monogon OS
Serge Bazanski31370b02021-01-07 16:31:14 +010034
Leopold7fbf1042023-01-06 19:57:37 +010035### Run a single node demo cluster
Serge Bazanski31370b02021-01-07 16:31:14 +010036
37Launch the node:
38
Leopold7fbf1042023-01-06 19:57:37 +010039 bazel run //:launch -c dbg
Serge Bazanski31370b02021-01-07 16:31:14 +010040
41Run a kubectl command:
42
Leopold7fbf1042023-01-06 19:57:37 +010043 bazel run //metropolis/cli/dbg -c dbg -- kubectl describe node
Serge Bazanski31370b02021-01-07 16:31:14 +010044
Leopold7fbf1042023-01-06 19:57:37 +010045### Test suite
Leopold Schabel55f01c32021-03-30 22:12:24 +020046
Leopold7fbf1042023-01-06 19:57:37 +010047Run full test suite:
48
49 bazel test -c dbg //...