feat(install): install specific dbs (#75)
This commit is contained in:
parent
2f78bd7a21
commit
878fb6cc45
3 changed files with 18 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue