commit | ed86976004c8a9d8d06e787ece3d59b04dba11f9 | [log] [tgz] |
---|---|---|
author | Serge Bazanski <serge@monogon.tech> | Thu Nov 18 13:30:58 2021 +0100 |
committer | Sergiusz Bazanski <serge@monogon.tech> | Thu Nov 18 13:11:11 2021 +0000 |
tree | 523b4d1ec2ee73e3b612c5aa02ae8cab87766a11 | |
parent | fbd38e280916f0883263cf0b566984d3fea4ff39 [diff] |
scripts: rename container image to full path as used in CI This is needed due to what seems like a Podman bug: I have previously built this image for CI (using scripts/push_ci_image.sh), which tagged it gcr.io/monogon-infra/monogon-builder:... . Then, when I ran scripts/create_container.sh it would actually not tag the container as monogon-builder, but instead as gcr.io/monogon-infra/monogon-builder. This meant that scripts/bin/bazel kept using an older version of the image than I expected. I would debug this further, but at some point we should have done this re-tag for local developer images anyway, as this will enable us to pull this builder image from GCR in some cases if necessary (sparing some developers the local image build step). Change-Id: I24445f94e7808cb4c478395358a4aa520df5906b Reviewed-on: https://review.monogon.dev/c/monogon/+/446 Reviewed-by: Leopold Schabel <leo@nexantic.com>
This is the main repository containing the source code for the Monogon Project.
This is pre-release software - feel free to look around, and check back later for our first release!
Our build environment requires a working Podman binary (your distribution should have one).
Spinning up: scripts/create_container.sh
Spinning down: scripts/destroy_container.sh
Running commands: scripts/run_in_container.sh <...>
Using bazel using a wrapper script: scripts/bin/bazel <...>
(add to your local $PATH for convenience)
This repository is compatible with the IntelliJ Bazel plugin, which enables full autocompletion for external dependencies and generated code. All commands run inside the container, and necessary paths are mapped into the container.
The following steps are necessary:
Install Google's Bazel plugin in IntelliJ. On IntelliJ 2020.3 or later, you need to install a beta release of the plugin.
Add the absolute path to your ~/.cache/bazel-monogon
folder to your idea64.vmoptions
(Help → Edit Custom VM Options) and restart IntelliJ:
-Dbazel.bep.path=/home/leopold/.cache/bazel-monogon
Set "Bazel Binary Location" in Other Settings → Bazel Settings to the absolute path of scripts/bin/bazel
. This is a wrapper that will execute Bazel inside the container.
Use File → Import Bazel project... to create a new project from .bazelproject
.
After running the first sync, everything should now resolve in the IDE, including generated code.
Launch the node:
scripts/bin/bazel run //:launch
Run a kubectl command:
scripts/bin/bazel run //metropolis/cli/dbg -- kubectl describe
Run tests:
scripts/bin/bazel test //...