blob: 3abaa30b9136d2efcc70b3097e8f03b52ac5d88a [file] [log] [blame] [view]
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02001# Nexantic monorepo
Leopold Schabel67f9d092019-10-22 15:41:42 +02002
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02003This is the monorepo storing all of nexantic's internal projects and libraries.
Leopold Schabel67f9d092019-10-22 15:41:42 +02004
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02005## Environment
Leopold Schabel5c80aca2019-10-22 15:48:58 +02006
Leopold Schabeldb6283e2020-01-06 17:05:54 +01007We assume a Fedora host system provisioned using rW, and IntelliJ as the IDE.
Leopold Schabel67f9d092019-10-22 15:41:42 +02008
Leopold Schabel8b9c0552019-11-15 14:07:45 +01009For better reproducibility, all builds are executed in containers.
Leopold Schabel67f9d092019-10-22 15:41:42 +020010
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020011#### Usage
Leopold Schabel5c80aca2019-10-22 15:48:58 +020012
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020013Spinning up: `scripts/create_container.sh`
Leopold Schabel5c80aca2019-10-22 15:48:58 +020014
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020015Spinning down: `scripts/destroy_container.sh`
16
Leopold Schabel8b9c0552019-11-15 14:07:45 +010017Running commands: `scripts/run_in_container.sh <...>`
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020018
Leopold Schabel8b9c0552019-11-15 14:07:45 +010019Using bazel using a wrapper script: `scripts/bin/bazel <...>` (add to your local $PATH for convenience)
Leopold Schabelac9947f2020-07-09 18:58:26 +020020
21#### Run a single node cluster
22
23Launch the node:
24
25 bazel run //:launch
26
27Run a kubectl command:
28
29 bazel run //core/cmd/dbg -- kubectl describe
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020030
Leopold Schabel8b9c0552019-11-15 14:07:45 +010031#### IntelliJ
32
33This repository is compatible with the IntelliJ Bazel plugin. All commands run inside the container, and
34necessary paths are mapped into the container.
35
36We check the entire .ijwb project directory into the repository, which requires everyone to use the latest
37version of both IntelliJ and the Bazel plugin, but eliminates manual setup steps.
38
39The following steps are necessary:
40
41- Install Google's official Bazel plugin in IntelliJ.
42
43- Add the absolute path to your ~/.cache/bazel-nxt folder to your idea64.vmoptions (Help Edit Custom VM Options)
44 and restart IntelliJ:
45
46 `-Dbazel.bep.path=/home/leopold/.cache/bazel-nxt`
47
48- Set "*Bazel Binary Location*" in Other Settings Bazel Settings to the absolute path of scripts/bin/bazel.
49 This is a wrapper that will execute Bazel inside the container.
50
51- Open the `.ijwb` folder as IntelliJ project.
52
53- Disable Vgo support for the project.
54
55- Run a non-incremental sync in IntelliJ
56
57The plugin will automatically resolve paths for generated files.
58
59If you do not use IntelliJ, you need to use the scripts/bazel_copy_generated_for_ide.sh script to copy files locally.