Skip to content

Commit

Permalink
fix: metabase upgrade (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
thegentlemanphysicist authored Sep 21, 2023
1 parent a03ccad commit 3a6ebb7
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 8 deletions.
4 changes: 2 additions & 2 deletions helm/metabase/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.1.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
appVersion: "1.16.1"
14 changes: 13 additions & 1 deletion helm/metabase/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Metabase config docs

## Upgrading the image

The deployed metabase image is stored in the [sso-keycloak](https://github.com/orgs/bcgov/packages?repo_name=sso-keycloak).

Updating this image is done as follows:
1) Pulling down the metabase image from dockerhub to the developers local machine.
2) Retagging the image `docker tag metabase/metabase ghcr.io/bcgov/sso-keycloak/metabase:<TAG NAME>`
3) Pushing the image up to the ghcr: `docker push ghcr.io/bcgov/sso-keycloak/metabase:<TAG NAME>`
4) Updating the tag in the helm values files.
5) Run `make upgrade NAMESPACE=<<tools namespace>>`
6) Running this command will change the database creds which means the database pod must be scaled down to zero and back to one. The same must be done with the metabase pod for the new credentials to take effect.

## Installing metabase

### Confirm network policies
Expand Down Expand Up @@ -51,7 +63,7 @@ and

`make upgrade NAMESPACE=eb75ad-tools`

This will install and upgrade metabase in the Gold Production Tools namespace. The sandbox namespace is `c6af30-tools`. Note this helm chart has not been used to deploy the Silver cluster metabase instance.
This will install and upgrade metabase in the Gold Production Tools namespace. The sandbox namespace is `c6af30-tools`. Note this helm chart has not been used to deploy the Silver cluster metabase instance. Note running the upgrade command generates new db creds and the pods (both db and metabase must be cycled)

## Adding a databse to metabase:

Expand Down
2 changes: 1 addition & 1 deletion helm/metabase/templates/deploymentconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ spec:
terminationMessagePath: /dev/termination-log
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: artifactory-creds
- name: {{ .Values.imagePullSecrets }}
restartPolicy: Always
serviceAccount: {{ .Values.metabaseServiceName }}
serviceAccountName: {{ .Values.metabaseServiceName }}
Expand Down
3 changes: 2 additions & 1 deletion helm/metabase/values-c6af30-tools.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
namespace: c6af30-tools

image:
repository: gcr.io/ggl-cas-storage/metabase
repository: ghcr.io/bcgov/sso-keycloak/metabase
tag: v0.47.1
3 changes: 2 additions & 1 deletion helm/metabase/values-e4ca1d-tools.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
namespace: e4ca1d-tools

image:
repository: gcr.io/ggl-cas-storage/metabase
repository: ghcr.io/bcgov/sso-keycloak/metabase
tag: v0.47.1
3 changes: 2 additions & 1 deletion helm/metabase/values-eb75ad-tools.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
namespace: eb75ad-tools

image:
repository: gcr.io/ggl-cas-storage/metabase
repository: ghcr.io/bcgov/sso-keycloak/metabase
tag: v0.47.1
2 changes: 1 addition & 1 deletion helm/metabase/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ingress:

## These are the values that were needed by the Metabase helm templates generated by template2helm
## Note The ones above are created by the `healm create metabase`.

imagePullSecrets: artifactory-creds
metabaseServiceName: metabase

image:
Expand Down

0 comments on commit 3a6ebb7

Please sign in to comment.