GKE Cloud Deployment
Med-SEAL Suite is deployed to Google Kubernetes Engine (GKE) Autopilot in the asia-southeast1 region. All infrastructure is provisioned via shell scripts and Kubernetes manifests located in the gcp/ directory of the main repository.
Infrastructure Overview
Deployment Steps
Step 1: Bootstrap Infrastructure
Creates the VPC, subnets, GKE Autopilot cluster, and Artifact Registry.
cd gcp
./setup.sh <PROJECT_ID> asia-southeast1
Resources created:
VPC
medseal-vpcwith subnet10.0.0.0/16GKE Autopilot cluster
medseal-clusterArtifact Registry
medseal(Docker)
Step 2: Configure Secrets
Stores passwords and API keys securely in Google Secret Manager.
./secrets.sh
Secrets managed:
Secret |
Purpose |
|---|---|
|
OpenEMR MySQL password |
|
Medplum PostgreSQL password |
|
SSO PostgreSQL password |
|
Orthanc PACS auth credentials |
|
LLM API key for AI agents |
Step 3: Provision Databases
Creates all managed database services.
./databases.sh <PROJECT_ID> asia-southeast1
Service |
Type |
Instance |
|---|---|---|
OpenEMR |
Cloud SQL MySQL 8.0 |
|
Medplum + SSO |
Cloud SQL PostgreSQL 16 |
|
Cache |
Memorystore Redis |
|
DICOM Storage |
Filestore NFS (1 TB) |
|
Binary Storage |
Cloud Storage |
|
Audit Data |
Cloud Storage |
|
Warning
After running databases.sh, copy the private IP addresses printed by the script and update the Kubernetes manifests in k8s/ before deploying.
Step 4: Build and Push Custom Images
./push-images.sh <PROJECT_ID> asia-southeast1
Builds linux/amd64 images for ai-service and ai-frontend, then pushes them to Artifact Registry.
Step 5: Deploy to Kubernetes
gcloud container clusters get-credentials medseal-cluster --region asia-southeast1
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/ -n medseal
# Watch pods come up
kubectl get pods -n medseal -w
Step 6: Verify Ingress
kubectl get ingress medseal-ingress -n medseal
The GCE Ingress controller provisions a Google Cloud Load Balancer exposing all services via nip.io subdomains.
Kubernetes Manifests
All manifests are in gcp/k8s/:
File |
Resources |
|---|---|
|
Namespace |
|
OpenEMR Deployment + Service + ConfigMap |
|
Medplum Server + App Deployments + Services |
|
AI Service Deployment + Service |
|
AI Frontend Deployment + Service |
|
Orthanc PACS Deployment + Service |
|
OHIF Viewer Deployment + Service |
|
Data Sync CronJob |
|
GCE Ingress with 7 host rules |
Ingress Routing
The Ingress controller maps subdomains to internal services:
Subdomain |
Service |
Port |
|---|---|---|
|
ai-frontend |
80 |
|
ai-service |
4003 |
|
openemr |
80 |
|
medplum-server |
8103 |
|
medplum-app |
3000 |
|
orthanc-proxy |
80 |
|
ohif-viewer |
80 |
GKE Architecture Diagram