From 69bdf212dca1385d52821581786a0b722b550c1d Mon Sep 17 00:00:00 2001 From: Niko Kurtti Date: Fri, 13 Sep 2024 18:30:03 +0300 Subject: [PATCH] get everything running atleast --- kubernetes/dependencies/templates/minio.yaml | 1 + .../templates/auth-deployment.yaml | 4 ++++ .../templates/client-deployment.yaml | 4 ++++ .../templates/config-deployment.yaml | 4 ++-- .../templates/countryconfig-deployment.yaml | 4 ++-- .../templates/dashboards-deployment.yaml | 1 + .../templates/documents-deployment.yaml | 2 +- .../templates/gateway-deployment.yaml | 4 ++-- .../templates/metrics-deployment.yaml | 13 ++++++------- .../opencrvs-services/templates/migration-job.yaml | 10 +++++----- .../templates/scheduler-deployment.yaml | 2 +- .../templates/search-deployment.yaml | 6 +++--- .../templates/user-mgnt-deployment.yaml | 6 +++--- .../templates/webhooks-deployment.yaml | 4 ++-- .../templates/workflow-deployment.yaml | 4 ++-- packages/client/nginx/nginx-default.conf | 4 ++++ packages/dashboards/Dockerfile | 13 ++++++------- packages/gateway/Dockerfile | 3 --- 18 files changed, 49 insertions(+), 40 deletions(-) diff --git a/kubernetes/dependencies/templates/minio.yaml b/kubernetes/dependencies/templates/minio.yaml index 07da0c856c6..87dcd88e89a 100644 --- a/kubernetes/dependencies/templates/minio.yaml +++ b/kubernetes/dependencies/templates/minio.yaml @@ -18,6 +18,7 @@ metadata: app: minio name: minio spec: + clusterIP: None ports: - name: '3535' port: 3535 diff --git a/kubernetes/opencrvs-services/templates/auth-deployment.yaml b/kubernetes/opencrvs-services/templates/auth-deployment.yaml index f5ae390a6ef..43884fd3f60 100644 --- a/kubernetes/opencrvs-services/templates/auth-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/auth-deployment.yaml @@ -61,6 +61,10 @@ spec: - mountPath: /secrets/private-key.pem name: private-key subPath: private-key.pem + readinessProbe: + httpGet: + path: /ping + port: 4040 restartPolicy: Always volumes: - configMap: diff --git a/kubernetes/opencrvs-services/templates/client-deployment.yaml b/kubernetes/opencrvs-services/templates/client-deployment.yaml index d9625078841..6ca825d75bd 100644 --- a/kubernetes/opencrvs-services/templates/client-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/client-deployment.yaml @@ -33,4 +33,8 @@ spec: ports: - containerPort: 80 protocol: TCP + readinessProbe: + httpGet: + path: /ping + port: 80 restartPolicy: Always diff --git a/kubernetes/opencrvs-services/templates/config-deployment.yaml b/kubernetes/opencrvs-services/templates/config-deployment.yaml index ea561ff7d79..e3e23726cf8 100644 --- a/kubernetes/opencrvs-services/templates/config-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/config-deployment.yaml @@ -40,7 +40,7 @@ spec: - name: DOCUMENTS_URL value: http://documents.opencrvs-services-dev.svc.cluster.local:9050 # FIXME: harcoded - name: FHIR_URL - value: http://hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded + value: http://hearth-1.hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded - name: GATEWAY_URL value: http://gateway.opencrvs-services-dev.svc.cluster.local:7070/ # FIXME: harcoded - name: HOST @@ -48,7 +48,7 @@ spec: - name: METRICS_URL value: http://metrics.opencrvs-services-dev.svc.cluster.local:1050 # FIXME: harcoded - name: MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/application-config # FIXME: harcoded + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/application-config # FIXME: harcoded - name: PORT value: "2021" - name: SEARCH_URL diff --git a/kubernetes/opencrvs-services/templates/countryconfig-deployment.yaml b/kubernetes/opencrvs-services/templates/countryconfig-deployment.yaml index 02f0044d26c..323549cfe82 100644 --- a/kubernetes/opencrvs-services/templates/countryconfig-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/countryconfig-deployment.yaml @@ -40,9 +40,9 @@ spec: - name: CONFIRM_REGISTRATION_URL value: http://workflow:5050/confirm/registration - name: FHIR_URL - value: http://hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded + value: http://hearth-1.hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded - name: MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/user-mgnt + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/user-mgnt - name: NODE_ENV value: development ports: diff --git a/kubernetes/opencrvs-services/templates/dashboards-deployment.yaml b/kubernetes/opencrvs-services/templates/dashboards-deployment.yaml index 62ac11a7e52..4e1ab6360ec 100644 --- a/kubernetes/opencrvs-services/templates/dashboards-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/dashboards-deployment.yaml @@ -17,4 +17,5 @@ spec: containers: - name: dashboards image: "opencrvs/ocrvs-dashboards:{{ .Values.image.tag }}" + command: ["/bin/sh", "/run-dev.sh"] # FIXME: make generic and provide run-dev.sh as args, not overwriting entrypoint restartPolicy: Always diff --git a/kubernetes/opencrvs-services/templates/documents-deployment.yaml b/kubernetes/opencrvs-services/templates/documents-deployment.yaml index ec23c3c7f77..83898d945a2 100644 --- a/kubernetes/opencrvs-services/templates/documents-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/documents-deployment.yaml @@ -24,7 +24,7 @@ spec: - name: CERT_PUBLIC_KEY_PATH value: /secrets/public-key.pem - name: MINIO_HOST - value: "minio.opencrvs-deps-dev.svc.cluster.local" + value: "minio-0.minio.opencrvs-deps-dev.svc.cluster.local" - name: MINIO_PORT value: "3535" image: "opencrvs/ocrvs-documents:{{ .Values.image.tag }}" diff --git a/kubernetes/opencrvs-services/templates/gateway-deployment.yaml b/kubernetes/opencrvs-services/templates/gateway-deployment.yaml index 3460e2f6925..094262c02c1 100644 --- a/kubernetes/opencrvs-services/templates/gateway-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/gateway-deployment.yaml @@ -32,7 +32,7 @@ spec: image: "opencrvs/ocrvs-gateway:{{ .Values.image.tag }}" env: - name: APPLICATION_CONFIG_URL - value: http://config:2021/ + value: http://config.opencrvs-services-dev.svc.cluster.local:2021 # FIXME: harcoded/ - name: AUTH_URL value: http://auth.opencrvs-services-dev.svc.cluster.local:4040 # FIXME: harcoded - name: CERT_PUBLIC_KEY_PATH @@ -48,7 +48,7 @@ spec: - name: DOCUMENTS_URL value: http://documents.opencrvs-services-dev.svc.cluster.local:9050 # FIXME: harcoded - name: FHIR_URL - value: http://hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded + value: http://hearth-1.hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded - name: METRICS_URL value: http://metrics.opencrvs-services-dev.svc.cluster.local:1050 # FIXME: harcoded - name: MINIO_BUCKET diff --git a/kubernetes/opencrvs-services/templates/metrics-deployment.yaml b/kubernetes/opencrvs-services/templates/metrics-deployment.yaml index db27cae89b8..bc3b4e9a808 100644 --- a/kubernetes/opencrvs-services/templates/metrics-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/metrics-deployment.yaml @@ -34,17 +34,17 @@ spec: - name: CERT_PUBLIC_KEY_PATH value: /secrets/public-key.pem - name: CONFIG_API_URL - value: http://config:2021 + value: http://config.opencrvs-services-dev.svc.cluster.local:2021 # FIXME: harcoded - name: COUNTRY_CONFIG_URL value: http://countryconfig.opencrvs-services-dev.svc.cluster.local:3040 # FIXME: harcoded/ - name: DASHBOARD_MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/performance + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/performance - name: DOCUMENTS_URL value: http://documents.opencrvs-services-dev.svc.cluster.local:9050 # FIXME: harcoded - name: FHIR_URL - value: http://hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded + value: http://hearth-1.hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded - name: HEARTH_MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/hearth-dev + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/hearth-dev - name: INFLUX_DB value: ocrvs - name: INFLUX_HOST @@ -52,12 +52,11 @@ spec: - name: INFLUX_PORT value: "8086" - name: MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/metrics + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/metrics - name: SEARCH_URL value: http://search.opencrvs-deps-dev.svc.cluster.local:9090/ # FIXME: harcoded - name: USER_MANAGEMENT_URL - value: http://user-mgnt:3030 - + value: http://user-mgnt.opencrvs-services-dev.svc.cluster.local:3030 # FIXME: harcoded ports: - containerPort: 1050 protocol: TCP diff --git a/kubernetes/opencrvs-services/templates/migration-job.yaml b/kubernetes/opencrvs-services/templates/migration-job.yaml index 0765b571387..17f15f20111 100644 --- a/kubernetes/opencrvs-services/templates/migration-job.yaml +++ b/kubernetes/opencrvs-services/templates/migration-job.yaml @@ -17,13 +17,13 @@ spec: image: "opencrvs/ocrvs-migration:{{ .Values.image.tag }}" env: - name: APPLICATION_CONFIG_MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/application-config + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/application-config - name: DASHBOARD_MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/performance + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/performance - name: ES_HOST value: elasticsearch:9200 - name: HEARTH_MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/hearth-dev + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/hearth-dev - name: INFLUX_DB value: ocrvs - name: INFLUX_HOST @@ -31,9 +31,9 @@ spec: - name: INFLUX_PORT value: "8086" - name: OPENHIM_MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/openhim-dev + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/openhim-dev - name: USER_MGNT_MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/user-mgnt + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/user-mgnt - name: WAIT_HOSTS value: mongo1:27017,influxdb:8086,minio:9000,elasticsearch:9200 completions: 1 # Run the job once diff --git a/kubernetes/opencrvs-services/templates/scheduler-deployment.yaml b/kubernetes/opencrvs-services/templates/scheduler-deployment.yaml index 901dee13816..c62fc11cf80 100644 --- a/kubernetes/opencrvs-services/templates/scheduler-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/scheduler-deployment.yaml @@ -24,5 +24,5 @@ spec: - name: NODE_ENV value: development - name: OPENHIM_MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/openhim-dev + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/openhim-dev restartPolicy: Always diff --git a/kubernetes/opencrvs-services/templates/search-deployment.yaml b/kubernetes/opencrvs-services/templates/search-deployment.yaml index e842a072b02..5e43debb0fa 100644 --- a/kubernetes/opencrvs-services/templates/search-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/search-deployment.yaml @@ -32,15 +32,15 @@ spec: image: "opencrvs/ocrvs-search:{{ .Values.image.tag }}" env: - name: APPLICATION_CONFIG_URL - value: http://config:2021/ + value: http://config.opencrvs-services-dev.svc.cluster.local:2021 # FIXME: harcoded/ - name: CERT_PUBLIC_KEY_PATH value: /secrets/public-key.pem - name: ES_HOST value: elasticsearch:9200 - name: FHIR_URL - value: http://hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded + value: http://hearth-1.hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded - name: HEARTH_MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/hearth-dev + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/hearth-dev - name: NODE_ENV value: development - name: USER_MANAGEMENT_URL diff --git a/kubernetes/opencrvs-services/templates/user-mgnt-deployment.yaml b/kubernetes/opencrvs-services/templates/user-mgnt-deployment.yaml index 3e4e8cce4a5..bdc812f8ce0 100644 --- a/kubernetes/opencrvs-services/templates/user-mgnt-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/user-mgnt-deployment.yaml @@ -32,17 +32,17 @@ spec: image: "opencrvs/ocrvs-user-mgnt:{{ .Values.image.tag }}" env: - name: APPLICATION_CONFIG_URL - value: http://config:2021/ + value: http://config.opencrvs-services-dev.svc.cluster.local:2021 # FIXME: harcoded/ - name: CERT_PUBLIC_KEY_PATH value: /secrets/public-key.pem - name: FHIR_URL - value: http://hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded + value: http://hearth-1.hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded - name: HOST value: 0.0.0.0 - name: METRICS_URL value: http://metrics.opencrvs-services-dev.svc.cluster.local:1050 # FIXME: harcoded - name: MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/user-mgnt + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/user-mgnt - name: NOTIFICATION_SERVICE_URL value: http://notification:2020/ ports: diff --git a/kubernetes/opencrvs-services/templates/webhooks-deployment.yaml b/kubernetes/opencrvs-services/templates/webhooks-deployment.yaml index 566ad734435..2c8baa0912d 100644 --- a/kubernetes/opencrvs-services/templates/webhooks-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/webhooks-deployment.yaml @@ -38,11 +38,11 @@ spec: - name: CHECK_INVALID_TOKEN value: "true" - name: FHIR_URL - value: http://hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded + value: http://hearth-1.hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded - name: HOST value: 0.0.0.0 - name: MONGO_URL - value: mongodb://mongodb.opencrvs-deps-dev.svc.cluster.local/webhooks + value: mongodb://mongodb-1.mongodb.opencrvs-deps-dev.svc.cluster.local/webhooks - name: REDIS_HOST value: redis.opencrvs-deps-dev.svc.cluster.local # FIXME: harcoded - name: USER_MANAGEMENT_URL diff --git a/kubernetes/opencrvs-services/templates/workflow-deployment.yaml b/kubernetes/opencrvs-services/templates/workflow-deployment.yaml index 1cb6e39febd..f9ef14ee664 100644 --- a/kubernetes/opencrvs-services/templates/workflow-deployment.yaml +++ b/kubernetes/opencrvs-services/templates/workflow-deployment.yaml @@ -32,7 +32,7 @@ spec: image: "opencrvs/ocrvs-workflow:{{ .Values.image.tag }}" env: - name: APPLICATION_CONFIG_URL - value: http://config:2021/ + value: http://config.opencrvs-services-dev.svc.cluster.local:2021 # FIXME: harcoded/ - name: CERT_PUBLIC_KEY_PATH value: /secrets/public-key.pem - name: COUNTRY @@ -42,7 +42,7 @@ spec: - name: DOCUMENTS_URL value: http://documents.opencrvs-services-dev.svc.cluster.local:9050 # FIXME: harcoded - name: FHIR_URL - value: http://hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded + value: http://hearth-1.hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded - name: METRICS_URL value: http://metrics.opencrvs-services-dev.svc.cluster.local:1050 # FIXME: harcoded - name: NODE_ENV diff --git a/packages/client/nginx/nginx-default.conf b/packages/client/nginx/nginx-default.conf index b03ffaf05fb..e391864f247 100644 --- a/packages/client/nginx/nginx-default.conf +++ b/packages/client/nginx/nginx-default.conf @@ -63,4 +63,8 @@ server { location = /50x.html { root /usr/share/nginx/html; } + + location /health { + return 200 'no content'; + } } diff --git a/packages/dashboards/Dockerfile b/packages/dashboards/Dockerfile index e2d95384000..4014de6a02f 100644 --- a/packages/dashboards/Dockerfile +++ b/packages/dashboards/Dockerfile @@ -5,13 +5,12 @@ RUN apk update && apk upgrade && apk add --no-cache gettext && apk add --no-cach ADD . . -RUN ls -lha - -#ADD run.sh / -#ADD initialize-database.sh / -#ADD update-database.sh / -#ADD environment-configuration.sql / -#ADD metabase.init.db.sql / +ADD run.sh / +ADD run-dev.sh / +ADD initialize-database.sh / +ADD update-database.sh / +ADD environment-configuration.sql / +ADD metabase.init.db.sql / ENV METABASE_JAR=/app/metabase.jar ENV MB_DB_INIT_SQL_FILE=/metabase.init.db.sql diff --git a/packages/gateway/Dockerfile b/packages/gateway/Dockerfile index 2b21dc6ce99..ea120adf8af 100644 --- a/packages/gateway/Dockerfile +++ b/packages/gateway/Dockerfile @@ -12,7 +12,4 @@ RUN yarn build RUN ls -lha /app/packages/gateway/build/dist/src RUN ls -lha /app/packages/gateway/build/dist/src/graphql - - - CMD [ "yarn", "start:prod" ]