Commit 1a891558 authored by Laurent Flori's avatar Laurent Flori
Browse files

Merge branch '187-add-possibility-to-not-install-keycloak-or-laboite' into 'dev'

Resolve "Add possibility to not install keycloak or laboite"

Closes #187

See merge request EOLE/eole-3/tools!171
parents 5f6d799a 722a9324
......@@ -49,12 +49,14 @@ helm install -n {{ config['general']['ingressNamespace'] }} ingress-nginx ingres
kubectl wait --namespace {{ config['general']['ingressNamespace'] }} --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=600s
{%- endif %}
{% if config['keycloak']['enabled'] == "true" -%}
#keycloak
{%- if config['keycloak']['realmImport'] == "true" %}
kubectl create secret -n {{ config['general']['namespace'] }} generic realm-secret --from-file=realm-export.json
{%- endif %}
helm install -n {{ config['general']['namespace'] }} keycloak codecentric/keycloak -f keycloak-values.yaml --version "{{ config['keycloak']['chart-version'] }}"
{% endif -%}
{% if config['mongodb']['deploy'] == "true" -%}
#mongo
helm install -n {{ config['general']['namespace'] }} mongo-laboite bitnami/mongodb -f mongo-values.yaml --version "{{ config['mongodb']['chart-version'] }}"
......@@ -65,13 +67,18 @@ helm install -n {{ config['general']['namespace'] }} mongo-laboite bitnami/mongo
helm install -n {{ config['general']['namespace'] }} minio minio/minio -f minio-values.yaml --version "{{ config['minio']['chart-version'] }}"
{% endif -%}
{% if config['keycloak']['enabled'] == "true" -%}
#Wait for keycloak to be up
kubectl -n {{ config['general']['namespace'] }} wait --for=condition=Ready --timeout=600s pod -l app.kubernetes.io/name=keycloak
#Manage keycloak realm
bash init-keycloak
{% endif -%}
{% if config['laboite']['enabled'] == "true" -%}
#laboite
keycloak_pubkey=$(wget https://{{ config['keycloak']['hostname'] }}.{{ config['general']['domain'] }}/auth/realms/{{ config['keycloak']['realm'] }} -O -| jq .public_key -r)
sed -i "s|KEYCLOAK_PUBKEY|$keycloak_pubkey|" laboite-values.yaml
helm install laboite eole/laboite -n {{ config['general']['namespace'] }} -f laboite-values.yaml --version "{{ config['laboite']['chart-version'] }}"
{% endif -%}
......@@ -2,9 +2,11 @@
helm repo update
{% if config['keycloak']['enabled'] == "true" -%}
#keycloak
helm upgrade -i -n {{ config['general']['namespace'] }} keycloak codecentric/keycloak -f keycloak-values.yaml --version "{{ config['keycloak']['chart-version'] }}"
{% endif -%}
{% if config['mongodb']['deploy'] == "true" -%}
#mongo
helm upgrade -i -n {{ config['general']['namespace'] }} mongo-laboite bitnami/mongodb -f mongo-values.yaml --set auth.rootPassword='{{ config["mongodb"]["mongoRootPassword"] }}' --version "{{ config['mongodb']['chart-version'] }}"
......@@ -15,13 +17,17 @@ helm upgrade -i -n {{ config['general']['namespace'] }} mongo-laboite bitnami/mo
helm upgrade -i -n {{ config['general']['namespace'] }} minio minio/minio -f minio-values.yaml --version "{{ config['minio']['chart-version'] }}"
{% endif -%}
{% if config['keycloak']['enabled'] == "true" -%}
#Wait for keycloak to be up
kubectl -n {{ config['general']['namespace'] }} wait --for=condition=Ready --timeout=600s pod -l app.kubernetes.io/name=keycloak
{% endif -%}
{% if config['laboite']['enabled'] == "true" -%}
#laboite
keycloak_pubkey=$(wget https://{{ config['keycloak']['hostname'] }}.{{ config['general']['domain'] }}/auth/realms/{{ config['keycloak']['realm'] }} -O -| jq .public_key -r)
sed -i "s|KEYCLOAK_PUBKEY|$keycloak_pubkey|" laboite-values.yaml
helm upgrade -i laboite eole/laboite -n {{ config['general']['namespace'] }} -f laboite-values.yaml --version "{{ config['laboite']['chart-version'] }}"
{% endif -%}
kubectl -n {{ config['general']['namespace'] }} rollout restart deploy
......@@ -25,6 +25,7 @@ dns=192.168.0.1
[laboite]
#Section about laboite application
enabled=true
#General domain will be appended to this hostname
hostname=portail
#Meteor_settings.json parameters for laboite
......@@ -37,6 +38,7 @@ whiteDomains="^ac-[a-z-]*\\.fr"
#tag=5.0.1
[keycloak]
enabled=true
#General domain will domain will be appended to this hostname
hostname=auth
#Keycloak realm name for laboite
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment