Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions simplyblock_core/env_var
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,19 @@ SIMPLY_BLOCK_VERSION=19.2.34

SIMPLY_BLOCK_DOCKER_IMAGE=public.ecr.aws/simply-block/simplyblock:main
SIMPLY_BLOCK_SPDK_ULTRA_IMAGE=public.ecr.aws/simply-block/ultra:main-latest

# external images
FDB_IMAGE=foundationdb/foundationdb:7.3.63
HAPROXY_IMAGE=haproxytech/haproxy-debian:latest
MONGODB_IMAGE=mongo:5.0
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.4.0
GRAYLOG_IMAGE=graylog/graylog:5.0
PROMETHEUS_IMAGE=prom/prometheus:v2.44.0
THANOS_IMAGE=thanosio/thanos:v0.31.0
NODE_EXPORTER_IMAGE=prom/node-exporter:v1.7.0
GRAFANA_IMAGE=grafana/grafana:10.0.12
FLUENTD_IMAGE=public.ecr.aws/simply-block/fluentd-kubernetes-daemonset:v1.17.1-debian-graylog-1.2
KUBECTL_IMAGE=alpine/kubectl:1.34.1
UBUNTU_IMAGE=ubuntu:22.04
ALPINE_IMAGE=alpine:3.20
ALPINE_TOOLS_IMAGE=simplyblock/alpine-tools:3.21.3
21 changes: 21 additions & 0 deletions simplyblock_core/env_var.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
SIMPLY_BLOCK_COMMAND_NAME=sbcli-dev
SIMPLY_BLOCK_VERSION=19.2.34

SIMPLY_BLOCK_DOCKER_IMAGE=public.ecr.aws/simply-block/simplyblock:main-images-to-env-var
SIMPLY_BLOCK_SPDK_ULTRA_IMAGE=public.ecr.aws/simply-block/ultra:main-latest

# external images
FDB_IMAGE=foundationdb/foundationdb:7.3.63
HAPROXY_IMAGE=haproxytech/haproxy-debian:latest
MONGODB_IMAGE=mongo:5.0
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.4.0
GRAYLOG_IMAGE=graylog/graylog:5.0
PROMETHEUS_IMAGE=prom/prometheus:v2.44.0
THANOS_IMAGE=thanosio/thanos:v0.31.0
NODE_EXPORTER_IMAGE=prom/node-exporter:v1.7.0
GRAFANA_IMAGE=grafana/grafana:10.0.12
FLUENTD_IMAGE=public.ecr.aws/simply-block/fluentd-kubernetes-daemonset:v1.17.1-debian-graylog-1.2
KUBECTL_IMAGE=alpine/kubectl:1.34.1
UBUNTU_IMAGE=ubuntu:22.04
ALPINE_IMAGE=alpine:3.20
ALPINE_TOOLS_IMAGE=simplyblock/alpine-tools:3.21.3
21 changes: 21 additions & 0 deletions simplyblock_core/env_var.quay.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
SIMPLY_BLOCK_COMMAND_NAME=sbcli-dev
SIMPLY_BLOCK_VERSION=19.2.34

SIMPLY_BLOCK_DOCKER_IMAGE=quay.io/simplyblock-io/simplyblock:main-images-to-env-var
SIMPLY_BLOCK_SPDK_ULTRA_IMAGE=quay.io/simplyblock-io/ultra:main-latest

