Quickstart: Deploy Hello World to Service Fabric Mesh

Service Fabric Mesh makes it easy to create and manage microservices applications in Azure, without having to provision virtual machines. In this quickstart, you will create a Hello World application in Azure and expose it to the internet. This operation is completed in a single command. Within just a couple minutes, you'll see this view in your browser:

Hello world app in the browser

Service Fabric Mesh is currently in preview. Previews are made available to you on the condition that you agree to the supplemental terms of use. Some aspects of this feature may change prior to general availability (GA).

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

Set up Service Fabric Mesh CLI

You can use the Azure Cloud Shell or a local installation of the Azure CLI to complete this quickstart. Install Azure Service Fabric Mesh CLI extension module by following these instructions.

Sign in to Azure

Sign in to Azure and set your subscription.

az login
az account set --subscription "<subscriptionID>"

Create resource group

Create a resource group to deploy the application to. You can use an existing resource group and skip this step.

az group create --name myResourceGroup --location eastus 

Deploy the application

Create your application in the resource group using the az mesh deployment create command. Run the following:

az mesh deployment create --resource-group myResourceGroup --template-uri https://sfmeshsamples.blob.core.windows.net/templates/helloworld/mesh_rp.linux.json --parameters "{'location': {'value': 'eastus'}}" 

The preceding command deploys a Linux application using mesh_rp.linux.json template. If you want to deploy a Windows application, use mesh_rp.windows.json template. Windows container images are larger than Linux container images and may take more time to deploy.

In a few minutes, the command returns:

helloWorldApp has been deployed successfully on helloWorldNetwork with public ip address <IP Address>

Open the application

Once the application successfully deploys, copy the public IP address for the service endpoint from the CLI output. Open the IP address in a web browser. A web page with the Azure Service Fabric Mesh logo displays.

Check the application details

You can check the application's status using the az mesh app show command. This command provides useful information that you can follow up on.

The application name for this quickstart is helloWorldApp, to gather the details on the application execute the following command:

az mesh app show --resource-group myResourceGroup --name helloWorldApp

See the application logs

Examine the logs for the deployed application using the az mesh code-package-log get command:

az mesh code-package-log get --resource-group myResourceGroup --application-name helloWorldApp --service-name helloWorldService --replica-name 0 --code-package-name helloWorldCode

Clean up resources

When you are ready to delete the application, run the az group delete command to remove the resource group and the application and network resources it contains.

az group delete --name myResourceGroup

Next steps

To learn more about creating and deploying Service Fabric Mesh applications, continue to the tutorial.