Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying out CMAN. #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ spec:
value: 0.0.0.0
- name: MB_PASSWORD_COMPLEXITY
value: strong
envFrom:
- configMapRef:
name: {{ .Release.Name }}-{{ .Values.global.zone }}
ports:
- name: http
containerPort: {{ .Values.service.targetPort }}
Expand Down
1 change: 1 addition & 0 deletions charts/nr-metabase/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ metabase:
tag: 'v0.47.2'
containerPort: 3000
environment: production

service:
type: ClusterIP
port: 80
Expand Down
2 changes: 1 addition & 1 deletion metabase/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM docker.io/openjdk:21-jdk-slim-bullseye
WORKDIR /app
COPY ojdbc8-full /app/plugins/
ARG METABASE_VERSION
ARG METABASE_VERSION=v0.47.2
ENV METABASE_VER=$METABASE_VERSION
ENV FC_LANG=en-US \
LC_CTYPE=en_US.UTF-8
Expand Down
21 changes: 3 additions & 18 deletions metabase/run_app.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
#!/bin/bash
DB_HOST_PORT_LIST=nrcdb01.bcgov:1543,nrcdb03.bcgov:1543,nrkdb01.bcgov:1543,nrkdb03.bcgov:1543
echo "Adding certs"
IFS=','
read -ra DB_HOST_PORT_ARRAY <<< "${DB_HOST_PORT_LIST}"
for DB_HOST_PORT in "${DB_HOST_PORT_ARRAY[@]}"; do
IFS=':'
read -ra strarr <<<"${DB_HOST_PORT}"
DB_HOST="${strarr[0]}"
echo "DB_HOST is $DB_HOST"
DB_PORT="${strarr[1]}"
echo "DB_PORT is $DB_PORT"
echo "I will try to get the ${DB_HOST}-1 cert"
echo "Connecting to ${DB_HOST}:${DB_PORT}"
java InstallCert --quiet "${DB_HOST}:${DB_PORT}"
keytool -exportcert -alias "$DB_HOST-1" -keystore jssecacerts -storepass changeit -file /opt/"$DB_HOST-1.cer"
keytool -importcert -alias "orakey-$DB_HOST-1" -noprompt -keystore "${JAVA_HOME}"/lib/security/cacerts -storepass changeit -file /opt/"$DB_HOST-1.cer"
done

echo "$CMAN_CERT"
echo "$CMAN_CERT" >> /opt/cman.crt
keytool -import -alias "cman-certs" -keystore "${JAVA_HOME}"/lib/security/cacerts -file /opt/cman.crt -storepass changeit -noprompt || exit 1
echo "Starting Metabase"
java -jar metabase.jar