|
1 | 1 | # 🚀 Deployment Guide |
2 | 2 |
|
| 3 | +AADS has two sides: a **server** (Docker Compose stack) and one or more |
| 4 | +**on-device agents** (installed on the machines you want auto-debugged). |
| 5 | +Deploy the server first — it mints the token the agents need. |
| 6 | + |
| 7 | +## One-Click Deployment (recommended) |
| 8 | + |
| 9 | +### 1. Server (run on the controller host) |
| 10 | + |
| 11 | +From a repo checkout or the server bundle: |
| 12 | + |
| 13 | +```bash |
| 14 | +bash dist/bootstrap-server.sh |
| 15 | +``` |
| 16 | + |
| 17 | +It interactively collects the upstream LLM API key (the only required value), |
| 18 | +auto-generates the remaining secrets, pulls the prebuilt images |
| 19 | +(`ghcr.io/bs10081/aads-*`), starts the stack, verifies the database, and prints |
| 20 | +the exact agent install command — with the token already filled in. |
| 21 | + |
| 22 | +> Private registry? Authenticate once before running: |
| 23 | +> `echo $GHCR_TOKEN | docker login ghcr.io -u <github-user> --password-stdin` |
| 24 | +
|
| 25 | +### 2. On-Device Agent (run on each target) |
| 26 | + |
| 27 | +Copy-paste the command the server printed. It looks like: |
| 28 | + |
| 29 | +```bash |
| 30 | +curl -fsSL http://<server>:5000/install-agent.sh | sudo \ |
| 31 | + AADS_SERVER=<server> \ |
| 32 | + AADS_AGENT_TOKEN=<token> \ |
| 33 | + AADS_ADMIN_API_KEY=<admin-key> bash |
| 34 | +``` |
| 35 | + |
| 36 | +This installs the On-Device Agent (V2 runner), auto-registers the node with the |
| 37 | +server, and installs the Alloy log forwarder pointed at the server's Loki. The |
| 38 | +installer downloads its payload (`aads-agent.tgz`) from the server itself — no |
| 39 | +external/GitHub access needed. Every prompt can be pre-set via environment |
| 40 | +variables (see the header of `dist/install-agent.sh`). |
| 41 | + |
| 42 | +### 3. Verify |
| 43 | + |
| 44 | +```bash |
| 45 | +# server |
| 46 | +docker compose -f docker-compose.prod.yaml --env-file .env ps |
| 47 | +curl -H "X-Admin-API-Key: <admin-key>" http://<server>:5000/api/agents |
| 48 | + |
| 49 | +# target |
| 50 | +curl -H "Authorization: Bearer <token>" http://<target>:8090/v1/node/facts |
| 51 | +systemctl is-active aads-agent alloy |
| 52 | +``` |
| 53 | + |
| 54 | +## Building / publishing images |
| 55 | + |
| 56 | +Images are built and pushed by `.github/workflows/build-images.yml` on a |
| 57 | +version tag (`git tag v1.0.0 && git push --tags`). It also attaches |
| 58 | +`aads-agent.tgz` + `install-agent.sh` to the GitHub release, so agents can |
| 59 | +alternatively pull from the release by setting `AADS_RELEASE_BASE_URL`. |
| 60 | + |
| 61 | +## Manual / Dev Start (build locally) |
| 62 | + |
| 63 | +```bash |
| 64 | +git clone https://github.com/bs10081/AADS |
| 65 | +cd AADS |
| 66 | +cp .env.example .env # edit secrets |
| 67 | +docker compose up -d --build # builds images locally instead of pulling |
| 68 | +docker compose ps |
| 69 | +curl http://localhost:8000/health # Ingester |
| 70 | +curl http://localhost:8080/health # Layer 2 Analyzer |
| 71 | +``` |
| 72 | + |
3 | 73 | ## Prerequisites |
4 | 74 |
|
5 | | -- Docker & Docker Compose |
6 | | -- NVIDIA GPU (for LogBERT) |
7 | | -- NVIDIA Container Toolkit |
8 | | - |
9 | | -## Quick Start |
10 | | - |
11 | | -1. **Clone the repository** |
12 | | - ```bash |
13 | | - git clone https://github.com/bs10081/ADDS |
14 | | - cd ADDS |
15 | | - ``` |
16 | | - |
17 | | -2. **Validate Alloy configuration** |
18 | | - ```bash |
19 | | - docker run --rm -v $(pwd)/layer0-collector/alloy:/config \ |
20 | | - grafana/alloy:latest validate /config/config.alloy |
21 | | - ``` |
22 | | - |
23 | | -3. **Start all services** |
24 | | - ```bash |
25 | | - docker compose up -d |
26 | | - ``` |
27 | | - |
28 | | -4. **Verify health** |
29 | | - ```bash |
30 | | - docker compose ps |
31 | | - curl http://localhost:8000/health # Ingester |
32 | | - curl http://localhost:8080/health # Layer 2 Analyzer |
33 | | - ``` |
| 75 | +- Docker & Docker Compose v2 |
| 76 | +- (Optional) NVIDIA GPU + Container Toolkit for the GPU LogBERT profile |
34 | 77 |
|
35 | 78 | ## Architecture |
36 | 79 |
|
|
0 commit comments