Skip to content

A Quick way to invite the InterSystems FHIR Accelerator Service to your Microservice party in a Kubernetes Cluster for immediate use.

Notifications You must be signed in to change notification settings

intreqd/fhiraas-microservice-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fhiraas-microservice-kubernetes

A Quick way to invite the InterSystems FHIR Accelerator Service to your Microservice party in a Kubernetes Cluster for immediate use. The solution uses Nginx proxy ninja moves to get the job done.

Prerequisites

You'll need a couple of things if you want to deploy this in the manner it was presented in the community post. Its mainly positioned as a starting point or an approach for those wishing to plug FHIR capability in quickly for development, I cut a lot of corners with secrets etc but wanted feedback on the approach in return for the effort not a masterclass on secret management.

🔥 Environment

For this demonstration we are parked directly onto a Kubernetes Master Node tainted to put in work.

Environment

FHIR up the FHIR Accelerator Service

Create

Create

🖇 Record the Endpoint and API Key

This is all we need from the FHIR Accelerator, we will interact with the service in our own way inside the Kubernetes Cluster.

Clone this Repo

For the "Rest of the README", park yourself on a Tainted Kubernetes Master Node.

git clone https://gitlab.com/isc_cloud/fhiraas-microservice-kubernetes.git
cd fhir-microservice-kubernetes

Clone Repo

Deploy to Kubernetes Cluster

✏ WE GOTTA EDIT SOMETHING HERE

Remember the key and endpoint we generated from the FHIR Accelerator Service?. We need to update them here, in the deployment

  • Create a Deployment, here is the containers themselves, with a Three's Company starting point for a replica set.
  • Create a Service, Expose it!, this is a simple NodePort service that binds a port on the Node to access the FHIR Accelerator Service. It exposes 30036 to the node, and forwards to the deployment pod on 52773.
cd fhir-microservice-kubernetes # should already be here, but just to be sure.
kubectl apply -f k8s/

Deploy Deploy

Test It!

Lets do a quick test and see if FHIR is successfully getting served up through the NodePort.

[✔] Node Port Socket Listening?
[✔] Conformance Statement Responding?
[✔] Query Patients?
[✔] Get Patient?

Test

Scale It!

We're on a single node and exposing the service to a node port so not sure this will increase our throughput, but go nuts and scale away anyway.

kubectl scale deployments/isc-fhiraas-deployment --replicas=30 -n isc-fhiraas

Scale Scale

Throw some FHIR at it!

Included in this repo is a hostile, rustic, shell script for throwing some random patients into the Patient resource with a few bells and no whistles. I needs some environment variables or you can just edit the variables directly in the script. When running this script, ensure proper cpu fan operation and move objects from laptop area to prevent shuffling of objects in the event your laptop takes off.

bash bin/fhirbench.sh

Deploy

🏆 Results

50 puts, and 50 searches in 13 seconds.

Blame

This stuff in the repo, Ron Sweeney ([email protected]) of Integration Required. These are the opinions of my employer.

About

A Quick way to invite the InterSystems FHIR Accelerator Service to your Microservice party in a Kubernetes Cluster for immediate use.

Topics

Resources

Stars

Watchers

Forks

Languages