From 1ab98011ddaf92eab3c41903370782fcb506219e Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 8 Dec 2021 18:17:15 +0000 Subject: [PATCH 1/2] fix(install): update proper s3 endpoint for assets/http/utilities (#247) --- scripts/helm/roles/openreplay/templates/assets.yaml | 5 +++++ scripts/helm/roles/openreplay/templates/http.yaml | 5 +++++ scripts/helm/roles/openreplay/templates/utilities.yaml | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/scripts/helm/roles/openreplay/templates/assets.yaml b/scripts/helm/roles/openreplay/templates/assets.yaml index 740617166..5e435e822 100644 --- a/scripts/helm/roles/openreplay/templates/assets.yaml +++ b/scripts/helm/roles/openreplay/templates/assets.yaml @@ -13,6 +13,11 @@ env: REDIS_STRING: "{{ redis_endpoint }}" KAFKA_SERVERS: "{{ kafka_endpoint }}" KAFKA_USE_SSL: "{{ kafka_ssl }}" + # In case of minio, the instance is running inside kuberntes, + # which is accessible via nginx ingress. +{% if s3_endpoint != "http://minio.db.svc.cluster.local:9000" %} + ASSETS_ORIGIN: "https://{{assets_bucket}}.{{ s3_endpoint.split('https://')[-1] }}" +{% endif %} {% if not (docker_registry_username is defined and docker_registry_username and docker_registry_password is defined and docker_registry_password) %} imagePullSecrets: [] diff --git a/scripts/helm/roles/openreplay/templates/http.yaml b/scripts/helm/roles/openreplay/templates/http.yaml index a6f9d86b4..9c11a0a69 100644 --- a/scripts/helm/roles/openreplay/templates/http.yaml +++ b/scripts/helm/roles/openreplay/templates/http.yaml @@ -12,6 +12,11 @@ env: REDIS_STRING: "{{ redis_endpoint }}" KAFKA_SERVERS: "{{ kafka_endpoint }}" KAFKA_USE_SSL: "{{ kafka_ssl }}" + # In case of minio, the instance is running inside kuberntes, + # which is accessible via nginx ingress. +{% if s3_endpoint != "http://minio.db.svc.cluster.local:9000" %} + ASSETS_ORIGIN: "https://{{assets_bucket}}.{{ s3_endpoint.split('https://')[-1] }}" +{% endif %} {% if not (docker_registry_username is defined and docker_registry_username and docker_registry_password is defined and docker_registry_password) %} imagePullSecrets: [] diff --git a/scripts/helm/roles/openreplay/templates/utilities.yaml b/scripts/helm/roles/openreplay/templates/utilities.yaml index fb7eb0ae0..5646b3944 100644 --- a/scripts/helm/roles/openreplay/templates/utilities.yaml +++ b/scripts/helm/roles/openreplay/templates/utilities.yaml @@ -10,7 +10,13 @@ imagePullSecrets: [] env: S3_KEY: "{{ minio_access_key }}" S3_SECRET: "{{ minio_secret_key }}" + # In case of minio, the instance is running inside kuberntes, + # which is accessible via nginx ingress. +{% if s3_endpoint == "http://minio.db.svc.cluster.local:9000" %} S3_HOST: "https://{{ domain_name }}" +{% else %} + S3_HOST: "{{ s3_endpoint }}" +{% endif %} jwt_secret: "{{ jwt_secret_key }}" AWS_DEFAULT_REGION: "{{ aws_region }}" {% if env is defined and env.chalice is defined and env.chalice%} From fce3539121278e02b3d22717e5167b82ec5a5858 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 9 Dec 2021 17:17:36 +0530 Subject: [PATCH 2/2] chore(install): creating cache topic Signed-off-by: Rajesh Rajendran --- scripts/helm/roles/openreplay/tasks/install-dbs.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/helm/roles/openreplay/tasks/install-dbs.yaml b/scripts/helm/roles/openreplay/tasks/install-dbs.yaml index 56448c43b..fd8f1993b 100644 --- a/scripts/helm/roles/openreplay/tasks/install-dbs.yaml +++ b/scripts/helm/roles/openreplay/tasks/install-dbs.yaml @@ -61,10 +61,11 @@ ### Set retention time: kubectl exec -n db kafka-0 -- /bin/bash -c '/opt/bitnami/kafka/bin/kafka-configs.sh --zookeeper kafka-zookeeper.db.svc.cluster.local:2181 --entity-type topics --alter --add-config retention.ms={{ item.retention }} --entity-name {{ item.name }}' with_items: - - {name: "messages", retention: "3456000000"} - - {name: "events", retention: "3456000000"} - {name: "raw", retention: "3456000000"} + - {name: "raw-ios", retention: "3456000000"} - {name: "trigger", retention: "3456000000"} + - {name: "cache", retention: "3456000000"} + - {name: "analytics", retention: "3456000000"} retries: 3 delay: 60 register: result