# external images
FDB_IMAGE=quay.io/simplyblock-io/foundationdb:7.3.63
HAPROXY_IMAGE=quay.io/simplyblock-io/haproxy-debian:latest
MONGODB_IMAGE=quay.io/simplyblock-io/mongo:5.0
OPENSEARCH_IMAGE=quay.io/simplyblock-io/opensearch:2.4.0
GRAYLOG_IMAGE="quay.io/simplyblock-io/graylog:5.0"
PROMETHEUS_IMAGE=quay.io/simplyblock-io/prometheus:v2.44.0
THANOS_IMAGE=quay.io/simplyblock-io/thanos:v0.31.0
NODE_EXPORTER_IMAGE=quay.io/simplyblock-io/node-exporter:v1.7.0
GRAFANA_IMAGE=quay.io/simplyblock-io/grafana:10.0.12
FLUENTD_IMAGE=quay.io/simplyblock-io/fluentd-kubernetes-daemonset:v1.17.1-debian-graylog-1.2
KUBECTL_IMAGE=quay.io/simplyblock-io/kubectl:1.34.1
UBUNTU_IMAGE=quay.io/simplyblock-io/ubuntu:22.04
ALPINE_IMAGE=quay.io/simplyblock-io/alpine:3.20
ALPINE_TOOLS_IMAGE=quay.io/simplyblock-io/alpine-tools:3.21.3
3 changes: 3 additions & 0 deletions simplyblock_core/scripts/deploy_stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export GRAFANA_ENDPOINT=${10}
export DISABLE_MONITORING=${11}
export DIR="$(dirname "$(realpath "$0")")"

set -a
source "$DIR"/../env_var

if [ -s "/etc/foundationdb/fdb.cluster" ]
then
FDB_CLUSTER_FILE_CONTENTS=$(tail /etc/foundationdb/fdb.cluster -n 1)
Expand Down
20 changes: 10 additions & 10 deletions simplyblock_core/scripts/docker-compose-swarm-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.8'
services:
### monitoring ###
mongodb:
image: "mongo:5.0"
image: $MONGODB_IMAGE
volumes:
- "mongodb_data:/data/db"
deploy:
Expand All @@ -15,7 +15,7 @@ services:
- monitoring-net

opensearch:
image: "opensearchproject/opensearch:2.4.0"
image: $OPENSEARCH_IMAGE
environment:
- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"
- "bootstrap.memory_lock=true"
Expand All @@ -35,7 +35,7 @@ services:

graylog:
hostname: "server"
image: "graylog/graylog:5.0"
image: $GRAYLOG_IMAGE
entrypoint: "/usr/bin/tini -- wait-for-it opensearch:9200 -- /docker-entrypoint.sh"
environment:
GRAYLOG_NODE_ID_FILE: "/usr/share/graylog/data/config/node-id"
Expand Down Expand Up @@ -75,7 +75,7 @@ services:
- monitoring-net

prometheus:
image: prom/prometheus:v2.44.0
image: $PROMETHEUS_IMAGE
user: root
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
Expand All @@ -96,7 +96,7 @@ services:
- monitoring-net

thanos-sidecar:
image: thanosio/thanos:v0.31.0
image: $THANOS_IMAGE
user: root
command:
- sidecar
Expand All @@ -114,7 +114,7 @@ services:
- monitoring-net

thanos-store:
image: thanosio/thanos:v0.31.0
image: $THANOS_IMAGE
command:
- store
- --objstore.config-file=/etc/thanos/objstore.yml
Expand All @@ -130,7 +130,7 @@ services:
- monitoring-net

thanos-query:
image: thanosio/thanos:v0.31.0
image: $THANOS_IMAGE
command:
- query
- --http-address=0.0.0.0:9091
Expand All @@ -144,7 +144,7 @@ services:
- monitoring-net

thanos-compactor:
image: thanosio/thanos:v0.31.0
image: $THANOS_IMAGE
command:
- compact
- --data-dir=/data
Expand All @@ -165,7 +165,7 @@ services:
- monitoring-net

node-exporter:
image: prom/node-exporter:v1.7.0
image: $NODE_EXPORTER_IMAGE
user: root
volumes:
- /proc:/host/proc:ro
Expand All @@ -185,7 +185,7 @@ services:
- monitoring-net

grafana:
image: grafana/grafana:10.0.12
image: $GRAFANA_IMAGE
environment:
GF_SECURITY_ADMIN_USER: "admin"
GF_SECURITY_ADMIN_PASSWORD: "${CLUSTER_SECRET}"
Expand Down
6 changes: 3 additions & 3 deletions simplyblock_core/scripts/docker-compose-swarm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:

fdb-server:
<<: *service-base
image: foundationdb/foundationdb:7.3.63
image: $FDB_IMAGE
networks:
- hostnet
environment:
Expand All @@ -34,7 +34,7 @@ services:

