commit | 52f7f291c1987fe98bd10d3ad79d4a0c8772ad03 | [log] [tgz] |
---|---|---|
author | Lorenz Brun <lorenz@nexantic.com> | Wed Jun 24 16:42:02 2020 +0200 |
committer | Lorenz Brun <lorenz@nexantic.com> | Wed Jun 24 16:42:02 2020 +0200 |
tree | eaf212647f9bab001e62bb35647255b5f107bd2e | |
parent | 3ff5af330857b2aadcdae9d9e6ca37b7e5d2c56e [diff] |
Add nanoswitch and cluster testing Adds nanoswitch and the `switched-multi2` launch target to launch two Smalltown instances on a switched network and enroll them into a single cluster. Nanoswitch contains a Linux bridge and a minimal DHCP server and connects to the two Smalltown instances over virtual Ethernet cables. Also moves out the DHCP client into a package since nanoswitch needs it. Test Plan: Manually tested using `bazel run //:launch -- switched-multi2` and observing that the second VM (whose serial port is mapped to stdout) prints that it is enrolled. Also validated by `bazel run //core/cmd/dbg -- kubectl get node -o wide` returning two ready nodes. X-Origin-Diff: phab/D572 GitOrigin-RevId: 9f6e2b3d8268749dd81588205646ae3976ad14b3
This is the monorepo storing all of nexantic's internal projects and libraries.
We assume a Fedora host system provisioned using rW, and IntelliJ as the IDE.
For better reproducibility, all builds are executed in containers.
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. All commands run inside the container, and necessary paths are mapped into the container.
We check the entire .ijwb project directory into the repository, which requires everyone to use the latest version of both IntelliJ and the Bazel plugin, but eliminates manual setup steps.
The following steps are necessary:
Install Google's official Bazel plugin in IntelliJ.
Add the absolute path to your ~/.cache/bazel-nxt folder to your idea64.vmoptions (Help → Edit Custom VM Options) and restart IntelliJ:
-Dbazel.bep.path=/home/leopold/.cache/bazel-nxt
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.
Open the .ijwb
folder as IntelliJ project.
Disable Vgo support for the project.
Run a non-incremental sync in IntelliJ
The plugin will automatically resolve paths for generated files.
If you do not use IntelliJ, you need to use the scripts/bazel_copy_generated_for_ide.sh script to copy files locally.