Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions deployment/kubernetes/charts/cogstack-helm-ce/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ dependencies:
- name: opensearch-dashboards
repository: https://opensearch-project.github.io/helm-charts/
version: 3.5.0
- name: jupyterhub
- name: cogstack-jupyterhub
repository: file://charts/jupyterhub
version: 0.1.0
digest: sha256:0dbf6980653337af2efa16bb340d0a04dca9ed517bf4ab3c87044da348e8a84c
generated: "2026-02-27T16:13:56.822297965Z"
digest: sha256:d9fb8600b71642cbbdcfc0e9c4b512f3efedadf99544b3e81f97f0deb5a8469a
generated: "2026-03-03T17:30:34.27108704Z"
9 changes: 2 additions & 7 deletions deployment/kubernetes/charts/cogstack-helm-ce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,14 @@ helm install cogstack oci://registry-1.docker.io/cogstacksystems/cogstack-helm-c
```

## Configuration

Key values in `values.yaml`:
These are some values that are likely to need customization for your deployment:

| Value | Default | Description |
|-------|---------|-------------|
| `imagePullSecrets` | `[]` | Secrets for pulling images from a private registry. |
| `nameOverride` | `""` | Override the chart name used in resource names. |
| `fullnameOverride` | `""` | Override the full name used in resource names. |
| `medcat-service.replicasCount` | `1` | Number of MedCAT service replicas. |
| `anoncat-service.replicasCount` | `1` | Number of AnonCAT service replicas. |
| `anoncat-service.env.APP_ENABLE_DEMO_UI` | `true` | Enable AnonCAT demo UI. |
| `anoncat-service.env.DEID_MODE` | `true` | Run AnonCAT in de-identification mode. |
| `anoncat-service.env.DEID_REDACT` | `false` | Redaction behaviour for de-identification. |
| `medcat-trainer.env.CSRF_TRUSTED_ORIGINS` | `"http://localhost:8080"` | CSRF trusted origins for MedCAT Trainer frontend (set correct value for your deployment, this default works for port forwarding). |

Subcharts (MedCAT service, AnonCAT service, MedCAT Trainer) support additional options; see their respective charts under `../medcat-service-helm` and `../medcat-trainer-helm`. Pass them under the same keys as in this chart’s `values.yaml` (e.g. `medcat-service.*`, `anoncat-service.*`, `medcat-trainer-helm.*`).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ kubectl --namespace {{ .Release.Namespace }} port-forward $MEDCAT_POD_NAME 5000:
export TRAINER_POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name=medcat-trainer,app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $TRAINER_POD_NAME -o jsonpath="{.spec.containers[?(@.name==\"nginx\")].ports[0].containerPort}")
export CONTAINER_PORT_API=$(kubectl get pod --namespace {{ .Release.Namespace }} $TRAINER_POD_NAME -o jsonpath="{.spec.containers[?(@.name==\"medcat-trainer\")].ports[0].containerPort}")
kubectl --namespace {{ .Release.Namespace }} port-forward $TRAINER_POD_NAME 8000:$CONTAINER_PORT 8001:$CONTAINER_PORT_API &
kubectl --namespace {{ .Release.Namespace }} port-forward $TRAINER_POD_NAME 8080:$CONTAINER_PORT 8001:$CONTAINER_PORT_API &

{{- if .Values.opensearch.enabled }}
# 4. Opensearch
Expand All @@ -38,7 +38,7 @@ kubectl --namespace {{ .Release.Namespace }} port-forward svc/$JUPYTERHUB_PROXY_

echo "Visit http://127.0.0.1:5000 to use MedCAT Service"
echo "Visit http://127.0.0.1:5001 to use AnonCAT"
echo "Visit http://127.0.0.1:8000 to use MedCAT Trainer"
echo "Visit http://127.0.0.1:8080 to use MedCAT Trainer"
{{ if .Values.opensearch.enabled }}echo "Visit https://127.0.0.1:9200 to use OpenSearch"{{- end }}
{{ if index .Values "opensearch-dashboards" "enabled" }}echo "Visit http://127.0.0.1:5601 to use OpenSearch Dashboards"{{- end }}
{{ if index .Values "cogstack-jupyterhub" "enabled" }}echo "Visit http://127.0.0.1:8000 to use jupyterhub"{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{- if and (index .Values "medcat-trainer" "provisioning" "enabled") (eq (index .Values "medcat-trainer" "provisioning" "existingConfigMap" "name") "cogstack-helm-ce-example-trainer-provisioining") }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ index .Values "medcat-trainer" "provisioning" "existingConfigMap" "name" }}
data:
provisioning.yaml: |
projects:
- dataset:
name: "Example Dataset - psych.csv"
url: "https://raw.githubusercontent.com/CogStack/cogstack-nlp/be9825f151da2d3b6faac80d49e5be91a1629c68/medcat-trainer/notebook_docs/example_data/psych.csv"
description: "Dataset from https://raw.githubusercontent.com/CogStack/cogstack-nlp/be9825f151da2d3b6faac80d49e5be91a1629c68/medcat-trainer/notebook_docs/example_data/psych.csv"
project:
name: "Example Project"
description: "Example project for medcat trainer using MedCAT Service"
annotationGuidelineLink: "https://docs.google.com/document/d/1xxelBOYbyVzJ7vLlztP2q1Kw9F5Vr1pRwblgrXPS7QM/edit?usp=sharing"
useModelService: true
modelServiceUrl: "http://{{ include "cogstack-helm-ce.fullname" . }}-medcat-service:5000"
- dataset:
name: "Example Dataset - psych.csv - deid"
url: "https://raw.githubusercontent.com/CogStack/cogstack-nlp/be9825f151da2d3b6faac80d49e5be91a1629c68/medcat-trainer/notebook_docs/example_data/psych.csv"
description: "Dataset from https://raw.githubusercontent.com/CogStack/cogstack-nlp/be9825f151da2d3b6faac80d49e5be91a1629c68/medcat-trainer/notebook_docs/example_data/psych.csv"
project:
name: "Example Deid project"
description: "Example project for medcat trainer using AnonCAT Service"
annotationGuidelineLink: "https://docs.google.com/document/d/1xxelBOYbyVzJ7vLlztP2q1Kw9F5Vr1pRwblgrXPS7QM/edit?usp=sharing"
useModelService: true
modelServiceUrl: "http://{{ include "cogstack-helm-ce.fullname" . }}-anoncat-service:5000"
{{- end }}
11 changes: 11 additions & 0 deletions deployment/kubernetes/charts/cogstack-helm-ce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ medcat-service:
repository: cogstacksystems/medcat-service
tag: "1.2.0"


medcat-trainer:
image:
tag: "latest@sha256:dcbd9f7c480dcb88e072189d233a146317f210a826573fd0c47d469da5360be0"
provisioning:
enabled: true
existingConfigMap:
name: "cogstack-helm-ce-example-trainer-provisioining"
env:
CSRF_TRUSTED_ORIGINS: "http://localhost:8080"

opensearch:
enabled: true
extraEnvs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,3 @@ data:
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
autorestart=true
{{- if and .Values.provisioning .Values.provisioning.enabled }}
provisioning.yaml: |
{{ toYaml .Values.provisioning.config | indent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ spec:
name: api-static
{{- if and .Values.provisioning .Values.provisioning.enabled }}
- mountPath: /home/configs/provisioning.yaml
name: medcat-trainer-config
subPath: provisioning.yaml
name: medcat-trainer-provisioning-config
subPath: {{ .Values.provisioning.existingConfigMap.subPath | default "provisioning.yaml" }}
{{- end }}
{{- if eq .Values.DB_ENGINE "sqlite3" }}
- mountPath: /home/api/db
Expand Down Expand Up @@ -140,6 +140,15 @@ spec:
- name: medcat-trainer-config
configMap:
name: {{ include "medcat-trainer-helm.fullname" . }}-config
{{- if and .Values.provisioning .Values.provisioning.enabled }}
- name: medcat-trainer-provisioning-config
configMap:
{{- if .Values.provisioning.existingConfigMap.name }}
name: {{ .Values.provisioning.existingConfigMap.name }}
{{- else }}
name: {{ include "medcat-trainer-helm.fullname" . }}-provisioning
{{- end }}
{{- end }}
- name: api-media
persistentVolumeClaim:
claimName: {{ include "medcat-trainer-helm.fullname" . }}-api-media
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if (and .Values.provisioning .Values.provisioning.enabled) }}
{{- if not .Values.provisioning.existingConfigMap }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "medcat-trainer-helm.fullname" . }}-provisioning
data:
provisioning.yaml: |
{{ tpl (toYaml .Values.provisioning.config) . | indent 4 }}
{{- end }}
{{- end }}
6 changes: 5 additions & 1 deletion deployment/kubernetes/charts/medcat-trainer-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ env:
provisioning:
# -- Set to true to enable provisioning of projects and models on startup..
enabled: false
# -- Put yaml file contents here.See https://docs.cogstack.org/projects/medcat-trainer/en/latest/provisioning/
# -- Optional: Reference an existing configmap for the provisioning config.
existingConfigMap: {}
# -- The name of an existing configmap. Contains a yaml definition under the key "provisioining.yaml"
# name: ""
# -- Put yaml file contents here. Can be templated See https://docs.cogstack.org/projects/medcat-trainer/en/latest/provisioning/
config:
projects:
- dataset:
Expand Down
7 changes: 6 additions & 1 deletion deployment/kubernetes/local_dev_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ helm test medcat-service --logs

## helm install trainer-registry oci://registry-1.docker.io/cogstacksystems/medcat-trainer-helm --wait --timeout 5m0s

helm upgrade cogstack-helm-ce ./cogstack-helm-ce --install --render-subchart-notes --wait --timeout 5m0s
helm upgrade cogstack-helm-ce ./cogstack-helm-ce --install

# Stop any running port forwards
# ps -ef | grep '[p]ort-forward' | awk '{print $2}' | xargs -r kill
# Port forward all services in cogstack-helm-ce
# helm get notes cogstack-helm-ce | bash
Loading