Skip to content

Commit b06e137

Browse files
Automatical lokal loki bucket creation (#1190)
* wip * Add csi-s3 and have portainer use it * Change request @Hrytsuk 1GB max portainer volume size * Arch Linux Certificates Customization * Fix pgsql exporter failure * [Kubernetes] Introduce on-prem persistent Storage (Longhorn) 🎉 (#979) * Introduce longhorn chart * Further longhorn configuration * Longhorn: further settings configuration * Fix longhorn configuration bugs Extra: introduce longhorn pv vales for portainer * Add comment for deletion longhorn * Further longhorn configuration * Add README.md for Longhorn wit FAQ * Update Longhorn readme * Update readme * Futher LH configuration * Update LH's Readme * Update Longhorn Readme * Improve LH's Readme * LH: Reduce reserved default disk space to 5% Since we use a dedicated disk for LH, we can go ahead with 5% * Use values to set Longhorn storage class * Update LH's Readme * LH Readme: add requirements reference * PR Review: bring back portainer s3 pv * LH: decrease portinaer volume size * Experimental: Try to add tracing to simcore-traefik on master * Fixes ITISFoundation/osparc-simcore#7363 * Arch Linux Certificates Customization - 2 * Automagically create Loki S3 bucket on local deployment * revert arch changes --------- Co-authored-by: Dustin Kaiser <[email protected]> Co-authored-by: YH <[email protected]>
1 parent c1ef8d5 commit b06e137

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

services/logging/Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,24 @@ STACK_NAME = $(notdir $(shell pwd))
77
TEMP_COMPOSE=.stack.${STACK_NAME}.yaml
88
REPO_BASE_DIR := $(shell git rev-parse --show-toplevel)
99

10+
define create-s3-bucket
11+
# ensure bucket is available in S3...
12+
set -o allexport; \
13+
source .env; \
14+
echo Creating bucket "$${S3_BUCKET_NAME_LOKI}";\
15+
export S3_ACCESS_KEY=$${S3_ACCESS_KEY_LOKI}; \
16+
export S3_SECRET_KEY=$${S3_SECRET_KEY_LOKI}; \
17+
export STORAGE_DOMAIN=$${STORAGE_DOMAIN}; \
18+
${REPO_BASE_DIR}/scripts/create-s3-bucket.bash "$${S3_BUCKET_NAME_LOKI}" && \
19+
set +o allexport; \
20+
# bucket is available in S3
21+
endef
22+
1023
# TARGETS --------------------------------------------------
1124
include ${REPO_BASE_DIR}/scripts/common.Makefile
1225

1326
.PHONY: up
14-
up: .init .env ${TEMP_COMPOSE} ## Deploys graylog stack
27+
up: .init .env ${TEMP_COMPOSE} ## Deploys logging stack
1528
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE} ${STACK_NAME}
1629
$(MAKE) configure
1730

@@ -43,6 +56,7 @@ up-master: .init .env ${TEMP_COMPOSE}-master
4356

4457
.PHONY: up-local ## Deploys graylog stack for local deployment
4558
up-local: .init .env ${TEMP_COMPOSE}-local ## Deploys graylog stack for local cluster
59+
@$(create-s3-bucket)
4660
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-local ${STACK_NAME}
4761
$(MAKE) configure
4862

services/logging/template.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ S3_BUCKET_NAME_LOKI=${S3_BUCKET_NAME_LOKI}
2323
S3_FORCE_PATH_STYLE_LOKI=${S3_FORCE_PATH_STYLE_LOKI}
2424
S3_REGION_LOKI=${S3_REGION_LOKI}
2525
S3_SECRET_KEY_LOKI=${S3_SECRET_KEY_LOKI}
26+
STORAGE_DOMAIN=${STORAGE_DOMAIN}

0 commit comments

Comments
 (0)