|
| 1 | +# Contribution guide |
| 2 | + |
| 3 | +## Update chart dependencies |
| 4 | + |
| 5 | +1. Add Bitnami chart repository: |
| 6 | + |
| 7 | + ```bash |
| 8 | + helm repo add bitnami https://charts.bitnami.com/bitnami |
| 9 | + helm repo update |
| 10 | + ``` |
| 11 | + |
| 12 | +2. Search for the latest version: |
| 13 | + |
| 14 | + ```bash |
| 15 | + helm search repo -l bitnami/mongodb --versions |
| 16 | + ``` |
| 17 | + |
| 18 | +3. Edit manually `Chart.yaml` with the new version |
| 19 | + |
| 20 | +4. Update `Chart.lock`: |
| 21 | + |
| 22 | + ```bash |
| 23 | + helm dependency update |
| 24 | + ``` |
| 25 | + |
| 26 | +## Validate on a test cluster |
| 27 | + |
| 28 | +Create the namespace and secrets: |
| 29 | + |
| 30 | +```bash |
| 31 | +kubectl create ns demo |
| 32 | +kubectl create secret generic keeptrack-mongodb \ |
| 33 | + --from-literal=mongodb-root-password='admin' \ |
| 34 | + --namespace demo |
| 35 | +kubectl create secret generic keeptrack-app \ |
| 36 | + --from-literal=connectionstring='mongodb://root:admin@keeptrack-mongodb:27017/keeptrack?authSource=admin' \ |
| 37 | + --from-literal=firebaseapikey='***' \ |
| 38 | + --from-literal=firebaseauthdomain='***' \ |
| 39 | + --from-literal=firebaseprojectid='***' \ |
| 40 | + --from-literal=firebaseauthority='***' \ |
| 41 | + --from-file=firebaseserviceaccount=./firebase-service-account.json \ |
| 42 | + --namespace demo |
| 43 | +``` |
| 44 | + |
| 45 | +Create a `values.mine.yaml` file: |
| 46 | + |
| 47 | +```yaml |
| 48 | +blazorapp: |
| 49 | + host: keeptrack.console.$SANDBOX_ID.instruqt.io |
| 50 | +
|
| 51 | +webapi: |
| 52 | + db: |
| 53 | + connectionStringSecretKeyRef: |
| 54 | + name: keeptrack-app |
| 55 | + key: connectionstring |
| 56 | +
|
| 57 | +firebase: |
| 58 | + auth: |
| 59 | + authoritySecretKeyRef: |
| 60 | + name: keeptrack-app |
| 61 | + key: firebaseauthority |
| 62 | + webApp: |
| 63 | + apiKeySecretKeyRef: |
| 64 | + name: keeptrack-app |
| 65 | + key: firebaseapikey |
| 66 | + authDomainSecretKeyRef: |
| 67 | + name: keeptrack-app |
| 68 | + key: firebaseauthdomain |
| 69 | + projectIdSecretKeyRef: |
| 70 | + name: keeptrack-app |
| 71 | + key: firebaseprojectid |
| 72 | + serviceAccountSecretKeyRef: |
| 73 | + name: keeptrack-app |
| 74 | + key: firebaseserviceaccount |
| 75 | +
|
| 76 | +ingress: |
| 77 | + enabled: true |
| 78 | + className: traefik |
| 79 | + annotations: |
| 80 | + cert-manager.io/cluster-issuer: letsencrypt-prod |
| 81 | +
|
| 82 | +mongodb: |
| 83 | + enabled: true |
| 84 | + auth: |
| 85 | + existingSecret: keeptrack-mongodb |
| 86 | +``` |
| 87 | + |
| 88 | +Review the manifest: |
| 89 | + |
| 90 | +```bash |
| 91 | +helm template keeptrack . -f values.yaml -f values.mine.yaml --namespace demo --debug > temp.yaml |
| 92 | +``` |
| 93 | + |
| 94 | +Install or update the application: |
| 95 | + |
| 96 | +```bash |
| 97 | +helm upgrade --install keeptrack . -f values.yaml -f values.mine.yaml --namespace demo --create-namespace |
| 98 | +``` |
| 99 | + |
| 100 | +Check everything is ok: |
| 101 | + |
| 102 | +```bash |
| 103 | +kubectl get all -n demo |
| 104 | +``` |
| 105 | + |
| 106 | +Add `keeptrack.console.$SANDBOX_ID.instruqt.io` in the authorized domains in Firebase > (myproject) > Authentication > Settings. |
| 107 | + |
| 108 | +Open the web application in a browser. |
| 109 | + |
| 110 | +At the end, clean everything: |
| 111 | + |
| 112 | +```bash |
| 113 | +helm delete keeptrack -n demo |
| 114 | +kubectl delete ns demo |
| 115 | +``` |
0 commit comments