docs: make it a bit simpler to hack Akvorado

Add ability to enable the demo flows just with a profile instead of
modifying .env. Add more instructions on how to use Docker Compose and
how to hack on the console.
This commit is contained in:
Vincent Bernat
2025-08-31 15:46:14 +02:00
parent fa9e48d16a
commit e41bae008b
4 changed files with 23 additions and 13 deletions

2
.env
View File

@@ -20,7 +20,7 @@ COMPOSE_FILE=${COMPOSE_FILE}:docker/docker-compose-ipinfo.yml
# COMPOSE_FILE=${COMPOSE_FILE}:docker/docker-compose-grafana.yml
## Demo
# COMPOSE_FILE=${COMPOSE_FILE}:docker/docker-compose-demo.yml
COMPOSE_FILE=${COMPOSE_FILE}:docker/docker-compose-demo.yml
## For testing only: use a ClickHouse cluster
# COMPOSE_FILE=${COMPOSE_FILE}:docker/docker-compose-clickhouse-cluster.yml

View File

@@ -3,8 +3,9 @@
## This .env file is to be used when deploying on demo.akvorado.net.
# docker compose --env-file=.env --env-file=.env.demo up -d
BRANDING=true
COMPOSE_FILE=${COMPOSE_FILE}:docker/docker-compose-demo.yml
COMPOSE_FILE=${COMPOSE_FILE}:docker/docker-compose-tls.yml
COMPOSE_PROFILES=demo
BRANDING=true
TLS_DOMAIN=akvorado.net,www.akvorado.net,demo.akvorado.net
TLS_EMAIL=webmaster@akvorado.net

View File

@@ -47,20 +47,27 @@ can spawn them through `docker compose -f docker/docker-compose-dev.yml`:
- `... up clickhouse-\*` to spawn a ClickHouse cluster
- `... up kafka` to spawn a Kafka broker
For manual end-to-end tests, you can use `make docker-dev` to build a Docker
container of Akvorado, then use `docker compose up` to run Docker compose.
Beware not to destroy the volume for GeoIP at each attempt as there is a
per-day limit on the number of times one IP can fetch the GeoIP database.
# Hacking
For manual tests, you can use `make docker-dev` to build a Docker container,
then use `docker compose --profile demo up` to run Docker Compose. Each time you
modify the code, repeat these two steps. Beware not to destroy the volume for
GeoIP at each attempt as there is a per-day limit on the number of times one IP
can fetch the GeoIP database.
When using this method, it can take a little bit of time until the console is
declared healthy. In the meantime, you get a 404 error. If you want to avoid
that, you can the console locally instead:
```console
$ docker compose stop akvorado-console
$ make && AKVORADO_CFG_CONSOLE_CLICKHOUSE_SERVERS=$(docker container inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' akvorado-clickhouse-1):9000 AKVORADO_CFG_CONSOLE_SERVELIVEFS=true ./bin/akvorado console /dev/null
```
If you need to work on the frontend part, you can spawn the Docker compose
setup, then in `console/frontend`, use `npm run dev` and point your browser to
`http://localhost:5173` instead of `http://localhost:8080`. Any change of
frontend-related files should be applied immediately. You still need to run a
local version of the console service:
```console
$ make && AKVORADO_CFG_CONSOLE_SERVELIVEFS=true ./bin/akvorado console /dev/null
```
frontend-related files should be applied immediately.
# Licensing

View File

@@ -4,6 +4,8 @@ services:
extends:
file: versions.yml
service: akvorado
profiles:
- demo
restart: unless-stopped
command: demo-exporter http://akvorado-orchestrator:8080#0
depends_on: