Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Bahmni ABDM Proxy simulates HRP (Health Repository Providers) in order to allow sharing ABDM secrets across multiple single tenant bahmni instances running as HIU/HIP.

  1. Individual Bahmni instances (as HIU/HIP) continues to directly call the ABDM gateway using shared secrets

  2. ABDM Gateway responds back onto the ABDM Proxy callback endpoint.

  3. ABDM Proxy maintains knowledge (map) about HIU/HIP (key) and their corresponding instance url. It extracts the HIU/HIP ID from the request callback header (e.g. X-HIU-ID) and derive the deligate url

  4. It would then forward the request to the deligate url (with headers as-is) in order to have it handled by the designated HIP/HIU instance.

Setup

The assumption is that all the Bahmni instances are running within the same Kubernetes cluster (any of the 3 approaches depicted in this document).

🔘 Create A record for ABDM Proxy

The assumption is that you have already setup a Hosted Zone for your domain (e.g. mybahmni.in) and completed the infra setup. This A record is to have a unique subdomain for ABDM proxy e.g. abdm-proxy.mybahmni.in. You could either follow this guide for CLI or this for Console (choose Alias to network load-balancer and then select the configured elb from your aws region).

🔘 Apply ABDM proxy ingress in default namespace

Start by forking this repo https://github.com/BahmniIndiaDistro/abdm-callback-proxy - change the host in ingress.yaml to the alias that you setup in above setup e.g. abdm-proxy.mybahmni.in and then apply in default namespace

kubectl apply -f ingress.yaml

🔘 Apply abdm proxy service in default namespace

ABDM proxy uses Nginx + NJS to manage the HIU/HIP map and perform the deligation. Change the deligateRepository in njs.ts to represent your bahmni cluster with various instances of bahmni. In below example alpha and omega are 2 bahmni instances running as HIP/HIP in different namespace within the same EKS cluster having their own A record defined.

const deligateRepository: { [key: string]: string } = {
  alpha: 'alpha.mybahmni.in',
  omega: 'omega.mybahmni.in',
};

TODO

  • Setup alpha and omega as HIP and HIU ID

  • Create services on ABDM gateway

  • Create Docker Image and push to Implementer’s dockerhub

  • yarn rollout

  • No labels