Skip to content

Commit

Permalink
example: install jb dependencies before provisioning (#941)
Browse files Browse the repository at this point in the history
#808 introduced dependencies for the mixin, which
accidentally broke the example environment; as the mixin originally
didn't have dependencies, the example environment didn't install them
before provisioning dashboards.

This commit runs jb to locally install dependencies before provisioning
dashboards.
  • Loading branch information
rfratto authored May 28, 2024
1 parent eb81e62 commit 8c46be3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
19 changes: 15 additions & 4 deletions example/grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,24 @@ services:
timeout: 10s
retries: 5

install-dashboard-dependencies:
build: images/jb
restart: on-failure
depends_on:
grafana:
condition: service_healthy
volumes:
- ../operations/alloy-mixin:/etc/alloy-mixin
working_dir: /etc/alloy-mixin
command: jb install

# Provision alloy-mixin after Grafana is healthy and running.
provision-dashboards:
build: images/grizzly
restart: on-failure
depends_on:
grafana:
condition: service_healthy
install-dashboard-dependencies:
condition: service_completed_successfully
environment:
- GRAFANA_URL=http://grafana:3000
volumes:
Expand All @@ -35,8 +46,8 @@ services:
build: images/grizzly
restart: on-failure
depends_on:
grafana:
condition: service_healthy
install-dashboard-dependencies:
condition: service_completed_successfully
environment:
- GRAFANA_URL=http://grafana:3000
volumes:
Expand Down
3 changes: 3 additions & 0 deletions example/images/jb/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM golang:1.22-alpine

RUN go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@c862f0670eb199b5024e31ff024f39b74d3b803a

0 comments on commit 8c46be3

Please sign in to comment.