Skip to content

Commit

Permalink
move demo and charlie to pg backed
Browse files Browse the repository at this point in the history
  • Loading branch information
orangewolf committed Sep 13, 2023
1 parent 3852e5b commit b023caa
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 55 deletions.
36 changes: 0 additions & 36 deletions hyrax/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -94,42 +94,6 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- printf "%s-%s" .Release.Name "minio" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "hyrax.mariadb.fullname" -}}
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "hyrax.mariadb.host" -}}
{{- if .Values.mariadb.enabled }}
{{- include "hyrax.mariadb.fullname" . }}
{{- else }}
{{- .Values.externalMariadb.db.host }}
{{- end }}
{{- end -}}

{{- define "hyrax.mariadb.database" -}}
{{- if .Values.mariadb.enabled }}
{{- .Values.mariadb.auth.database }}
{{- else }}
{{- .Values.externalMariadb.auth.database | default ( include "hyrax.fullname" . ) }}
{{- end }}
{{- end -}}

{{- define "hyrax.mariadb.username" -}}
{{- if .Values.mariadb.enabled }}
{{- .Values.mariadb.auth.username }}
{{- else }}
{{- .Values.externalMariadb.auth.username | default "mysql" }}
{{- end }}
{{- end -}}

{{- define "hyrax.mariadb.password" -}}
{{- if .Values.mariadb.enabled }}
{{- .Values.mariadb.auth.password }}
{{- else }}
{{- .Values.externalMariadb.auth.password }}
{{- end }}
{{- end -}}

{{- define "hyrax.redis.fullname" -}}
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Expand Down
3 changes: 0 additions & 3 deletions hyrax/templates/configmap-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
data:
DB_HOST: {{ template "hyrax.mariadb.host" . }}
DB_PORT: "3306"
DB_USERNAME: {{ template "hyrax.mariadb.database" . }}
{{- if .Values.memcached.enabled }}
MEMCACHED_HOST: {{ template "hyrax.memcached.fullname" . }}
{{- end }}
Expand Down
4 changes: 0 additions & 4 deletions hyrax/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ metadata:
type: Opaque
data:
SECRET_KEY_BASE: {{ randAlphaNum 20 | b64enc | quote }}
{{- if or .Values.externalMariadb.auth .Values.mariadb.auth }}
MYSQL_PASSWORD: {{ include "hyrax.mariadb.password" . | b64enc }}
{{- end }}
# DATABASE_URL: {{ printf "mariadb://%s:%s@%s/%s?pool=5" ( include "hyrax.mariadb.username" . ) ( include "hyrax.mariadb.password" . ) ( include "hyrax.mariadb.host" . ) ( include "hyrax.mariadb.database" . ) | b64enc }}
{{- if .Values.minio.enabled }}
MINIO_ACCESS_KEY: {{ .Values.minio.accessKey.password | b64enc}}
MINIO_SECRET_KEY: {{ .Values.minio.secretKey.password | b64enc}}
Expand Down
14 changes: 8 additions & 6 deletions ops/charlie-deploy.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ extraEnvVars: &envVars
- name: CONFDIR
value: "/app/samvera/hyrax-webapp/solr/config"
- name: DB_ADAPTER
value: mysql2
- name: MYSQL_HOST
value: ams-demo-rails-db.cmrjt7rckp5r.us-east-1.rds.amazonaws.com
- name: MYSQL_DATABASE
value: hyrax
- name: MYSQL_USER
value: postgresql
- name: DB_HOST
value: 10.0.4.190
- name: DB_NAME
value: hyrax
- name: DB_PORT
value: 5432
- name: DB_USERNAME
value: ams_user
- name: FCREPO_BASE_PATH
value: /prod
- name: FCREPO_HOST
Expand Down
14 changes: 8 additions & 6 deletions ops/demo-deploy.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ extraEnvVars: &envVars
- name: CONFDIR
value: "/app/samvera/hyrax-webapp/solr/config"
- name: DB_ADAPTER
value: mysql2
- name: MYSQL_HOST
value: ams-demo-rails-db.cmrjt7rckp5r.us-east-1.rds.amazonaws.com
- name: MYSQL_DATABASE
value: hyrax
- name: MYSQL_USER
value: postgresql
- name: DB_HOST
value: 10.0.4.190
- name: DB_NAME
value: hyrax
- name: DB_PORT
value: 5432
- name: DB_USERNAME
value: ams_user
- name: FCREPO_BASE_PATH
value: /prod
- name: FCREPO_HOST
Expand Down

0 comments on commit b023caa

Please sign in to comment.