Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
f0d8cf0
wip
mrnicegyu11 Sep 19, 2024
e906b41
Merge remote-tracking branch 'upstream/main' into main
mrnicegyu11 Oct 23, 2024
14c751d
Merge remote-tracking branch 'upstream/main' into main
mrnicegyu11 Oct 23, 2024
293f63c
Add csi-s3 and have portainer use it
mrnicegyu11 Oct 24, 2024
f7f72ec
Change request @hrytsuk 1GB max portainer volume size
mrnicegyu11 Oct 25, 2024
94cfb76
t push
mrnicegyu11 Oct 28, 2024
509c717
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Oct 29, 2024
1a65ecf
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Nov 13, 2024
77ee45e
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Nov 25, 2024
c9c70d6
Arch Linux Certificates Customization
mrnicegyu11 Dec 3, 2024
7b8be53
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Dec 5, 2024
bcd61cd
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Dec 12, 2024
58e1030
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Dec 13, 2024
5b1c3fb
Add grafana terrform tooling
mrnicegyu11 Dec 16, 2024
00bc0c7
Make osparc-config dotenv-precommit pass: Use all caps env-vars
mrnicegyu11 Dec 16, 2024
2e009bc
Refactoring: jinja2 takes .env file path as explicit argument (like i…
mrnicegyu11 Dec 16, 2024
8903007
Make CI_ENV_FILE vailable in makefile
mrnicegyu11 Dec 16, 2024
f520e7c
Refactor makefile targets
mrnicegyu11 Dec 16, 2024
764bb22
Add grafana terraform gitignore
mrnicegyu11 Dec 16, 2024
ead277a
Rename envvar: TF_STATE_S3_GRAFANAKEY
mrnicegyu11 Dec 16, 2024
13f92ba
Remove old scripts, makefile targets
mrnicegyu11 Dec 18, 2024
ebe66c0
Remove unused files
mrnicegyu11 Dec 18, 2024
fcab094
undue arch style commit
mrnicegyu11 Dec 18, 2024
2ba8070
Remove references to Tempo
mrnicegyu11 Dec 18, 2024
015cef0
Merge remote-tracking branch 'upstream/main' into 2024/add/grafanaTer…
mrnicegyu11 Jan 3, 2025
ebb9c2c
CHange request YH: Stop trying tor ecah grafana eventually
mrnicegyu11 Jan 3, 2025
a929e35
Change request YH: Move tf scripts to terraform folder
mrnicegyu11 Jan 3, 2025
989eaa3
Change request YH: stricter check
mrnicegyu11 Jan 3, 2025
75c79fe
Add files remove typo
mrnicegyu11 Jan 3, 2025
dc76837
Merge branch 'main' into 2024/add/grafanaTerraform
mrnicegyu11 Jan 6, 2025
bb59907
Add terraform fmt pre-commit hook
mrnicegyu11 Jan 3, 2025
c52b3f9
Use ansible.env file in lieu of ci.env if available
mrnicegyu11 Jan 3, 2025
c2c748f
Rename and refactor
mrnicegyu11 Jan 7, 2025
3404851
Merge remote-tracking branch 'upstream/main' into 2024/add/grafanaTer…
mrnicegyu11 Jan 8, 2025
73c384f
wip
mrnicegyu11 Jan 9, 2025
0aa010e
wip
mrnicegyu11 Jan 9, 2025
9f7be0b
remove line
mrnicegyu11 Jan 10, 2025
8eb2e73
Merge branch 'main' into 2024/add/grafanaTerraform
mrnicegyu11 Jan 13, 2025
ac627ea
Makefile repo base dir without git
mrnicegyu11 Jan 14, 2025
dc08b16
Grafana terraform ceph fixes
mrnicegyu11 Jan 14, 2025
22edf67
Fix indentation
mrnicegyu11 Jan 10, 2025
51e23c4
Add manual to traefik redirect capture all rule (#933)
YuryHrytsuk Jan 16, 2025
8728f6c
Introduce rolling docker config / secret update concept :tada: :rocke…
YuryHrytsuk Jan 30, 2025
ef8bf6b
Update traefik router hardcoded priorities (#953)
YuryHrytsuk Jan 30, 2025
bcecab7
Configure redis replicas via ENV (#957)
YuryHrytsuk Jan 31, 2025
e055bbd
Filestash: remove special docker node label (#959)
YuryHrytsuk Feb 3, 2025
998081a
rabbit: configurable replicas (#964)
YuryHrytsuk Feb 3, 2025
83e21a8
💄 minor: Change DNS Server to Quad9 (#967)
mrnicegyu11 Feb 5, 2025
0e86628
single replica (#968)
sanderegg Feb 10, 2025
54be62a
Remove docker api proxy from validate simcore settings (#972)
YuryHrytsuk Feb 13, 2025
9001e23
Add appmotiongateway add dalco
mrnicegyu11 Feb 26, 2025
f5d5e63
Add appmotiongateway add dalco - 2
mrnicegyu11 Feb 26, 2025
721069e
Add appmotiongateway add dalco - 3
mrnicegyu11 Feb 26, 2025
80b24ff
Seperate dalco-staging: disable redis special handling (#976)
mrnicegyu11 Mar 3, 2025
bf5e264
Fix deploy ops failure
mrnicegyu11 Mar 4, 2025
5959bd5
Merge branch 'main' into 2024/add/grafanaTerraform
mrnicegyu11 Mar 5, 2025
7433f2a
Make curl in ensure_grafana_online_ timeout after 10s
mrnicegyu11 Mar 7, 2025
2da8740
Timeout in wait_graylog_is_online
mrnicegyu11 Mar 7, 2025
a87ee6b
Fix osparc.local pydantic validation failure director-v0
mrnicegyu11 Mar 7, 2025
e9a5631
Merge remote-tracking branch 'upstream/main' into 2024/add/grafanaTer…
mrnicegyu11 Mar 13, 2025
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: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ repos:
hooks:
- id: shellcheck
name: Shell scripts conform to shellcheck
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.89.1 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
hooks:
- id: terraform_fmt
- repo: local
hooks:
- id: run-pylint
Expand Down
2 changes: 1 addition & 1 deletion scripts/common.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ IS_WIN := $(strip $(if $(or $(IS_LINUX),$(IS_OSX),$(IS_WSL)),,$(OS)))
$(if $(IS_WSL2),,$(if $(IS_WSL),$(error WSL1 is not supported in all recipes. Use WSL2 instead. Follow instructions in README.md),))

# Check that a valid location to a config file is set.
REPO_BASE_DIR := $(shell git rev-parse --show-toplevel)
REPO_BASE_DIR := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)
export REPO_CONFIG_LOCATION := $(shell cat $(REPO_BASE_DIR)/.config.location)
$(if $(REPO_CONFIG_LOCATION),,$(error The location of the repo.config file given in .config.location is invalid. Aborting))
$(if $(shell cat $(REPO_CONFIG_LOCATION)),,$(error The location of the repo.config file given in .config.location is invalid. Aborting))
Expand Down
5 changes: 4 additions & 1 deletion services/graylog/scripts/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@
)
def wait_graylog_is_online():
_r = requests.get(
GRAYLOG_BASE_DOMAIN + "/api/system", auth=REQUESTS_AUTH, verify=False
GRAYLOG_BASE_DOMAIN + "/api/system",
auth=REQUESTS_AUTH,
verify=False,
timeout=10,
)

if _r.status_code == 401:
Expand Down
28 changes: 6 additions & 22 deletions services/monitoring/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# STACK_NAME defaults to name of the current directory. Should not to be changed if you follow GitOps operating procedures.
STACK_NAME = $(notdir $(CURDIR))
TEMP_COMPOSE=.stack.${STACK_NAME}.yaml
REPO_BASE_DIR := $(shell git rev-parse --show-toplevel)
REPO_BASE_DIR := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))../..)

# TARGETS --------------------------------------------------
include ${REPO_BASE_DIR}/scripts/common.Makefile
Expand Down Expand Up @@ -76,28 +76,12 @@ ${TEMP_COMPOSE}-local: docker-compose.yml docker-compose.letsencrypt.dns.yml con
docker-compose.yml: docker-compose.yml.j2 .env .venv pgsql_query_exporter_config.yaml
$(call jinja,$<,.env,$@)

.PHONY: update.grafana.pwd
update.grafana.pwd: .env ## Change grafana pwd
@set -o allexport; \
source $(REPO_CONFIG_LOCATION); \
set +o allexport; \
grafanacontainerid=$$(docker ps | grep grafana | awk '{print $$1;}');\
docker exec -ti $$grafanacontainerid grafana-cli admin reset-admin-password $$TRAEFIK_PASSWORD


.PHONY: grafana-export
grafana-export: .venv## Export the remote grafana dashboards and datasources TO YOUR LOCAL MACHINE
@cd grafana/scripts;\
source ${REPO_BASE_DIR}/.venv/bin/activate;\
pip install -r requirements.txt > /dev/null 2>&1;\
python3 export.py;

.PHONY: grafana-import
grafana-import: grafana/assets .venv ## Imports AND OVERWRITES the remote grafana dashboards and datasources FROM YOUR LOCAL MACHINE
@cd grafana/scripts;\
source ${REPO_BASE_DIR}/.venv/bin/activate;\
pip install -r requirements.txt > /dev/null 2>&1;\
python3 import.py
grafana-import: grafana/assets ## Imports the remote grafana dashboards and datasources FROM YOUR LOCAL MACHINE
@pushd ${REPO_BASE_DIR}/services/monitoring/grafana && \
$(MAKE) terraform-plan && \
$(MAKE) terraform-apply; \
popd > /dev/null

.PHONY: config.grafana.dashboards
config.grafana.dashboards: grafana/templates-provisioning/dashboards/simcore/Metrics-dashboard.json.j2 .venv #Configure dashboards for aws or dalco clusters
Expand Down
64 changes: 64 additions & 0 deletions services/monitoring/grafana/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.DEFAULT_GOAL := help
REPO_BASE_DIR := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))../../..)
include ${REPO_BASE_DIR}/scripts/common.Makefile



# Internal VARIABLES ------------------------------------------------
TF_STATE_FILE := terraform/.terraform/terraform.tfstate

terraform/main.tf: terraform/main.tf.j2 .venv $(REPO_CONFIG_LOCATION)
# generate $@
@$(call jinja, $<, $(REPO_CONFIG_LOCATION), $@)

terraform-init: $(TF_STATE_FILE) ## init terraform

$(TF_STATE_FILE): $(REPO_CONFIG_LOCATION) terraform/main.tf
# terraform init
@set -a; source $<; set +a; \
if [ "$${GRAFANA_TERRAFORM_STATE_BACKEND_TYPE}" = "local" ]; then \
terraform -chdir=./terraform init; \
else \
terraform -chdir=./terraform init -backend-config="access_key=$${TF_GRAFANA_STATE_BACKEND_AWS_ACCESS_KEY_ID}" -backend-config="secret_key=$${TF_GRAFANA_STATE_BACKEND_AWS_SECRET_ACCESS_KEY}"; \
fi

terraform/plan.cache:
@echo "$@ file not found. Run 'make terraform-plan' to generate it."
@exit 1

.PHONY: terraform-plan
terraform-plan: $(REPO_CONFIG_LOCATION) $(TF_STATE_FILE) ensure-grafana-online ## terraform plan
# terraform plan
@set -a; source $<; set +a; \
terraform -chdir=./terraform plan -out=plan.cache

.PHONY: terraform-apply
terraform-apply: $(REPO_CONFIG_LOCATION) terraform/plan.cache $(TF_STATE_FILE) ensure-grafana-online ## terraform apply
# terraform apply
@set -a; source $<; set +a; \
terraform -chdir=./terraform apply plan.cache

.PHONY: ensure-grafana-online
ensure-grafana-online:
@set -o allexport; \
source $(REPO_CONFIG_LOCATION); \
set +o allexport; \
url=$${TF_VAR_GRAFANA_URL}; \
echo "Waiting for grafana at $$url to become reachable..."; \
attempts=0; \
max_attempts=10; \
while [ $$attempts -lt $$max_attempts ]; do \
status_code=$$(curl -k -o /dev/null -s -w "%{http_code}" --max-time 10 $$url); \
if [ "$$status_code" -ge 200 ] && [ "$$status_code" -lt 400 ]; then \
echo "Grafana is online"; \
break; \
else \
echo "Grafana still unreachable, waiting 5s for grafana to become reachable... (Attempt $$((attempts+1)))"; \
sleep 5; \
attempts=$$((attempts + 1)); \
fi; \
done; \
if [ $$attempts -eq $$max_attempts ]; then \
echo "Max attempts reached, Grafana is still unreachable."; \
exit 1; \
fi;
2 changes: 0 additions & 2 deletions services/monitoring/grafana/scripts/.gitignore

This file was deleted.

26 changes: 0 additions & 26 deletions services/monitoring/grafana/scripts/README.MD

This file was deleted.

150 changes: 0 additions & 150 deletions services/monitoring/grafana/scripts/export.py

This file was deleted.

Loading
Loading