fdb-backup-agent:
<<: *service-base
image: foundationdb/foundationdb:7.3.63
image: $FDB_IMAGE
entrypoint: "/usr/bin/backup_agent -C /etc/foundationdb/fdb.cluster"
networks:
- hostnet
Expand Down Expand Up @@ -121,7 +121,7 @@ services:
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"

HAProxy:
image: haproxytech/haproxy-debian:latest
image: $HAPROXY_IMAGE
deploy:
mode: global
placement:
Expand Down
11 changes: 11 additions & 0 deletions simplyblock_web/api/internal/storage_node/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@ def spdk_process_start(body: SPDKParams):
node_prepration_core_name += node_name
logger.debug(f"deploying k8s job to prepare worker: {node_name}")

fluentd_image = constants.get_config_var("FLUENTD_IMAGE", "public.ecr.aws/simply-block/fluentd-kubernetes-daemonset:v1.17.1-debian-graylog-1.2")
ubuntu_image = constants.get_config_var("UBUNTU_IMAGE", "ubuntu:22.04")
alpine_tools_image = constants.get_config_var("ALPINE_TOOLS_IMAGE", "quay.io/simplyblock-io/alpine-tools:3.21.3")
alpine_image = constants.get_config_var("ALPINE_IMAGE", "quay.io/simplyblock-io/alpine:3.20")
kubectl_image = constants.get_config_var("KUBECTL_IMAGE", "quay.io/simplyblock-io/kubectl:1.34.1")

try:
env = Environment(loader=PackageLoader('simplyblock_web', 'templates'), trim_blocks=True, lstrip_blocks=True)
values = {
Expand Down Expand Up @@ -374,6 +380,11 @@ def spdk_process_start(body: SPDKParams):
'CPU_TOPOLOGY_ENABLED': cpu_topology_enabled,
'RESERVED_SYSTEM_CPUS': reserved_system_cpus,
'TLS_ENABLED': Settings().tls_enabled,
'FLUENTD_IMAGE': fluentd_image,
'UBUNTU_IMAGE': ubuntu_image,
'ALPINE_TOOLS_IMAGE': alpine_tools_image,
'ALPINE_IMAGE': alpine_image,
'KUBECTL_IMAGE': kubectl_image,
}

if ubuntu_host:
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
path: /var/simplyblock
containers:
- name: init-setup
image: alpine/kubectl:1.34.1
image: ${{ KUBECTL_IMAGE }}
securityContext:
privileged: true
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion simplyblock_web/templates/oc_storage_cpu_topology.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
path: /var/simplyblock
containers:
- name: init-setup
image: alpine/kubectl:1.34.1
image: ${{ KUBECTL_IMAGE }}
securityContext:
privileged: true
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion simplyblock_web/templates/storage_core_isolation.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
path: /var/simplyblock
containers:
- name: init-setup
image: ubuntu:22.04
image: ${{ UBUNTU_IMAGE }}
securityContext:
privileged: true
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion simplyblock_web/templates/storage_cpu_topology.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:

containers:
- name: kubelet-cpu-topology
image: alpine:3.20
image: ${{ ALPINE_IMAGE }}
securityContext:
privileged: true
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion simplyblock_web/templates/storage_deploy_spdk.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ spec:
path: /var/log/pods
containers:
- name: fluentd
image: public.ecr.aws/simply-block/fluentd-kubernetes-daemonset:v1.17.1-debian-graylog-1.2
image: {{ FLUENTD_IMAGE }}
imagePullPolicy: "Always"
env:
- name: K8S_NODE_NAME
Expand Down
2 changes: 1 addition & 1 deletion simplyblock_web/templates/storage_init_job.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
path: /proc
containers:
- name: init-setup
image: simplyblock/alpine-tools:3.21.3
image: ${{ ALPINE_TOOLS_IMAGE }}
securityContext:
privileged: true
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion simplyblock_web/templates/ubuntu_kernel_extra.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
path: /
containers:
- name: init-setup
image: ubuntu:22.04
image: ${{ UBUNTU_IMAGE }}
securityContext:
privileged: true
volumeMounts:
Expand Down
Loading