Skip to content

Commit 8c0bae8

Browse files
authored
Fix: Varia, Cleanup (#911)
* wip * Add csi-s3 and have portainer use it * Change request @Hrytsuk 1GB max portainer volume size * Arch Linux Certificates Customization * Add up-local makefile target for simcore stack * Remove unused docker config file in monitoring stack * Remove unused env-var - grafana * Use up-local makefile target for local simcore in deploy_everything_locally.sh * revert arch changes * Refactor j2 calling convention, always pass .env file path explicitly --------- Co-authored-by: Dustin Kaiser <[email protected]>
1 parent 0075122 commit 8c0bae8

File tree

13 files changed

+22
-51
lines changed

13 files changed

+22
-51
lines changed

scripts/common.Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,13 @@ venv: $(REPO_BASE_DIR)/.venv/bin/activate ## Creates a python virtual environmen
253253
ifeq ($(shell test -f j2cli_customization.py && echo -n yes),yes)
254254
255255
define jinja
256-
$(REPO_BASE_DIR)/.venv/bin/j2 --format=env $(1) .env -o $(2) --customize j2cli_customization.py
256+
$(REPO_BASE_DIR)/.venv/bin/j2 --format=env $(1) $(2) -o $(3) --customize j2cli_customization.py
257257
endef
258258
259259
else
260260
261261
define jinja
262-
$(REPO_BASE_DIR)/.venv/bin/j2 --format=env $(1) .env -o $(2)
262+
$(REPO_BASE_DIR)/.venv/bin/j2 --format=env $(1) $(2) -o $(3)
263263
endef
264264
265265
endif

scripts/deployments/deploy_everything_locally.bash

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,5 +254,8 @@ if [ "$start_opsstack" -eq 0 ]; then
254254
fi
255255
if [ "$start_simcore" -eq 0 ]; then
256256
log_info "starting simcore..."
257-
"${repo_basedir}"/scripts/deployments/start_simcore_locally.bash
257+
service_dir="${repo_basedir}"/services/simcore
258+
pushd "${service_dir}"
259+
call_make "." up-"$stack_target"
260+
popd
258261
fi

services/maintenance-page/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ up-master: up
3333

3434
.PHONY: docker-compose.yml
3535
docker-compose.yml: .venv .env
36-
@$(call jinja, docker-compose.yml.j2, docker-compose.yml.unlinted) && \
36+
@$(call jinja, docker-compose.yml.j2, .env, docker-compose.yml.unlinted) && \
3737
$(_yq) docker-compose.yml.unlinted > docker-compose.yml; \
3838
rm docker-compose.yml.unlinted >/dev/null 2>&1;
3939

services/monitoring/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ${TEMP_COMPOSE}-local: docker-compose.yml docker-compose.letsencrypt.dns.yml con
7474
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.letsencrypt.dns.yml > $@
7575

7676
docker-compose.yml: docker-compose.yml.j2 .env .venv pgsql_query_exporter_config.yaml
77-
$(call jinja,$<,$@)
77+
$(call jinja,$<,.env,$@)
7878

7979
.PHONY: update.grafana.pwd
8080
update.grafana.pwd: .env ## Change grafana pwd
@@ -101,7 +101,7 @@ grafana-import: grafana/assets .venv ## Imports AND OVERWRITES the remote grafan
101101

102102
.PHONY: config.grafana.dashboards
103103
config.grafana.dashboards: grafana/templates-provisioning/dashboards/simcore/Metrics-dashboard.json.j2 .venv #Configure dashboards for aws or dalco clusters
104-
$(call jinja, $<, grafana/provisioning/dashboards/simcore/Metrics-dashboard.json)
104+
$(call jinja, $<, .env, grafana/provisioning/dashboards/simcore/Metrics-dashboard.json)
105105

106106
.PHONY: config.monitoring
107107
config.monitoring: grafana/template-config.monitoring ${REPO_CONFIG_LOCATION}
@@ -133,7 +133,7 @@ config.prometheus.ceph.simcore: ${REPO_CONFIG_LOCATION} .venv
133133
@set -o allexport; \
134134
source $<; \
135135
set +o allexport; \
136-
$(call jinja, prometheus/prometheus-ceph.yml.j2, prometheus/prometheus-ceph.yml); \
136+
$(call jinja, prometheus/prometheus-ceph.yml.j2, .env, prometheus/prometheus-ceph.yml); \
137137
cat prometheus/prometheus-base.yml | $(_yq) '. *+ load("prometheus/prometheus-simcore.yml")' | cat | \
138138
$(_yq) '. *+ load("prometheus/prometheus-ceph.yml")' > prometheus/prometheus.yml; \
139139
envsubst < prometheus/prometheus.yml > prometheus/prometheus.temp.yml; \
@@ -148,10 +148,10 @@ config.prometheus: ${REPO_CONFIG_LOCATION} .venv
148148
mv prometheus/prometheus.temp.yml prometheus/prometheus.yml
149149

150150
pgsql_query_exporter_config.yaml: pgsql_query_exporter_config.yaml.j2 ${REPO_CONFIG_LOCATION} .env .venv
151-
$(call jinja, $<, $@);
151+
$(call jinja, $<, .env, $@);
152152

153153
smokeping_prober_config.yaml: smokeping_prober_config.yaml.j2 ${REPO_CONFIG_LOCATION} .env .venv
154-
$(call jinja, $<, $@);
154+
$(call jinja, $<, .env, $@);
155155

156156
.PHONY: grafana/assets
157157
grafana/assets: ${REPO_CONFIG_LOCATION}

services/monitoring/docker-compose.yml.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ configs:
2525
file: ./prometheus/prometheus-federation.yml
2626
prometheus_rules:
2727
file: ./prometheus/prometheus.rules.yml
28-
grafana_image_renderer_config:
29-
file: ./grafana-image-renderer/config.json
3028
pgsql_query_exporter_config:
3129
file: ./pgsql_query_exporter_config.yaml
3230
smokeping_prober_config:
@@ -249,7 +247,7 @@ services:
249247
cpus: "0.1"
250248

251249
grafana:
252-
image: grafana/grafana-oss:11.1.3
250+
image: grafana/grafana-oss:11.2.4
253251
volumes:
254252
- grafana_data:/var/lib/grafana
255253
env_file:

services/monitoring/grafana-image-renderer/README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

services/monitoring/grafana-image-renderer/config.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

services/monitoring/grafana/template-config.monitoring

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ GF_SECURITY_ADMIN_USER=${SERVICES_USER}
33
GF_USERS_ALLOW_SIGN_UP=false
44
GF_SERVER_ROOT_URL=https://${MONITORING_DOMAIN}/grafana
55
GF_INSTALL_PLUGINS=grafana-piechart-panel, grafana-worldmap-panel, grafana-polystat-panel
6-
# NOTE: grafana image rendering plugin: https://grafana.com/blog/2020/05/07/grafana-7.0-preview-new-image-renderer-plugin-to-replace-phantomjs/
7-
GF_RENDERING_SERVER_URL=http://grafana-image-renderer:8081/render
86
GF_RENDERING_CALLBACK_URL=http://grafana:3000/
97
GF_LOG_FILTERS=rendering:debug
108
GF_SERVER_DOMAIN=${MONITORING_DOMAIN}

services/redis-commander/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ ${TEMP_COMPOSE}-letsencrypt-dns: docker-compose.yml docker-compose.letsencrypt.d
5252

5353
config.json: config.json.j2 .env .venv
5454
# generate $@
55-
@$(call jinja, $<, $@)
55+
@$(call jinja, $<, .env, $@)
5656
# validate and format $@
5757
@cat $@ | jq > /dev/null

services/registry/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ up-public: up-dalco
5252
# Helpers -------------------------------------------------
5353

5454
docker-compose.yml: docker-compose.yml.j2 .venv .env
55-
@$(call jinja, $<, $@)
55+
@$(call jinja, $<, .env, $@)
5656

5757
.PHONY: ${TEMP_COMPOSE}-local
5858
${TEMP_COMPOSE}-local: docker-compose.yml docker-compose.self-signed.yml .env

0 commit comments

Comments
 (0)