Set up Service Fabric Mesh CLI
The preview of Azure Service Fabric Mesh has been retired. New deployments will no longer be permitted through the Service Fabric Mesh API. Support for existing deployments will continue through April 28, 2021.
For details, see Azure Service Fabric Mesh Preview Retirement.
Service Fabric Mesh Command Line Interface (CLI) is required to deploy and manage resources locally and in Azure Service Fabric Mesh. Here's how to set it up.
There are three types of CLI that can be used and they are summarized in the table below.
|CLI Module||Target Environment||Description|
|az mesh||Azure Service Fabric Mesh||The primary CLI which allows you to deploy your applications and manage resources against the Azure Service Fabric Mesh environment.|
|sfctl||Local clusters||Service Fabric CLI that allows deployment and testing of Service Fabric resources against local clusters.|
|Maven CLI||Local clusters & Azure Service Fabric Mesh||A wrapper around
For the preview, Azure Service Fabric Mesh CLI is written as an extension to Azure CLI. You can install it in the Azure Cloud Shell or a local installation of Azure CLI.
Use the Bash environment in Azure Cloud Shell.
If you prefer, install the Azure CLI to run CLI reference commands.
If you're using a local installation, sign in to the Azure CLI by using the az login command. To finish the authentication process, follow the steps displayed in your terminal. For additional sign-in options, see Sign in with the Azure CLI.
When you're prompted, install Azure CLI extensions on first use. For more information about extensions, see Use extensions with the Azure CLI.
- This article requires version 2.0.67 or later of the Azure CLI. If using Azure Cloud Shell, the latest version is already installed.
Install the Azure Service Fabric Mesh CLI
If you haven't done so already, install the Azure Service Fabric Mesh CLI extension module using the following command:
az extension add --name mesh
If it's already installed, update your existing Azure Service Fabric Mesh CLI module using the following command:
az extension update --name mesh
Install the Service Fabric CLI (sfctl)
Follow instructions on Set up Service Fabric CLI. The sfctl module can be used for deployment of applications based on the resource model against Service Fabric clusters on your local machine.
Install the Maven CLI
In order to use the Maven CLI, the following needs to be installed on your machine:
- Azure Mesh CLI (az mesh) - To target Azure Service Fabric Mesh
- SFCTL (sfctl) - To target local clusters
The Maven CLI for Service Fabric is still in preview.
To use the Maven plugin in your Maven Java app, add the following snippet to your pom.xml file:
<project> ... <build> ... <plugins> ... <plugin> <groupId>com.microsoft.azure</groupId> <artifactId>azure-sfmesh-maven-plugin</artifactId> <version>0.1.0</version> <configuration> ... </configuration> </plugin> </plugins> </build> </project>
Read the Maven CLI reference section to learn about detailed usage.
You can also set up your Windows development environment.
Find answers to common questions and issues.