Skip to content

Multi Instance Runner for local clusters of n FHIR services#5375

Merged
jestradaMS merged 7 commits intomainfrom
users/jestrada/multiinstancerunner
Feb 13, 2026
Merged

Multi Instance Runner for local clusters of n FHIR services#5375
jestradaMS merged 7 commits intomainfrom
users/jestrada/multiinstancerunner

Conversation

@jestradaMS
Copy link
Contributor

@jestradaMS jestradaMS commented Feb 6, 2026

Description

This pull request introduces a new PowerShell script and accompanying documentation to streamline running multiple local FHIR R4 server instances behind an NGINX reverse proxy. The script automates environment setup, database initialization, project build/run, and proxy configuration, making it easier to launch, debug, and test a multi-instance cluster for development and E2E testing.

New multi-instance runner and documentation:

Multi-instance cluster orchestration

  • Added start-local-fhir-nginx.ps1 script to automate launching multiple FHIR R4 server instances behind NGINX, including build, database setup, environment variable configuration, and log management.
  • Script supports configurable parameters for instance count, ports, SQL connection, project path, framework, and logging, as well as optional flags for skipping build/schema initialization and persisting test environment variables.

NGINX proxy setup

  • Script automatically downloads and configures NGINX if not present, generates a reverse proxy config to forward requests to backend FHIR instances, and manages proxy startup/shutdown.

Database and schema initialization

  • Script normalizes SQL connection strings, ensures the target database exists (using sqlcmd), and applies the latest schema using the schema manager console.

Logging and debugging

  • Supports per-instance log redirection, provides guidance for attaching Visual Studio debugger to running instances, and documents log locations for both FHIR and NGINX processes. [1] [2]

Comprehensive user documentation

  • Added README.md detailing prerequisites, quick start, parameters, environment variables, stopping/cleanup, log locations, E2E test integration, sample endpoints, and debugging tips for the new multi-instance runner.
image

Related issues

Addresses AB#182969.

Testing

Tested locally while troubleshooting multi-pod caching issues in Search parameters

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
  • When changing or adding behavior, if your code modifies the system design or changes design assumptions, please create and include an ADR.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Patch|Skip|Feature|Breaking (reason)

jestradaMS and others added 3 commits February 6, 2026 09:16
- Add start-local-fhir-nginx.ps1 script to run multiple FHIR R4 instances behind NGINX
  - Configurable instance count, ports, and NGINX proxy settings
  - Automatic SQL database initialization and schema migration
  - Support for disabling security and persisting test environment variables
  - Log output redirection and process management
  
- Add comprehensive README.md documentation
  - Quick start guide and usage examples
  - Parameter reference with defaults
  - Instructions for running E2E tests against the cluster
  - Sample REST endpoints (health, metadata, Patient)
  - Visual Studio debugger attachment instructions for multi-instance debugging
@jestradaMS jestradaMS added this to the FY26\Q3\2Wk\2Wk16 milestone Feb 6, 2026
@jestradaMS jestradaMS requested a review from a team as a code owner February 6, 2026 15:53
@jestradaMS jestradaMS added OSS-specific This is category of issues that are specific to OSS. This category does not impact managed service. No-PaaS-breaking-change Build ADR-Included ADR Included in the PR labels Feb 6, 2026
@jestradaMS jestradaMS enabled auto-merge (squash) February 7, 2026 03:40
@jestradaMS
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jestradaMS jestradaMS merged commit b27fbf4 into main Feb 13, 2026
61 checks passed
@jestradaMS jestradaMS deleted the users/jestrada/multiinstancerunner branch February 13, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ADR-Included ADR Included in the PR Build No-PaaS-breaking-change OSS-specific This is category of issues that are specific to OSS. This category does not impact managed service.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants