Skip to content

Commit ea2dde4

Browse files
committed
Move create tempo bucket function to monitoring stack makefile
1 parent 6aa441e commit ea2dde4

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

services/monitoring/Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,24 @@ REPO_BASE_DIR := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))../..)
99
# TARGETS --------------------------------------------------
1010
include ${REPO_BASE_DIR}/scripts/common.Makefile
1111

12+
define create-s3-bucket
13+
# ensure bucket is available in S3...
14+
@set -o allexport; \
15+
source .env; \
16+
echo Creating bucket "$${TEMPO_S3_BUCKET}";\
17+
${REPO_BASE_DIR}/scripts/create-s3-bucket.bash "$${TEMPO_S3_BUCKET}" && \
18+
set +o allexport; \
19+
# bucket is available in S3
20+
endef
21+
1222
.PHONY: up
1323
up: .init .env config.prometheus ${TEMP_COMPOSE} ## Deploys or updates current stack "$(STACK_NAME)". If MONITORED_NETWORK is not specified, it will create an attachable network
1424
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE} $(STACK_NAME)
1525
$(MAKE) grafana-import
1626

1727
.PHONY: up-local
1828
up-local: .init .env config.prometheus.simcore ${TEMP_COMPOSE}-local ## Deploys or updates current stack "$(STACK_NAME)". If MONITORED_NETWORK is not specified, it will create an attachable network
29+
@$(create-s3-bucket)
1930
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-local $(STACK_NAME)
2031
$(MAKE) grafana-import
2132

@@ -138,7 +149,7 @@ smokeping_prober_config.yaml: smokeping_prober_config.yaml.j2 ${REPO_CONFIG_LOCA
138149
$(call jinja, $<, .env, $@);
139150

140151
tempo_config.yaml: tempo_config.yaml.j2 ${REPO_CONFIG_LOCATION} .env .venv
141-
$(call jinja, $<, $@);
152+
$(call jinja, $<, .env, $@);
142153

143154
.PHONY: grafana/assets
144155
grafana/assets: ${REPO_CONFIG_LOCATION}

services/registry/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ define create-s3-bucket
1717
source .env; \
1818
echo Creating bucket "$${S3_BUCKET}";\
1919
${REPO_BASE_DIR}/scripts/create-s3-bucket.bash "$${S3_BUCKET}" && \
20-
echo Creating bucket "$${TEMPO_S3_BUCKET}";\
21-
${REPO_BASE_DIR}/scripts/create-s3-bucket.bash "$${TEMPO_S3_BUCKET}" && \
2220
set +o allexport; \
2321
# bucket is available in S3
2422
endef

0 commit comments

Comments
 (0)