Skip to content

Latest commit

 

History

History
73 lines (47 loc) · 3.76 KB

QuickstartDeployCLI.md

File metadata and controls

73 lines (47 loc) · 3.76 KB

Quickstart: Deploy Open Source FHIR server using Azure CLI

In this quickstart, you'll learn how to deploy an Open Source FHIR server in Azure using the Azure CLI.

If you don't have an Azure subscription, create a free account before you begin.

Use Azure Cloud Shell

Azure hosts Azure Cloud Shell, an interactive shell environment that you can use through your browser. You can use either Bash or PowerShell with Cloud Shell to work with Azure services. You can use the Cloud Shell preinstalled commands to run the code in this article without having to install anything on your local environment.

To start Azure Cloud Shell:

  1. Select Try It in the upper-right corner of a code block. Selecting Try It doesn't automatically copy the code to Cloud Shell.
  2. Go to https://shell.azure.com, or select the Launch Cloud Shell button to open Cloud Shell in your browser.
  3. Select the Cloud Shell button on the menu bar at the upper right in the Azure portal. Choose to run in Bash mode.

To run the code in this article in Azure Cloud Shell:

  1. Start Cloud Shell.
  2. Select the Copy button on a code block to copy the code.
  3. Paste the code into the Cloud Shell session by selecting Ctrl+Shift+V on Windows and Linux or by selecting Cmd+Shift+V on macOS.
  4. Select Enter to run the code.

Create resource group

Pick a name for the resource group that will contain the provisioned resources and create it:

(Note: this name must be globally unique to avoid DNS collision with other App Service deployments. For testing purposes, try prepending a descriptive name like FhirService with your intials and the date, e.g. abMay1)

servicename="abMay1FhirService"
az group create --name $servicename --location westus

Deploy template

The Microsoft FHIR Server for Azure GitHub Repository contains a template that will deploy all necessary resources.

Deploy using CosmosDB as the data store with the following command:

az deployment group create -g $servicename --template-uri https://raw.githubusercontent.com/Microsoft/fhir-server/main/samples/templates/default-azuredeploy-docker.json --parameters serviceName=$servicename


Alternatively, to deploy using SQL Server as the data store:

az deployment group create -g $servicename --template-uri https://raw.githubusercontent.com/Microsoft/fhir-server/main/samples/templates/default-azuredeploy-docker.json --parameters serviceName=$servicename solutionType=FhirServerSqlServer sqlSchemaAutomaticUpdatesEnabled=auto sqlAdminPassword=<replace me>

(Note: ensure that your SQL admin password meets the minimum policy requirements to avoid deployment errors)

Verify FHIR server is running

Obtain a capability statement from the FHIR server with:

metadataurl="https://${servicename}.azurewebsites.net/metadata"
curl --url $metadataurl

It will take a minute or so for the server to respond the first time.

Clean up resources

If you're not going to continue to use this application, delete the resource group with the following steps:

az group delete --name $servicename

Next steps

In this tutorial, you've deployed the Microsoft Open Source FHIR Server for Azure into your subscription. To learn how to access the FHIR API using Postman, you can take a look at the Postman tutorial on the Azure Docs site.