diff --git a/scripts/helm/kube-install.sh b/scripts/helm/kube-install.sh index 6e8102e5e..73cd6bae8 100755 --- a/scripts/helm/kube-install.sh +++ b/scripts/helm/kube-install.sh @@ -96,8 +96,8 @@ EOF medium: 4core 16G machine ideal: 8core 32G machine -apps can specifically be installed/reinstalled: - alerts assets chalice ender http integrations ios-proxy pg redis sink storage frontend +apps can specifically be installed/reinstalled: + alerts assets chalice ender http integrations ios-proxy pg redis sink storage frontend postgresql redis clickhouse ${reset}" echo type value: $installation_type exit 0 @@ -110,7 +110,7 @@ type() { small) installation_type=1 ;; medium) installation_type=1.5 ;; ideal) installation_type=2 ;; - *) + *) echo -e ${red}${bold}'ERROR!!!\nwrong value for `type`'${reset} usage ;; esac @@ -127,6 +127,11 @@ function app(){ ansible-playbook -c local setup.yaml -e @vars.yaml -e scale=$installation_type --tags nginx -v exit 0 ;; + postgresql|redis|clickhouse) + ansible-playbook -c local setup.yaml -e @vars.yaml -e scale=$installation_type -e db_name=$1 --tags db -v + exit 0 + ;; + *) frontend) ansible-playbook -c local setup.yaml -e @vars.yaml -e scale=$installation_type --tags frontend -v exit 0 diff --git a/scripts/helm/openreplay-cli b/scripts/helm/openreplay-cli index 19392c1ce..35f865b32 100755 --- a/scripts/helm/openreplay-cli +++ b/scripts/helm/openreplay-cli @@ -58,7 +58,7 @@ EOF echo -e "${reset}${blue}services: ${services[*]}${reset}" exit 0 } -services=( alerts assets chalice clickhouse ender sink storage http integrations ios-proxy db pg redis ) +services=( alerts assets chalice clickhouse ender sink storage http integrations ios-proxy db pg redis postgresql ) check() { if ! command -v kubectl &> /dev/null diff --git a/scripts/helm/roles/openreplay/tasks/install-dbs.yaml b/scripts/helm/roles/openreplay/tasks/install-dbs.yaml index e5b0cc3c2..ef178663c 100644 --- a/scripts/helm/roles/openreplay/tasks/install-dbs.yaml +++ b/scripts/helm/roles/openreplay/tasks/install-dbs.yaml @@ -1,5 +1,14 @@ # vim: set ft=yaml.ansible : --- +- name: Installing specific db + shell: | + override='' + [[ -f /tmp/'{{ db_name }}.yaml' ]] && override='-f /tmp/{{ db_name }}.yaml' || true + helm upgrade --install -n db {{ db_name }} -f app/{{ db_name }}.yaml ${override} ./db/{{ db_name }} --create-namespace + args: + executable: /bin/bash + when: db_name|length > 0 + tags: db - name: installing dbs shell: | helm upgrade --install -n db "{{ item }}" "./db/{{ item }}" -f "/tmp/{{ item }}.yaml" --wait --create-namespace &>> "{{ playbook_dir }}"/db_helm.log