- Rust 99%
- Shell 1%
| src | install: Add cgroupv2, systemd, and k3s checks | |
| test-vm | tests: Improve test-vm and it's documentation | |
| .editorconfig | feat: add default rust .editorconfig from https://github.com/rust-lang/rust/blob/master/.editorconfig | |
| .gitignore | Add VM image for testing | |
| Cargo.toml | deps: Bump small updates | |
| docker-compose.yml | deps: Bump cr.jaegertracing.io/jaegertracing/jaeger Docker tag to v2.15.1 | |
| README.md | build: Add Taskfile | |
| renovate.json | deps: Add renovate config | |
| Taskfile.dist.yaml | build: Add Taskfile | |
Installer
installs Kubernetes on an SSH host and bootstraps monkey-wrench with GitOps and flux
Commands
# install k3s and bootstrap monkey-wrench on a remote host
cargo run -- -vv --log-format pretty install $vm_ip ./test-vm/test-key.ed25519
# start the API server with postgres
cargo run -- serve --database-url postgres://localhost/installer
# start the API server with OTLP traces sent to a local Jaeger instance
cargo run -- --otlp-endpoint http://localhost:4317 serve --database-url postgres://localhost/installer
Taskfile
This repository uses a Taskfile.
- Use
task --listto discover tasks. - Use
task cifor the local CI-equivalent checks (lintandtest). - Use
task --dry <task-name>to validate the plan before execution.
Keep machine-local overrides in Taskfile.yml and commit updates to Taskfile.dist.yaml.
Docker Compose
Start the supporting Postgres and Jaeger services from docker-compose.yml:
# start the services
task stack:up
# you can overwrite for example the password
task stack:up POSTGRES_PASSWORD=hunter2
# stop the services
task stack:down
# stop the services and/or delete their data
task stack:reset
Jaeger dashboard: http://localhost:16686
The Postgres container uses POSTGRES_DB, POSTGRES_USER, and
POSTGRES_PASSWORD, defaulting to postgres://monkey:wrench@localhost/monkeywrench
if not set.
Contributing
Before opening a PR, run task ci. task fix can help you with formatting and
simple problems.
Useful development tasks:
task stack:up/task stack:downtask run:servetask vm:build/task vm:boot
vm test image
We build a Debian image for testing with mkosi.
# build the image and generate keys for testing
task vm:build
# boot the image in a container
task vm:boot
If the container does not receive an IP or the veth interface is down (ip addr
inside the container), start sytemd-networkd on the host.
# install k3s in the test vm container
cargo run -- -vv --log-format pretty install $vm_ip ./test-vm/test-key.ed25519