From 49adb4dc4da67a85f35f67bf689e8830c947f8fd Mon Sep 17 00:00:00 2001 From: Gutium Alexei Date: Mon, 19 Aug 2024 16:48:25 +0300 Subject: [PATCH 1/2] FIx fusion auth stack --- stacks/fusionauth/deploy.sh | 15 +++++++++------ stacks/fusionauth/search-values.yaml | 13 ++++++++++++- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/stacks/fusionauth/deploy.sh b/stacks/fusionauth/deploy.sh index d30b32fd..9f703427 100755 --- a/stacks/fusionauth/deploy.sh +++ b/stacks/fusionauth/deploy.sh @@ -12,12 +12,11 @@ set -e ################################################################################ STACK="fusionauth" CHART="fusionauth/fusionauth" -CHART_VERSION="0.12.1" +CHART_VERSION="1.0.8" NAMESPACE="fusionauth" - -DB_POSTGRES_USER_PASSWORD=`cat /dev/urandom | tr -dc '[:alnum:]' | head -c 42` -DB_FUSIONAUTH_USER_PASSWORD=`cat /dev/urandom | tr -dc '[:alnum:]' | head -c 42` +DB_POSTGRES_USER_PASSWORD=`LC_CTYPE=C LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c 42` +DB_FUSIONAUTH_USER_PASSWORD=`LC_CTYPE=C LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c 42` if [ -z "${MP_KUBERNETES}" ]; then # use local version of values.yml @@ -30,16 +29,19 @@ else SEARCH_VALUES="https://raw.githubusercontent.com/digitalocean/marketplace-kubernetes/master/stacks/fusionauth/search-values.yaml" fi + +echo 1 # Add repos and update helm repo add stable https://charts.helm.sh/stable helm repo add bitnami https://charts.bitnami.com/bitnami helm repo add fusionauth https://fusionauth.github.io/charts helm repo update > /dev/null - +echo 2 # Install PostgresSQL and Elasticsearch helm install --atomic db bitnami/postgresql --create-namespace --namespace "$NAMESPACE" --set auth.enablePostgresUser=true --set auth.postgresPassword="$DB_POSTGRES_USER_PASSWORD" --set image.tag=14.9.0-debian-11-r2 +echo 3 helm install --atomic search bitnami/elasticsearch --namespace "$NAMESPACE" -f "$SEARCH_VALUES" - +echo 4 helm upgrade "$STACK" "$CHART" \ --atomic \ @@ -50,3 +52,4 @@ helm upgrade "$STACK" "$CHART" \ --version "$CHART_VERSION" \ --set database.password="$DB_FUSIONAUTH_USER_PASSWORD" \ --set database.root.password="$DB_POSTGRES_USER_PASSWORD" +echo 5 \ No newline at end of file diff --git a/stacks/fusionauth/search-values.yaml b/stacks/fusionauth/search-values.yaml index 8698a759..9d0a6ed5 100644 --- a/stacks/fusionauth/search-values.yaml +++ b/stacks/fusionauth/search-values.yaml @@ -24,7 +24,18 @@ volumeClaimTemplate: master: replicaCount: 3 - extraRoles: "master,data,data_content,data_hot,data_warm,data_cold,data_frozen,ingest,ml,remote_cluster_client,transform" + extraRoles: + - "master" + - "data" + - "data_content" + - "data_hot" + - "data_warm" + - "data_cold" + - "data_frozen" + - "ingest" + - "ml" + - "remote_cluster_client" + - "transform" ingest: replicaCount: 0 coordinating: From f53998583ee884bed984d16d74a1521f5be88fd4 Mon Sep 17 00:00:00 2001 From: Gutium Alexei Date: Mon, 19 Aug 2024 16:55:40 +0300 Subject: [PATCH 2/2] remove debug logs --- stacks/fusionauth/deploy.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/stacks/fusionauth/deploy.sh b/stacks/fusionauth/deploy.sh index 9f703427..df0b1d43 100755 --- a/stacks/fusionauth/deploy.sh +++ b/stacks/fusionauth/deploy.sh @@ -29,19 +29,14 @@ else SEARCH_VALUES="https://raw.githubusercontent.com/digitalocean/marketplace-kubernetes/master/stacks/fusionauth/search-values.yaml" fi - -echo 1 # Add repos and update helm repo add stable https://charts.helm.sh/stable helm repo add bitnami https://charts.bitnami.com/bitnami helm repo add fusionauth https://fusionauth.github.io/charts helm repo update > /dev/null -echo 2 # Install PostgresSQL and Elasticsearch helm install --atomic db bitnami/postgresql --create-namespace --namespace "$NAMESPACE" --set auth.enablePostgresUser=true --set auth.postgresPassword="$DB_POSTGRES_USER_PASSWORD" --set image.tag=14.9.0-debian-11-r2 -echo 3 helm install --atomic search bitnami/elasticsearch --namespace "$NAMESPACE" -f "$SEARCH_VALUES" -echo 4 helm upgrade "$STACK" "$CHART" \ --atomic \ @@ -52,4 +47,3 @@ helm upgrade "$STACK" "$CHART" \ --version "$CHART_VERSION" \ --set database.password="$DB_FUSIONAUTH_USER_PASSWORD" \ --set database.root.password="$DB_POSTGRES_USER_PASSWORD" -echo 5 \ No newline at end of file