You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/09/25 12:19:20 UTC
[incubator-dlab] 01/01: added guacamole chart
This is an automated email from the ASF dual-hosted git repository.
omartushevskyi pushed a commit to branch DLAB-1028
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 15beb0a5923a16c3b868d95a7c0cccd68d37529d
Author: Oleh Martushevskyi <Ol...@epam.com>
AuthorDate: Wed Sep 25 15:19:09 2019 +0300
added guacamole chart
---
.../dlab-ui-chart/templates/configmap-ui-conf.yaml | 2 +-
.../main/guacamole-chart/.helmignore | 43 ++++++++++++
.../main/guacamole-chart/Chart.yaml | 26 +++++++
.../main/guacamole-chart/templates/NOTES.txt | 42 +++++++++++
.../main/guacamole-chart/templates/_helpers.tpl | 65 +++++++++++++++++
.../main/guacamole-chart/templates/deployment.yaml | 82 ++++++++++++++++++++++
.../main/guacamole-chart/templates/service.yaml | 39 ++++++++++
.../main/guacamole-chart/values.yaml | 43 ++++++++++++
.../aws/ssn-helm-charts/main/guacamole.tf | 39 ++++++++++
.../terraform/aws/ssn-helm-charts/main/mysql.tf | 79 +++++++++++++++++----
.../terraform/aws/ssn-helm-charts/main/secrets.tf | 23 ++++--
.../aws/ssn-helm-charts/main/variables.tf | 12 +++-
12 files changed, 475 insertions(+), 20 deletions(-)
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/configmap-ui-conf.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/configmap-ui-conf.yaml
index efa6f2a..dbf27c0 100644
--- a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/configmap-ui-conf.yaml
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/configmap-ui-conf.yaml
@@ -219,7 +219,7 @@ data:
guacamole:
connectionProtocol: ssh
- serverHost: localhost
+ serverHost: guacamole
serverPort: 4822
port: 22
username: dlab-user
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/.helmignore b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/.helmignore
new file mode 100644
index 0000000..4976779
--- /dev/null
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/.helmignore
@@ -0,0 +1,43 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/Chart.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/Chart.yaml
new file mode 100644
index 0000000..147a90a
--- /dev/null
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/Chart.yaml
@@ -0,0 +1,26 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for Guacamole
+name: guacamole-dlab
+version: 0.1.0
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/NOTES.txt b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/NOTES.txt
new file mode 100644
index 0000000..29995ec
--- /dev/null
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/NOTES.txt
@@ -0,0 +1,42 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+1. Get the application URL by running these commands:
+{{- if .Values.ui.ingress.enabled }}
+{{- range $host := .Values.ui.ingress.hosts }}
+ {{- range .paths }}
+ http{{ if $.Values.ui.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
+ {{- end }}
+{{- end }}
+{{- else if contains "NodePort" .Values.ui.service.type }}
+ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "guacamole.fullname" . }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+ echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.ui.service.type }}
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "guacamole.fullname" . }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "guacamole.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+ echo http://$SERVICE_IP:{{ .Values.ui.service.http_port }}
+{{- else if contains "ClusterIP" .Values.ui.service.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "guacamole.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+ echo "Visit http://127.0.0.1:8080 to use your application"
+ kubectl port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/_helpers.tpl b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/_helpers.tpl
new file mode 100644
index 0000000..d8667c1
--- /dev/null
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/_helpers.tpl
@@ -0,0 +1,65 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "guacamole.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "guacamole.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "guacamole.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "guacamole.labels" -}}
+app.kubernetes.io/name: {{ include "guacamole.name" . }}
+helm.sh/chart: {{ include "guacamole.chart" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/deployment.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/deployment.yaml
new file mode 100644
index 0000000..2c38b70
--- /dev/null
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/deployment.yaml
@@ -0,0 +1,82 @@
+{{- /*
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+*/ -}}
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "guacamole.fullname" . }}
+ labels:
+{{ include "guacamole.labels" . | indent 4 }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ selector:
+ matchLabels:
+ app.kubernetes.io/name: {{ include "guacamole.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/name: {{ include "guacamole.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+ spec:
+ containers:
+ - name: "{{ .Chart.Name }}-guacd"
+ image: "{{ .Values.guacd.image.repository }}:{{ .Values.guacd.image.tag }}"
+ imagePullPolicy: {{ .Values.guacd.image.pullPolicy }}
+ ports:
+ - name: tcp
+ containerPort: 4822
+ protocol: TCP
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ - name: {{ .Chart.Name }}
+ image: "{{ .Values.guacamole.image.repository }}:{{ .Values.guacamole.image.tag }}"
+ imagePullPolicy: {{ .Values.guacamole.image.pullPolicy }}
+ env:
+ - name: MYSQL_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: mysql-guacamole-user-password
+ key: password
+ - name: MYSQL_DATABASE
+ value: {{ .Values.guacamole.mysql.database }}
+ - name: MYSQL_USER
+ value: {{ .Values.guacamole.mysql.user }}
+ ports:
+ - name: tcp
+ containerPort: 8080
+ protocol: TCP
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/service.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/service.yaml
new file mode 100644
index 0000000..ead7df5
--- /dev/null
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/templates/service.yaml
@@ -0,0 +1,39 @@
+{{- /*
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+*/ -}}
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "guacamole.fullname" . }}
+ labels:
+{{ include "guacamole.labels" . | indent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: {{ .Values.service.port }}
+ protocol: TCP
+ name: tcp
+ selector:
+ app.kubernetes.io/name: {{ include "guacamole.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/values.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/values.yaml
new file mode 100644
index 0000000..f8fd2f7
--- /dev/null
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole-chart/values.yaml
@@ -0,0 +1,43 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+# Default values for dlab-ui.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+service:
+ type: ClusterIp
+ port: 4822
+
+guacd:
+ image:
+ repository: guacamole/guacd
+ tag: latest
+ pullPolicy: Always
+
+guacamole:
+ image:
+ repository: guacamole/guacamole
+ tag: latest
+ pullPolicy: Always
+ mysql:
+ database: ${mysql_database}
+ user: ${mysql_user}
\ No newline at end of file
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole.tf b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole.tf
new file mode 100644
index 0000000..c5f70a0
--- /dev/null
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/guacamole.tf
@@ -0,0 +1,39 @@
+# *****************************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# ******************************************************************************
+
+data "template_file" "guacamole-values" {
+ template = file("./guacamole-chart/values.yaml")
+ vars = {
+ mysql_database = var.mysql_guacamole_db_name
+ mysql_user = var.mysql_guacamole_user
+ }
+}
+
+resource "helm_release" "guacamole" {
+ name = "guacamole"
+ chart = "./guacamole-chart"
+ depends_on = [helm_release.guacamole-mysql, kubernetes_secret.mysql_guacamole_user_password_secret]
+ wait = true
+
+ values = [
+ data.template_file.guacamole-values.rendered
+ ]
+}
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/mysql.tf b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/mysql.tf
index 98cb238..82d95c3 100644
--- a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/mysql.tf
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/mysql.tf
@@ -19,14 +19,14 @@
#
# ******************************************************************************
-data "template_file" "mysql_values" {
+data "template_file" "keycloak-mysql-values" {
template = file("./files/mysql_values.yaml")
vars = {
mysql_root_password = random_string.mysql_root_password.result
- mysql_user = var.mysql_user
- mysql_user_password = random_string.mysql_user_password.result
- mysql_db_name = var.mysql_db_name
- mysql_volume_claim = kubernetes_persistent_volume_claim.example.metadata.0.name
+ mysql_user = var.mysql_keycloak_user
+ mysql_user_password = random_string.mysql_keycloak_user_password.result
+ mysql_db_name = var.mysql_keycloak_db_name
+ mysql_volume_claim = kubernetes_persistent_volume_claim.mysql-keycloak-pvc.metadata.0.name
}
}
@@ -35,16 +35,16 @@ resource "helm_release" "keycloak-mysql" {
chart = "stable/mysql"
wait = true
values = [
- data.template_file.mysql_values.rendered
+ data.template_file.keycloak-mysql-values.rendered
]
- depends_on = [kubernetes_secret.mysql_root_password_secret, kubernetes_secret.mysql_user_password_secret]
+ depends_on = [kubernetes_secret.mysql_root_password_secret, kubernetes_secret.mysql_keycloak_user_password_secret]
}
provider "kubernetes" {}
-resource "kubernetes_persistent_volume" "example" {
+resource "kubernetes_persistent_volume" "mysql-keycloak-pv" {
metadata {
- name = "mysql-keycloak-pv2"
+ name = "mysql-keycloak-pv"
}
spec {
capacity = {
@@ -53,15 +53,15 @@ resource "kubernetes_persistent_volume" "example" {
access_modes = ["ReadWriteMany"]
persistent_volume_source {
host_path {
- path = "/home/dlab-user/keycloak-pv2"
+ path = "/home/dlab-user/keycloak-pv"
}
}
}
}
-resource "kubernetes_persistent_volume_claim" "example" {
+resource "kubernetes_persistent_volume_claim" "mysql-keycloak-pvc" {
metadata {
- name = "mysql-keycloak-pvc2"
+ name = "mysql-keycloak-pvc"
}
spec {
access_modes = ["ReadWriteMany"]
@@ -70,7 +70,60 @@ resource "kubernetes_persistent_volume_claim" "example" {
storage = "5Gi"
}
}
- volume_name = kubernetes_persistent_volume.example.metadata.0.name
+ volume_name = kubernetes_persistent_volume.mysql-keycloak-pv.metadata.0.name
+ }
+}
+
+data "template_file" "guacamole-mysql-values" {
+ template = file("./files/mysql_values.yaml")
+ vars = {
+ mysql_root_password = random_string.mysql_root_password.result
+ mysql_user = var.mysql_guacamole_user
+ mysql_user_password = random_string.mysql_guacamole_user_password.result
+ mysql_db_name = var.mysql_guacamole_db_name
+ mysql_volume_claim = kubernetes_persistent_volume_claim.mysql-guacamole-pvc.metadata.0.name
+ }
+}
+
+resource "helm_release" "guacamole-mysql" {
+ name = "guacamole-mysql"
+ chart = "stable/mysql"
+ wait = true
+ values = [
+ data.template_file.guacamole-mysql-values.rendered
+ ]
+ depends_on = [kubernetes_secret.mysql_root_password_secret, kubernetes_secret.mysql_guacamole_user_password_secret]
+}
+
+resource "kubernetes_persistent_volume" "mysql-guacamole-pv" {
+ metadata {
+ name = "mysql-guacamole-pv"
+ }
+ spec {
+ capacity = {
+ storage = "8Gi"
+ }
+ access_modes = ["ReadWriteMany"]
+ persistent_volume_source {
+ host_path {
+ path = "/home/dlab-user/guacamole-pv"
+ }
+ }
+ }
+}
+
+resource "kubernetes_persistent_volume_claim" "mysql-guacamole-pvc" {
+ metadata {
+ name = "mysql-guacamole-pvc"
+ }
+ spec {
+ access_modes = ["ReadWriteMany"]
+ resources {
+ requests = {
+ storage = "5Gi"
+ }
+ }
+ volume_name = kubernetes_persistent_volume.mysql-guacamole-pv.metadata.0.name
}
}
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/secrets.tf b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/secrets.tf
index 03b6cc7..98ba426 100644
--- a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/secrets.tf
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/secrets.tf
@@ -92,18 +92,33 @@ resource "kubernetes_secret" "mysql_root_password_secret" {
}
}
-resource "random_string" "mysql_user_password" {
+resource "random_string" "mysql_keycloak_user_password" {
length = 16
special = false
}
-resource "kubernetes_secret" "mysql_user_password_secret" {
+resource "kubernetes_secret" "mysql_keycloak_user_password_secret" {
metadata {
- name = "mysql-user-password"
+ name = "mysql-keycloak-user-password"
}
data = {
- password = random_string.mysql_user_password.result
+ password = random_string.mysql_keycloak_user_password.result
+ }
+}
+
+resource "random_string" "mysql_guacamole_user_password" {
+ length = 16
+ special = false
+}
+
+resource "kubernetes_secret" "mysql_guacamole_user_password_secret" {
+ metadata {
+ name = "mysql-guacamole-user-password"
+ }
+
+ data = {
+ password = random_string.mysql_guacamole_user_password.result
}
}
diff --git a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/variables.tf b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/variables.tf
index 040b126..ef15720 100644
--- a/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/variables.tf
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/variables.tf
@@ -27,14 +27,22 @@ variable "keycloak_user" {
default = "dlab-admin"
}
-variable "mysql_user" {
+variable "mysql_keycloak_user" {
default = "keycloak"
}
-variable "mysql_db_name" {
+variable "mysql_keycloak_db_name" {
default = "keycloak"
}
+variable "mysql_guacamole_user" {
+ default = "guacamole"
+}
+
+variable "mysql_guacamole_db_name" {
+ default = "guacamole"
+}
+
variable "ldap_usernameAttr" {
default = "uid"
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org