Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Barbacane image version to pull from ghcr.io/barbacane-dev
# The playground needs 1.0.0-rc.1 or later. `latest` is the most recent stable
# The playground needs 1.0.0-rc.2 or later. `latest` is the most recent stable
# release, which release candidates do not move.
BARBACANE_VERSION=1.0.0-rc.1
BARBACANE_VERSION=1.0.0-rc.2

# Admin token for the control plane, at least 32 bytes: the control plane
# refuses to start without one. This is a demo default: change it for any
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,27 @@ jobs:
- name: Run the smoke test
run: bash scripts/smoke.sh

# Every running service with a health check reports healthy: a check the
# image cannot run (a shell command in an image without a shell) fails
# here, though the smoke test reaches the service over HTTP.
- name: Check the health checks
run: |
for container in $(docker compose ps -q); do
name=$(docker inspect -f '{{.Name}}' "$container")
[ -n "$(docker inspect -f '{{if .State.Health}}yes{{end}}' "$container")" ] || continue
status=
for _ in $(seq 1 30); do
status=$(docker inspect -f '{{.State.Health.Status}}' "$container")
[ "$status" = healthy ] && break
sleep 3
done
echo "$name: $status"
if [ "$status" != healthy ]; then
docker inspect -f '{{json .State.Health.Log}}' "$container"
exit 1
fi
done

- name: Dump logs on failure
if: failure()
run: docker compose logs --no-color --tail 300
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ That's it! The API specs are compiled and signed automatically before the gatewa

## Version

The playground pulls the Barbacane release `docker-compose.yml` pins (`1.0.0-rc.1`) from [GitHub Container Registry](https://github.com/orgs/barbacane-dev/packages). It needs 1.0.0-rc.1 or later. To run another release, copy `.env.example` and set the version:
The playground pulls the Barbacane release `docker-compose.yml` pins (`1.0.0-rc.2`) from [GitHub Container Registry](https://github.com/orgs/barbacane-dev/packages). It needs 1.0.0-rc.2 or later. To run another release, copy `.env.example` and set the version:

```bash
cp .env.example .env
Expand Down
11 changes: 6 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
# public key goes to trusted_key, which the gateway pins. The key survives
# restarts; removing the volumes replaces it.
keygen:
image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.1}
image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.2}
user: "0:0"
entrypoint: ["/bin/sh", "-c"]
command:
Expand All @@ -40,7 +40,7 @@ services:
# Spec Compiler (init container - compiles specs before gateway starts)
# ==========================================================================
compiler:
image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.1}
image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.2}
command: ["compile", "--spec", "/specs/train-travel-api.yaml", "--spec", "/specs/train-events.yaml", "--spec", "/specs/s3-proxy.yaml", "--spec", "/specs/waf-demo.yaml", "--manifest", "/manifest/barbacane.yaml", "--output", "/output/api.bca", "--allow-plaintext"]
# Root, to write the shared artifact volume (root-owned) and read the
# signing key (owner-only). The gateway mounts the artifact read-only.
Expand All @@ -62,7 +62,7 @@ services:
# API Gateway (Data Plane)
# ==========================================================================
barbacane:
image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.1}
image: ghcr.io/barbacane-dev/barbacane-standalone:${BARBACANE_VERSION:-1.0.0-rc.2}
# serve loads only artifacts signed by the key BARBACANE_TRUSTED_PUBKEY
# pins: here, the public key the keygen container wrote.
# --admin-bind on 0.0.0.0 exposes the admin API (/health, /metrics,
Expand Down Expand Up @@ -123,7 +123,7 @@ services:
# Control Plane (REST API)
# ==========================================================================
control-plane:
image: ghcr.io/barbacane-dev/barbacane-control:${BARBACANE_VERSION:-1.0.0-rc.1}
image: ghcr.io/barbacane-dev/barbacane-control:${BARBACANE_VERSION:-1.0.0-rc.2}
ports:
- "9091:9090" # Control Plane API (Prometheus has 9090 on the host)
environment:
Expand All @@ -136,7 +136,8 @@ services:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "bash", "-c", "echo > /dev/tcp/localhost/9090"]
# The image has no shell: `barbacane-control health` calls GET /health.
test: ["CMD", "/usr/local/bin/barbacane-control", "health"]
interval: 10s
timeout: 5s
retries: 5
Expand Down