-
Notifications
You must be signed in to change notification settings - Fork 3
feat(#171): add support for kubernetes deployment in EKS #172
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
Open
sugat009
wants to merge
5
commits into
main
Choose a base branch
from
171-add-kubernetes-deployment-files
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,859
−0
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cc89ce1
feat(#171): add kubernetes manifest files for deployment
sugat009 919eb60
add support for helm charts and deployment in EKS
sugat009 6af798b
missed helm chart renaming
sugat009 2d6af15
feedback changes and using node-port directly locally instead of port…
sugat009 c059958
remove residue kind references
sugat009 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Patterns to ignore when building packages. | ||
| # This supports shell glob matching, relative path matching, and | ||
| # negation (prefixed with !). Only one pattern per line. | ||
| .DS_Store | ||
| # Common VCS dirs | ||
| .git/ | ||
| .gitignore | ||
| .bzr/ | ||
| .bzrignore | ||
| .hg/ | ||
| .hgignore | ||
| .svn/ | ||
| # Common backup files | ||
| *.swp | ||
| *.bak | ||
| *.tmp | ||
| *.orig | ||
| *~ | ||
| # Various IDEs | ||
| .project | ||
| .idea/ | ||
| *.tmproj | ||
| .vscode/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| apiVersion: v2 | ||
| name: cht-interop | ||
| description: A Helm chart for CHT Interoperability Stack | ||
| type: application | ||
| version: 1.0.0 | ||
| appVersion: "1.0" | ||
| keywords: | ||
| - health | ||
| - interoperability | ||
| - openhim | ||
| - cht | ||
| - fhir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| {{- if .Values.createNamespace }} | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: {{ .Values.global.namespace }} | ||
| labels: | ||
| name: {{ .Values.global.namespace }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: openhim-console-config | ||
| namespace: {{ .Values.global.namespace }} | ||
| data: | ||
| default.json: | | ||
| { | ||
| "version": "1.10.0", | ||
| "minimumCoreVersion": "3.4.0", | ||
| {{- if eq .Values.cluster_type "eks" }} | ||
| "protocol": "https", | ||
| "host": "{{ .Values.ingress.openhimCoreHost }}", | ||
| "port": 443, | ||
| {{- else }} | ||
| "protocol": "{{ .Values.openhim.console.config.protocol }}", | ||
| "host": "{{ .Values.openhim.console.config.host }}", | ||
| "port": {{ .Values.openhim.console.config.port }}, | ||
| {{- end }} | ||
| "title": "Admin Console", | ||
| "footerTitle": "OpenHIM Administration Console", | ||
| "footerPoweredBy": "<a href='http://openhim.org/' target='_blank'>Powered by OpenHIM</a>", | ||
| "loginBanner": "", | ||
| "mediatorLastHeartbeatWarningSeconds": 60, | ||
| "mediatorLastHeartbeatDangerSeconds": 120 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: database-credentials | ||
| namespace: {{ .Values.global.namespace }} | ||
| type: Opaque | ||
| stringData: | ||
| couchdb-user: {{ .Values.couchdb.credentials.username | quote }} | ||
| couchdb-password: {{ .Values.couchdb.credentials.password | quote }} | ||
| couchdb-secret: {{ .Values.couchdb.credentials.secret | quote }} | ||
| postgres-user: {{ .Values.postgresql.credentials.username | quote }} | ||
| postgres-password: {{ .Values.postgresql.credentials.password | quote }} | ||
| postgres-db: {{ .Values.postgresql.credentials.database | quote }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: openhim-credentials | ||
| namespace: {{ .Values.global.namespace }} | ||
| type: Opaque | ||
| stringData: | ||
| openhim-username: "root@openhim.org" | ||
| openhim-password: "openhim-password" | ||
| openhim-client-password: "interop-password" | ||
| openhim-user-password: "interop-password" | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: mediator-credentials | ||
| namespace: {{ .Values.global.namespace }} | ||
| type: Opaque | ||
| stringData: | ||
| openhim-username: {{ .Values.mediator.credentials.openhimUsername | quote }} | ||
| openhim-password: {{ .Values.mediator.credentials.openhimPassword | quote }} | ||
| fhir-username: {{ .Values.mediator.credentials.fhirUsername | quote }} | ||
| fhir-password: {{ .Values.mediator.credentials.fhirPassword | quote }} | ||
| cht-username: {{ .Values.mediator.credentials.chtUsername | quote }} | ||
| cht-password: {{ .Values.mediator.credentials.chtPassword | quote }} | ||
| openimis-username: "Admin" | ||
| openimis-password: "admin123" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| {{- if .Values.couchdb.enabled }} | ||
| apiVersion: v1 | ||
| kind: PersistentVolumeClaim | ||
| metadata: | ||
| name: couchdb-data | ||
| namespace: {{ .Values.global.namespace }} | ||
| spec: | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| storageClassName: {{ .Values.persistence.storageClass }} | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.couchdb.storage }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: PersistentVolumeClaim | ||
| metadata: | ||
| name: cht-credentials | ||
| namespace: {{ .Values.global.namespace }} | ||
| spec: | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| storageClassName: {{ .Values.persistence.storageClass }} | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.persistence.chtCredentials }} | ||
| {{- end }} | ||
| --- | ||
| {{- if .Values.cht.enabled }} | ||
| apiVersion: v1 | ||
| kind: PersistentVolumeClaim | ||
| metadata: | ||
| name: cht-ssl | ||
| namespace: {{ .Values.global.namespace }} | ||
| spec: | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| storageClassName: {{ .Values.persistence.storageClass }} | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.persistence.chtSsl }} | ||
| {{- end }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: PersistentVolumeClaim | ||
| metadata: | ||
| name: hapi-db-volume | ||
| namespace: {{ .Values.global.namespace }} | ||
| spec: | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| storageClassName: {{ .Values.persistence.storageClass }} | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.postgresql.storage }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: PersistentVolumeClaim | ||
| metadata: | ||
| name: mongo-data | ||
| namespace: {{ .Values.global.namespace }} | ||
| spec: | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| storageClassName: {{ .Values.persistence.storageClass }} | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.mongodb.storage }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,200 @@ | ||
| # MongoDBefor OpenHIM | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: mongo | ||
| namespace: {{ .Values.global.namespace }} | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: mongo | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: mongo | ||
| spec: | ||
| automountServiceAccountToken: false | ||
| containers: | ||
| - name: mongo | ||
| image: {{ .Values.mongodb.image }} | ||
| resources: | ||
| requests: | ||
| memory: {{ .Values.mongodb.resources.requests.memory | quote }} | ||
| cpu: {{ .Values.mongodb.resources.requests.cpu | quote }} | ||
| ephemeral-storage: {{ index .Values.mongodb.resources.requests "ephemeral-storage" | quote }} | ||
| limits: | ||
| memory: {{ .Values.mongodb.resources.limits.memory | quote }} | ||
| cpu: {{ .Values.mongodb.resources.limits.cpu | quote }} | ||
| ephemeral-storage: {{ index .Values.mongodb.resources.limits "ephemeral-storage" | quote }} | ||
| ports: | ||
| - containerPort: 27017 | ||
| volumeMounts: | ||
| - name: mongo-storage | ||
| mountPath: /data/db | ||
| volumes: | ||
| - name: mongo-storage | ||
| persistentVolumeClaim: | ||
| claimName: mongo-data | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: mongo | ||
| namespace: {{ .Values.global.namespace }} | ||
| spec: | ||
| selector: | ||
| app: mongo | ||
| ports: | ||
| - port: 27017 | ||
| targetPort: 27017 | ||
| --- | ||
| # PostgreSQL for HAPI FHIR | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: hapi-db | ||
| namespace: {{ .Values.global.namespace }} | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: hapi-db | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: hapi-db | ||
| spec: | ||
| automountServiceAccountToken: false | ||
| containers: | ||
| - name: hapi-db | ||
| image: {{ .Values.postgresql.image }} | ||
| resources: | ||
| requests: | ||
| memory: {{ .Values.postgresql.resources.requests.memory | quote }} | ||
| cpu: {{ .Values.postgresql.resources.requests.cpu | quote }} | ||
| ephemeral-storage: {{ index .Values.postgresql.resources.requests "ephemeral-storage" | quote }} | ||
| limits: | ||
| memory: {{ .Values.postgresql.resources.limits.memory | quote }} | ||
| cpu: {{ .Values.postgresql.resources.limits.cpu | quote }} | ||
| ephemeral-storage: {{ index .Values.postgresql.resources.limits "ephemeral-storage" | quote }} | ||
| env: | ||
| - name: POSTGRES_USER | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: database-credentials | ||
| key: postgres-user | ||
| - name: POSTGRES_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: database-credentials | ||
| key: postgres-password | ||
| - name: POSTGRES_DB | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: database-credentials | ||
| key: postgres-db | ||
| - name: PGDATA | ||
| value: /var/lib/postgresql/data/pgdata | ||
| ports: | ||
| - containerPort: 5432 | ||
| volumeMounts: | ||
| - name: hapi-db-storage | ||
| mountPath: /var/lib/postgresql/data | ||
| volumes: | ||
| - name: hapi-db-storage | ||
| persistentVolumeClaim: | ||
| claimName: hapi-db-volume | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: hapi-db | ||
| namespace: {{ .Values.global.namespace }} | ||
| spec: | ||
| selector: | ||
| app: hapi-db | ||
| ports: | ||
| - port: 5432 | ||
| targetPort: 5432 | ||
| --- | ||
| {{- if .Values.couchdb.enabled }} | ||
| # CouchDB for CHT | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: couchdb | ||
| namespace: {{ .Values.global.namespace }} | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: couchdb | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: couchdb | ||
| spec: | ||
| automountServiceAccountToken: false | ||
| containers: | ||
| - name: couchdb | ||
| image: {{ .Values.couchdb.image }} | ||
| resources: | ||
| requests: | ||
| memory: {{ .Values.couchdb.resources.requests.memory | quote }} | ||
| cpu: {{ .Values.couchdb.resources.requests.cpu | quote }} | ||
| ephemeral-storage: {{ index .Values.couchdb.resources.requests "ephemeral-storage" | quote }} | ||
| limits: | ||
| memory: {{ .Values.couchdb.resources.limits.memory | quote }} | ||
| cpu: {{ .Values.couchdb.resources.limits.cpu | quote }} | ||
| ephemeral-storage: {{ index .Values.couchdb.resources.limits "ephemeral-storage" | quote }} | ||
| env: | ||
| - name: COUCHDB_USER | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: database-credentials | ||
| key: couchdb-user | ||
| - name: COUCHDB_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: database-credentials | ||
| key: couchdb-password | ||
| - name: COUCHDB_SECRET | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: database-credentials | ||
| key: couchdb-secret | ||
| - name: COUCHDB_UUID | ||
| value: {{ .Values.couchdb.credentials.uuid | quote }} | ||
| - name: SVC_NAME | ||
| value: "couchdb" | ||
| - name: COUCHDB_LOG_LEVEL | ||
| value: "error" | ||
| ports: | ||
| - containerPort: 5984 | ||
| volumeMounts: | ||
| - name: couchdb-data-storage | ||
| mountPath: /opt/couchdb/data | ||
| - name: cht-credentials-storage | ||
| mountPath: /opt/couchdb/etc/local.d/ | ||
| volumes: | ||
| - name: couchdb-data-storage | ||
| persistentVolumeClaim: | ||
| claimName: couchdb-data | ||
| - name: cht-credentials-storage | ||
| persistentVolumeClaim: | ||
| claimName: cht-credentials | ||
| restartPolicy: Always | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: couchdb | ||
| namespace: {{ .Values.global.namespace }} | ||
| spec: | ||
| selector: | ||
| app: couchdb | ||
| ports: | ||
| - port: 5984 | ||
| targetPort: 5984 | ||
| {{- end }} | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for EKS at least, couchdb and the cht deployment should be conditional, and allow an external cht to be used. Even for testing and development deployments, its common to want to deploy only the interop stack, with an cht instance deployed somewhere else (that has the data you want).