From 57911ee8e3f247de4ba1cbe24c53c4e1e88daea5 Mon Sep 17 00:00:00 2001 From: Mehdi Osman Date: Mon, 24 Jan 2022 13:24:00 +0100 Subject: [PATCH 01/16] Update vars.yaml --- scripts/helmcharts/vars.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/helmcharts/vars.yaml b/scripts/helmcharts/vars.yaml index 14561985d..ff251ebd0 100644 --- a/scripts/helmcharts/vars.yaml +++ b/scripts/helmcharts/vars.yaml @@ -16,9 +16,9 @@ postgresql: &postgres # memory: 3000Mi # cpu: 2 -clickhouse: &clickhouse +clickhouse: # For enterpriseEdition - # enabled: true + enabled: false kafka: &kafka # For enterpriseEdition From 4c6f9a4fcb1b57437a929ca6eba35317be02fac8 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 24 Jan 2022 19:41:26 +0530 Subject: [PATCH 02/16] change(ui) - show dynamic sso provider --- frontend/app/components/Login/Login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/Login/Login.js b/frontend/app/components/Login/Login.js index 33074a390..8e135d221 100644 --- a/frontend/app/components/Login/Login.js +++ b/frontend/app/components/Login/Login.js @@ -144,7 +144,7 @@ export default class Login extends React.Component {
or
- +
)} From 8d15d0a3bbe15c2359461cb00e941d8e1d1595ea Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Tue, 25 Jan 2022 20:10:35 +0530 Subject: [PATCH 03/16] chore(helm): comment for shared persistence. Signed-off-by: Rajesh Rajendran --- scripts/helmcharts/vars.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/helmcharts/vars.yaml b/scripts/helmcharts/vars.yaml index ff251ebd0..d155c0fab 100644 --- a/scripts/helmcharts/vars.yaml +++ b/scripts/helmcharts/vars.yaml @@ -71,6 +71,17 @@ global: enterpriseEditionLicense: "" domainName: "" +# If there is multiple nodes in the kubernetes cluster, +# we'll have to create a NFS share PVC for both the containers to share data. +# If it's the single node, we'll use hostVolume, which is default for community installation. +# Note: Both PVC name should be same. +# sink: +# pvc: +# name: mysharedpersistence +# storage: +# pvc: +# name: mysharedpersistence + chalice: env: jwt_secret: "SetARandomStringHere" From 8528ebdc7d428c1844636da44be4096c4d7d0405 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Tue, 25 Jan 2022 20:11:38 +0530 Subject: [PATCH 04/16] chore(helm): use externalTrafficPolicy only for lb/nodeport type svc. Signed-off-by: Rajesh Rajendran --- .../openreplay/charts/nginx-ingress/templates/service.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/service.yaml b/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/service.yaml index 94c034375..35d6d969c 100644 --- a/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/service.yaml +++ b/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/service.yaml @@ -6,8 +6,10 @@ metadata: {{- include "nginx-ingress.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} + {{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")}} # Make sure to get client ip externalTrafficPolicy: Local + {{- end}} ports: {{- range .Values.service.ports }} - port: {{ .port }} From 0ed3cf3bab4cbe0fd8cb19be8334de7a33655255 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Tue, 25 Jan 2022 22:10:49 +0530 Subject: [PATCH 05/16] chore(helm): removing quotes from deployment. --- .../openreplay/charts/alerts/templates/deployment.yaml | 4 ++-- .../openreplay/charts/assets/templates/deployment.yaml | 4 ++-- .../openreplay/charts/chalice/templates/deployment.yaml | 4 ++-- .../openreplay/charts/http/templates/deployment.yaml | 4 ++-- .../openreplay/charts/storage/templates/deployment.yaml | 4 ++-- .../openreplay/charts/utilities/templates/deployment.yaml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/helmcharts/openreplay/charts/alerts/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/alerts/templates/deployment.yaml index 6cdbe17b6..f88266e66 100644 --- a/scripts/helmcharts/openreplay/charts/alerts/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/alerts/templates/deployment.yaml @@ -59,9 +59,9 @@ spec: value: '{{ .Values.global.s3.endpoint }}' {{- end }} - name: S3_KEY - value: '{{ .Values.global.s3.accessKey }}' + value: {{ .Values.global.s3.accessKey }} - name: S3_SECRET - value: '{{ .Values.global.s3.secretKey }}' + value: {{ .Values.global.s3.secretKey }} - name: AWS_DEFAULT_REGION value: '{{ .Values.global.s3.region }}' - name: EMAIL_HOST diff --git a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml index 5df3ee4a8..07977bfe6 100644 --- a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml @@ -39,9 +39,9 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: AWS_ACCESS_KEY_ID - value: '{{ .Values.global.s3.accessKey }}' + value: {{ .Values.global.s3.accessKey }} - name: AWS_SECRET_ACCESS_KEY - value: '{{ .Values.global.s3.secretKey }}' + value: {{ .Values.global.s3.secretKey }} - name: S3_BUCKET_ASSETS value: '{{ .Values.global.s3.assetsBucket }}' - name: LICENSE_KEY diff --git a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml index 25ec6c387..6282def51 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml @@ -61,9 +61,9 @@ spec: value: '{{ .Values.global.s3.endpoint }}' {{- end}} - name: S3_KEY - value: '{{ .Values.global.s3.accessKey }}' + value: {{ .Values.global.s3.accessKey }} - name: S3_SECRET - value: '{{ .Values.global.s3.secretKey }}' + value: {{ .Values.global.s3.secretKey }} - name: AWS_DEFAULT_REGION value: '{{ .Values.global.s3.region }}' - name: sessions_region diff --git a/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml index 7de2a80c5..8ec91c939 100644 --- a/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml @@ -39,9 +39,9 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: AWS_ACCESS_KEY_ID - value: '{{ .Values.global.s3.accessKey }}' + value: {{ .Values.global.s3.accessKey }} - name: AWS_SECRET_ACCESS_KEY - value: '{{ .Values.global.s3.secretKey }}' + value: {{ .Values.global.s3.secretKey }} - name: AWS_REGION value: '{{ .Values.global.s3.region }}' - name: LICENSE_KEY diff --git a/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml index c5ec92cf4..2ea80f0e4 100644 --- a/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml @@ -39,9 +39,9 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: AWS_ACCESS_KEY_ID - value: '{{ .Values.global.s3.accessKey }}' + value: {{ .Values.global.s3.accessKey }} - name: AWS_SECRET_ACCESS_KEY - value: '{{ .Values.global.s3.secretKey }}' + value: {{ .Values.global.s3.secretKey }} - name: AWS_ENDPOINT value: '{{ .Values.global.s3.endpoint }}' - name: AWS_REGION_WEB diff --git a/scripts/helmcharts/openreplay/charts/utilities/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/utilities/templates/deployment.yaml index 628cda58d..a1b005253 100644 --- a/scripts/helmcharts/openreplay/charts/utilities/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/utilities/templates/deployment.yaml @@ -47,9 +47,9 @@ spec: value: '{{ .Values.global.s3.endpoint }}' {{- end}} - name: S3_KEY - value: "{{ .Values.global.s3.accessKey }}" + value: {{ .Values.global.s3.accessKey }} - name: S3_SECRET - value: "{{ .Values.global.s3.secretKey }}" + value: {{ .Values.global.s3.secretKey }} {{- range $key, $val := .Values.env }} - name: {{ $key }} value: '{{ $val }}' From 5a00d52a051d930c3d36b8a0bb1c97598905515a Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Tue, 25 Jan 2022 22:10:49 +0530 Subject: [PATCH 06/16] chore(helm): removing quotes from deployment. --- .../openreplay/charts/assets/templates/deployment.yaml | 4 ++-- .../openreplay/charts/chalice/templates/deployment.yaml | 6 +++--- .../openreplay/charts/http/templates/deployment.yaml | 2 +- .../openreplay/charts/storage/templates/deployment.yaml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml index 07977bfe6..1af5164ca 100644 --- a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml @@ -43,7 +43,7 @@ spec: - name: AWS_SECRET_ACCESS_KEY value: {{ .Values.global.s3.secretKey }} - name: S3_BUCKET_ASSETS - value: '{{ .Values.global.s3.assetsBucket }}' + value: {{ .Values.global.s3.assetsBucket }} - name: LICENSE_KEY value: '{{ .Values.global.enterpriseEditionLicense }}' - name: AWS_ENDPOINT @@ -59,7 +59,7 @@ spec: # Ref: https://stackoverflow.com/questions/53634583/go-template-split-string-by-delimiter # We need https://bucketname.s3endpoint - name: ASSETS_ORIGIN - value: '{{ (split "://" .Values.global.s3.endpoint)._0 }}://{{.Values.global.s3.assetsBucket}}.{{ (split "://" .Values.global.s3.endpoint)._1 }}' + value: {{ (split "://" .Values.global.s3.endpoint)._0 }}://{{.Values.global.s3.assetsBucket}}.{{ (split "://" .Values.global.s3.endpoint)._1 }} {{- range $key, $val := .Values.env }} - name: {{ $key }} value: '{{ $val }}' diff --git a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml index 6282def51..f3eb46d1d 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml @@ -69,11 +69,11 @@ spec: - name: sessions_region value: '{{ .Values.global.s3.region }}' - name: sessions_bucket - value: '{{ .Values.global.s3.recordingsBucket }}' + value: {{ .Values.global.s3.recordingsBucket }} - name: sourcemaps_bucket - value: '{{ .Values.global.s3.sourcemapsBucket }}' + value: {{ .Values.global.s3.sourcemapsBucket }} - name: js_cache_bucket - value: '{{ .Values.global.s3.assetsBucket }}' + value: {{ .Values.global.s3.assetsBucket }} - name: EMAIL_HOST value: '{{ .Values.global.email.emailHost }}' - name: EMAIL_PORT diff --git a/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml index 8ec91c939..d728b7d02 100644 --- a/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml @@ -55,7 +55,7 @@ spec: - name: POSTGRES_STRING value: 'postgres://{{ .Values.global.postgresql.postgresqlUser }}:{{ .Values.global.postgresql.postgresqlPassword }}@{{ .Values.global.postgresql.postgresqlHost }}:{{ .Values.global.postgresql.postgresqlPort }}/{{ .Values.global.postgresql.postgresqlDatabase }}' - name: ASSETS_ORIGIN - value: '{{ (split "://" .Values.global.s3.endpoint)._0 }}://{{.Values.global.s3.assetsBucket}}.{{ (split "://" .Values.global.s3.endpoint)._1 }}' + value: {{ (split "://" .Values.global.s3.endpoint)._0 }}://{{.Values.global.s3.assetsBucket}}.{{ (split "://" .Values.global.s3.endpoint)._1 }} {{- range $key, $val := .Values.env }} - name: {{ $key }} value: '{{ $val }}' diff --git a/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml index 2ea80f0e4..0004bfc7f 100644 --- a/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml @@ -49,9 +49,9 @@ spec: - name: AWS_REGION_IOS value: '{{ .Values.global.s3.region }}' - name: S3_BUCKET_WEB - value: '{{ .Values.global.s3.recordingsBucket }}' + value: {{ .Values.global.s3.recordingsBucket }} - name: S3_BUCKET_IOS - value: '{{ .Values.global.s3.recordingsBucket }}' + value: {{ .Values.global.s3.recordingsBucket }} - name: REDIS_STRING value: '{{ .Values.global.redis.redisHost }}:{{ .Values.global.redis.redisPort }}' - name: LICENSE_KEY From 219a12f61eb2e4124ce5d97a51e6be0ddf72d0d8 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 26 Jan 2022 09:13:36 +0530 Subject: [PATCH 07/16] fix(ansible): duplicate colon Signed-off-by: Rajesh Rajendran --- scripts/helmcharts/vars_template.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/helmcharts/vars_template.yaml b/scripts/helmcharts/vars_template.yaml index 84ce36ee6..2230e0a75 100644 --- a/scripts/helmcharts/vars_template.yaml +++ b/scripts/helmcharts/vars_template.yaml @@ -24,14 +24,14 @@ kafka: &kafka # For enterpriseEdition # enabled: true - kafkaHost: "{{ kafka_endpoint }}" + kafkaHost: "{{ kafka_endpoint.split(':')[0] }}" kafkaPort: "{{ kafka_endpoint.split(':')[-1] }}" kafkaUseSsl: "{{ kafka_ssl }}" redis: &redis # For enterpriseEdition # enabled: false - redisHost: "{{ redis_endpoint }}" + redisHost: "{{ redis_endpoint.split(':')[0] }}" redisPort: "{{ redis_endpoint.split(':')[-1] }}" minio: From 3d6313b47c579f0ef7774284e0ad5edae6b496b0 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 26 Jan 2022 22:54:13 +0530 Subject: [PATCH 08/16] chore(management script): update ops Signed-off-by: Rajesh Rajendran --- scripts/helmcharts/openreplay-cli | 145 +++++++++++++++++++++++++++++- 1 file changed, 144 insertions(+), 1 deletion(-) mode change 120000 => 100755 scripts/helmcharts/openreplay-cli diff --git a/scripts/helmcharts/openreplay-cli b/scripts/helmcharts/openreplay-cli deleted file mode 120000 index d299dbb4f..000000000 --- a/scripts/helmcharts/openreplay-cli +++ /dev/null @@ -1 +0,0 @@ -../helm/openreplay-cli \ No newline at end of file diff --git a/scripts/helmcharts/openreplay-cli b/scripts/helmcharts/openreplay-cli new file mode 100755 index 000000000..1b52e2bd5 --- /dev/null +++ b/scripts/helmcharts/openreplay-cli @@ -0,0 +1,144 @@ +#!/bin/bash + +## This script is a helper for managing your OpenReplay instance + +set -eE -o pipefail # same as: `set -o errexit -o errtrace` +# Trapping the error +trap err EXIT + +err() { + case "$?" in + 0) + ;; + *) + ;; + esac +} + +# make all stderr red +color()(set -o pipefail;"$@" 2>&1>&3|sed $'s,.*,\e[31m&\e[m,'>&2)3>&1 + +# color schemes +# Ansi color code variables +red="\e[0;91m" +blue="\e[0;94m" +expand_bg="\e[K" +blue_bg="\e[0;104m${expand_bg}" +red_bg="\e[0;101m${expand_bg}" +green_bg="\e[0;102m${expand_bg}" +green="\e[0;92m" +white="\e[0;97m" +bold="\e[1m" +uline="\e[4m" +reset="\e[0m" + +CWD=$pwd + +usage() +{ +clear +cat <<"EOF" + ___ ____ _ + / _ \ _ __ ___ _ __ | _ \ ___ _ __ | | __ _ _ _ +| | | | '_ \ / _ \ '_ \| |_) / _ \ '_ \| |/ _` | | | | +| |_| | |_) | __/ | | | _ < __/ |_) | | (_| | |_| | + \___/| .__/ \___|_| |_|_| \_\___| .__/|_|\__,_|\__, | + |_| |_| |___/ + +EOF + + echo -e "${green}Usage: openreplay-cli [ -h | --help ] + [ -d | --status ] + [ -v | --verbose ] + [ -l | --logs SERVICE ] + [ -I | --helm-install SERVICE ] + [ -s | --stop SERVICE|all ] + [ -S | --start SERVICE|all ] + [ -r | --restart SERVICE|all ]" + echo -e "${reset}${blue}services: ${services[*]}${reset}" + exit 0 +} +services=( alerts assets chalice clickhouse ender sink storage http integrations ios-proxy db pg redis postgresql ) + +check() { + if ! command -v kubectl &> /dev/null + then + >&2 echo "Kubectl not found. Please refer https://kubernetes.io/docs/tasks/tools/install-kubectl/ " + exit 2 + fi + kubectl cluster-info &> /dev/null + if [[ $? -ne 0 ]]; then + echo -e "${red}Kubernetes cluster is not accessible.\nPlease check ${bold}KUBECONFIG${reset}${red} env variable is set or ${bold}~/.kube/config exists.${reset}" + exit 1 + fi +} + +stop() { + if [[ $1 == "all" ]]; then + kubectl scale deployment -n app --replicas=0 --all + return + fi + kubectl scale -n app deployment --replicas=0 $1-openreplay +} + +start() { + helm upgrade --install openreplay -n app openreplay -f vars.yaml +} + + +restart() { + if [[ $1 == "all" ]]; then + kubectl rollout restart deployment -n app + return + fi + kubectl rollout restart -n app deployment $1-openreplay +} + + +helmInstall() { + helm upgrade --install openreplay -n app openreplay -f vars.yaml +} + +upgrade() { + sed -i "s/tag:.*/ tag: 'latest'/g" ./app/$1.yaml +} + +logs() { + check + kubectl logs --timestamps -n app -l app.kubernetes.io/name=$1 -f +} + +status() { + kubectl get deployment.apps -n app +} + +[[ $# -eq 0 ]] && usage && exit 1 + +PARSED_ARGUMENTS=$(color getopt -a -n openreplay-cli -o vhds:S:l:r:I --long verbose,help,status,start:,stop:,logs:,restart:,helm-install -- "$@") +VALID_ARGUMENTS=$? +if [[ "$VALID_ARGUMENTS" != "0" ]]; then + usage +fi + +eval set -- "$PARSED_ARGUMENTS" +while : +do + case "$1" in + -v | --verbose) VERBOSE=1 ; shift ;; + -h | --help) usage ; shift ;; + -d | --status) status ; shift ;; + -I | --helm-install) helmInstall; shift ;; + -s | --stop) stop $2 ; shift 2 ;; + -S | --start) start $2 ; shift 2 ;; + -l | --logs) logs "$2" ; shift 2 ;; + -r | --restart) restart "$2" ; shift 2 ;; + # -- means the end of the arguments; drop this, and break out of the while loop + --) shift; break ;; + # If invalid options were passed, then getopt should have reported an error, + # which we checked as VALID_ARGUMENTS when getopt was called... + *) echo "Unexpected option: $1 - this should not happen." + usage ;; + esac +done + +[[ $VERBOSE -eq 1 ]] && set -x From 1248aea5d2c1a8135119b99d3e2d80ae8b876f62 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 26 Jan 2022 23:08:17 +0530 Subject: [PATCH 09/16] chore(helm): disable autoscaling by default --- scripts/helmcharts/openreplay/charts/alerts/values.yaml | 2 +- scripts/helmcharts/openreplay/charts/assets/values.yaml | 2 +- scripts/helmcharts/openreplay/charts/chalice/values.yaml | 2 +- scripts/helmcharts/openreplay/charts/db/values.yaml | 2 +- scripts/helmcharts/openreplay/charts/ender/values.yaml | 2 +- scripts/helmcharts/openreplay/charts/http/values.yaml | 2 +- scripts/helmcharts/openreplay/charts/integrations/values.yaml | 2 +- scripts/helmcharts/openreplay/charts/sink/values.yaml | 2 +- scripts/helmcharts/openreplay/charts/storage/values.yaml | 2 +- scripts/helmcharts/openreplay/charts/utilities/values.yaml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/helmcharts/openreplay/charts/alerts/values.yaml b/scripts/helmcharts/openreplay/charts/alerts/values.yaml index 294434fd8..5a19d43e1 100644 --- a/scripts/helmcharts/openreplay/charts/alerts/values.yaml +++ b/scripts/helmcharts/openreplay/charts/alerts/values.yaml @@ -69,7 +69,7 @@ resources: {} # memory: 128Mi autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 diff --git a/scripts/helmcharts/openreplay/charts/assets/values.yaml b/scripts/helmcharts/openreplay/charts/assets/values.yaml index 875d0450a..2069e0fe8 100644 --- a/scripts/helmcharts/openreplay/charts/assets/values.yaml +++ b/scripts/helmcharts/openreplay/charts/assets/values.yaml @@ -69,7 +69,7 @@ resources: {} # memory: 128Mi autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 diff --git a/scripts/helmcharts/openreplay/charts/chalice/values.yaml b/scripts/helmcharts/openreplay/charts/chalice/values.yaml index 5e76420e8..3290b9872 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/values.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/values.yaml @@ -69,7 +69,7 @@ resources: {} # memory: 128Mi autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 diff --git a/scripts/helmcharts/openreplay/charts/db/values.yaml b/scripts/helmcharts/openreplay/charts/db/values.yaml index 70c181ce2..acc565368 100644 --- a/scripts/helmcharts/openreplay/charts/db/values.yaml +++ b/scripts/helmcharts/openreplay/charts/db/values.yaml @@ -69,7 +69,7 @@ resources: {} # memory: 128Mi autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 diff --git a/scripts/helmcharts/openreplay/charts/ender/values.yaml b/scripts/helmcharts/openreplay/charts/ender/values.yaml index d5a7c52b1..e860a1ea2 100644 --- a/scripts/helmcharts/openreplay/charts/ender/values.yaml +++ b/scripts/helmcharts/openreplay/charts/ender/values.yaml @@ -69,7 +69,7 @@ resources: {} # memory: 128Mi autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 diff --git a/scripts/helmcharts/openreplay/charts/http/values.yaml b/scripts/helmcharts/openreplay/charts/http/values.yaml index e841b4cac..8125d8cf9 100644 --- a/scripts/helmcharts/openreplay/charts/http/values.yaml +++ b/scripts/helmcharts/openreplay/charts/http/values.yaml @@ -69,7 +69,7 @@ resources: {} # memory: 128Mi autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 diff --git a/scripts/helmcharts/openreplay/charts/integrations/values.yaml b/scripts/helmcharts/openreplay/charts/integrations/values.yaml index e35b79308..cbe9f301a 100644 --- a/scripts/helmcharts/openreplay/charts/integrations/values.yaml +++ b/scripts/helmcharts/openreplay/charts/integrations/values.yaml @@ -69,7 +69,7 @@ resources: {} # memory: 128Mi autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 diff --git a/scripts/helmcharts/openreplay/charts/sink/values.yaml b/scripts/helmcharts/openreplay/charts/sink/values.yaml index 9d55ee370..26ef4367e 100644 --- a/scripts/helmcharts/openreplay/charts/sink/values.yaml +++ b/scripts/helmcharts/openreplay/charts/sink/values.yaml @@ -69,7 +69,7 @@ resources: {} # memory: 128Mi autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 diff --git a/scripts/helmcharts/openreplay/charts/storage/values.yaml b/scripts/helmcharts/openreplay/charts/storage/values.yaml index 9f1dbfd91..d82614693 100644 --- a/scripts/helmcharts/openreplay/charts/storage/values.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/values.yaml @@ -69,7 +69,7 @@ resources: {} # memory: 128Mi autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 diff --git a/scripts/helmcharts/openreplay/charts/utilities/values.yaml b/scripts/helmcharts/openreplay/charts/utilities/values.yaml index 6c3e0056f..c5ef37fe2 100644 --- a/scripts/helmcharts/openreplay/charts/utilities/values.yaml +++ b/scripts/helmcharts/openreplay/charts/utilities/values.yaml @@ -69,7 +69,7 @@ resources: {} # memory: 128Mi autoscaling: - enabled: true + enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 From 21eec58af3abada9a49f178b0884f869d45aae67 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Thu, 27 Jan 2022 00:13:42 +0530 Subject: [PATCH 10/16] fix(ui) - elastic form validate host --- frontend/app/types/integrations/elasticsearchConfig.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/types/integrations/elasticsearchConfig.js b/frontend/app/types/integrations/elasticsearchConfig.js index f8a22df32..628946047 100644 --- a/frontend/app/types/integrations/elasticsearchConfig.js +++ b/frontend/app/types/integrations/elasticsearchConfig.js @@ -1,5 +1,5 @@ import Record from 'Types/Record'; -import { validateIP } from 'App/validate' +import { validateURL } from 'App/validate' export const API_KEY_ID_LENGTH = 20; export const API_KEY_LENGTH = 22; @@ -20,7 +20,7 @@ export default Record({ }), methods: { validateKeys() { - return this.apiKeyId.length === API_KEY_ID_LENGTH && this.apiKey.length === API_KEY_LENGTH && validateIP(this.host); + return this.apiKeyId.length === API_KEY_ID_LENGTH && this.apiKey.length === API_KEY_LENGTH && validateURL(this.host); }, validate() { return this.host !== '' && this.apiKeyId !== '' && this.apiKey !== '' && this.indexes !== '' && !!this.port && From af972abcb76f697232af1ae7540b354720a7b168 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 27 Jan 2022 13:04:42 +0530 Subject: [PATCH 11/16] chore(helm): using custom built openresty with monitoring support and increased worker connection Signed-off-by: Rajesh Rajendran --- scripts/helmcharts/openreplay/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/helmcharts/openreplay/values.yaml b/scripts/helmcharts/openreplay/values.yaml index a3dae332f..7fcd4121e 100644 --- a/scripts/helmcharts/openreplay/values.yaml +++ b/scripts/helmcharts/openreplay/values.yaml @@ -87,7 +87,7 @@ nginx-ingress: # Using openresty because we need lua support, # and dynamic resolve config from local. # Ref: https://serverfault.com/questions/638822/nginx-resolver-address-from-etc-resolv-conf - repository: openresty/openresty + repository: rg.fr-par.scw.cloud/foss/openresty pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "buster" From fce92fd491840e4272fd900a8baf02b3b3aabe77 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 27 Jan 2022 13:14:47 +0530 Subject: [PATCH 12/16] chore(nginx): pinning domain name for listeners Signed-off-by: Rajesh Rajendran --- .../openreplay/charts/nginx-ingress/templates/configMap.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml b/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml index 77100c35c..b12083b47 100644 --- a/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml +++ b/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml @@ -140,14 +140,15 @@ data: } server { listen 80 default_server; - listen [::]:80 default_server; - # server_name _; + listen [::]:80; + server_name {{ .Values.global.domainName }}; {{ .Values.customServerConfigs }} include /etc/nginx/conf.d/location.list; client_max_body_size 10M; } server { listen 443 ssl; + server_name {{ .Values.global.domainName }}; ssl_certificate /etc/secrets/site.crt; ssl_certificate_key /etc/secrets/site.key; ssl_protocols TLSv1.2 TLSv1.3; From 760deec2dba709011b3991e3a3c5fb18cfa40e29 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 27 Jan 2022 14:03:22 +0530 Subject: [PATCH 13/16] chore(nginx): default server for helath checks Creating separate health check server, as not to pollute the prom metrics. Signed-off-by: Rajesh Rajendran --- .../charts/nginx-ingress/templates/configMap.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml b/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml index b12083b47..5b2b21c28 100644 --- a/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml +++ b/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml @@ -138,9 +138,17 @@ data: default $http_x_forwarded_proto; '' $scheme; } + # Default server for helath check server { listen 80 default_server; listen [::]:80; + location /healthz { + return 200 'OK'; + } + } + server { + listen 80; + listen [::]:80; server_name {{ .Values.global.domainName }}; {{ .Values.customServerConfigs }} include /etc/nginx/conf.d/location.list; From d2ccfcc97ff95b7805b044dd9ead0c0c72db647b Mon Sep 17 00:00:00 2001 From: Mehdi Osman Date: Tue, 1 Feb 2022 15:19:39 +0100 Subject: [PATCH 14/16] Set cache_assets to true --- scripts/helmcharts/openreplay/charts/http/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/helmcharts/openreplay/charts/http/values.yaml b/scripts/helmcharts/openreplay/charts/http/values.yaml index 8125d8cf9..0eb280a12 100644 --- a/scripts/helmcharts/openreplay/charts/http/values.yaml +++ b/scripts/helmcharts/openreplay/charts/http/values.yaml @@ -78,7 +78,7 @@ autoscaling: env: TOKEN_SECRET: secret_token_string # TODO: generate on buld S3_BUCKET_IOS_IMAGES: sessions-mobile-assets - CACHE_ASSETS: false + CACHE_ASSETS: true HTTP_PORT: 80 From 1979891698e1ecb57c0a1512b6893f105877f301 Mon Sep 17 00:00:00 2001 From: Mehdi Osman Date: Tue, 8 Feb 2022 03:17:04 +0100 Subject: [PATCH 15/16] Added ua-parser-js, geoip-lite and socket.io --- third-party.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/third-party.md b/third-party.md index 98aefe5b0..539160336 100644 --- a/third-party.md +++ b/third-party.md @@ -1,4 +1,4 @@ -## Licenses (as of January 21, 2022) +## Licenses (as of February 8, 2022) Below is the list of dependencies used in OpenReplay software. Licenses may change between versions, so please keep this up to date with every new library you use. @@ -84,9 +84,12 @@ Below is the list of dependencies used in OpenReplay software. Licenses may chan | redux-immutable | BSD3 | JavaScript | | redux-thunk | MIT | JavaScript | | semantic-ui-react | MIT | JavaScript | -| socketio | MIT | JavaScript | +| socket.io | MIT | JavaScript | +| socket.io-client | MIT | JavaScript | | source-map | BSD3 | JavaScript | | aws-sdk | Apache2 | JavaScript | | serverless | MIT | JavaScript | | lib/pq | MIT | Go | | peerjs | MIT | JavaScript | +| geoip-lite | Apache2 | JavaScript | +| ua-parser-js | MIT | JavaScript | From d160ff067da44b6fde36d74518e1c12a5503dd04 Mon Sep 17 00:00:00 2001 From: Mehdi Osman Date: Tue, 8 Feb 2022 03:18:54 +0100 Subject: [PATCH 16/16] Added express --- third-party.md | 1 + 1 file changed, 1 insertion(+) diff --git a/third-party.md b/third-party.md index 539160336..6828d7761 100644 --- a/third-party.md +++ b/third-party.md @@ -93,3 +93,4 @@ Below is the list of dependencies used in OpenReplay software. Licenses may chan | peerjs | MIT | JavaScript | | geoip-lite | Apache2 | JavaScript | | ua-parser-js | MIT | JavaScript | +| express | MIT | JavaScript |