-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
69 lines (57 loc) · 2.2 KB
/
Copy pathJustfile
File metadata and controls
69 lines (57 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
set shell := ["bash", "-cu"]
# Default: list recipes
default:
@just --list
# Build everything
build:
cargo build --workspace
# Run all unit tests
test:
cargo test --workspace
# Cross-build a release arm64 (aarch64 glibc) agent binary via `cross` + podman.
# Requires: `cargo install cross` and podman. Output:
# target/aarch64-unknown-linux-gnu/release/devendra-agent
build-agent-arm64:
CROSS_CONTAINER_ENGINE=podman cross build --release \
-p devendra-agent \
--target aarch64-unknown-linux-gnu
# Build a native (amd64) .deb of the agent. Requires `cargo install cargo-deb`.
# Output: target/debian/devendra-agent_<ver>_amd64.deb
deb:
cargo deb -p devendra-agent
# Build an arm64 .deb: cross-compile first, then package without rebuilding.
# Requires cargo-deb + the build-agent-arm64 prerequisites (cross + podman).
# Output: target/debian/devendra-agent_<ver>_arm64.deb
deb-arm64: build-agent-arm64
cargo deb -p devendra-agent --no-build --target aarch64-unknown-linux-gnu
# Format, lint, test
check:
cargo fmt --all
cargo clippy --workspace --all-targets
cargo test --workspace
# Serve the controller web UI (publishes ./config first). http://127.0.0.1:3900
serve:
cargo run -p devendra-controller -- serve
# Print the agent join ticket
ticket:
cargo run -p devendra-controller -- ticket
# Publish ./config to the document without serving
publish:
cargo run -p devendra-controller -- publish
# Run an agent for HOST using TICKET. Writes its store under ./data-agent.
# WARNING: this reconciles the *local* machine's files + systemd units.
# Usage: just agent web-01 'devendra-doc-ticket...'
agent host ticket:
cargo run -p devendra-agent -- run \
--host-id {{host}} \
--ticket '{{ticket}}' \
--data-dir ./data-agent
# Adopt existing files on THIS machine into a proposal for HOST. Scans DIR
# (default /etc/containers/systemd). Review + accept in the controller UI.
# Usage: just adopt web-01 'ticket...' [/etc/containers/systemd]
adopt host ticket dir="/etc/containers/systemd":
cargo run -p devendra-agent -- adopt \
--host-id {{host}} \
--ticket '{{ticket}}' \
--data-dir ./data-agent \
--dir {{dir}}