From 004b577878a30eec42d2f3026bb4f21d0c8fdeae Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 15 Jul 2021 00:12:07 +0530 Subject: [PATCH 1/2] chore(install): fix frontend download Signed-off-by: Rajesh Rajendran --- scripts/helm/roles/openreplay/tasks/install-dbs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/helm/roles/openreplay/tasks/install-dbs.yaml b/scripts/helm/roles/openreplay/tasks/install-dbs.yaml index 0f8b2b7b2..32da1b97d 100644 --- a/scripts/helm/roles/openreplay/tasks/install-dbs.yaml +++ b/scripts/helm/roles/openreplay/tasks/install-dbs.yaml @@ -78,6 +78,7 @@ unarchive: url: "https://github.com/openreplay/openreplay/releases/download/{{ openreplay_version }}/frontend.tar.gz" dest: "frontend" + remote_src: true tags: - frontend - name: initializing frontend From c56a8a4d58f2df0355f38c929938dee1fd36a5db Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 15 Jul 2021 00:21:24 +0530 Subject: [PATCH 2/2] chore(upgrade): patch smtp from old to new Signed-off-by: Rajesh Rajendran --- scripts/helm/upgrade.sh | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/scripts/helm/upgrade.sh b/scripts/helm/upgrade.sh index 1bdf3d6cd..60f161721 100644 --- a/scripts/helm/upgrade.sh +++ b/scripts/helm/upgrade.sh @@ -3,7 +3,8 @@ # upgrade.sh v1.10 cwd=$PWD -vars_file_path=$1/scripts/helm/vars.yaml +openreplay_old_dir=$1 +vars_file_path=${openreplay_old_dir}/scripts/helm/vars.yaml [[ $# == 1 ]] || { echo -e "OpenReplay previous version path not given.\nUsage: bash $0 /path/to/previous_openreplay_code_path" @@ -46,6 +47,32 @@ migration(){ ansible-playbook -c local migration.yaml -e @vars.yaml -e migration_versions=${joined_migration_versions} --tags $db -v } } + +# Patching sendgrid configs for chalice +# This is workaround for chalice email configs. +# Proper variable override will introduce in v1.3.0 +patch(){ + vars=( + EMAIL_HOST + EMAIL_PORT + EMAIL_USER + EMAIL_PASSWORD + EMAIL_USE_TLS + EMAIL_USE_SSL + EMAIL_SSL_KEY + EMAIL_SSL_CERT + EMAIL_FROM + ) + for var in ${vars[@]};do + # Get old value + old_val=`grep $var ${openreplay_old_dir}/scripts/helm/app/chalice.yaml|xargs` + sed -i "s/${var}.*/$old_val/g" app/chalice.yaml + done +} + +# patching chalice with sendgrid configs +patch + installation_type=1 echo -e "Migrating postgresql" migration postgresql