Set up Service Fabric Mesh CLI
Service Fabric Mesh Command Line Interface (CLI) is required to deploy and manage resources locally and in Azure Service Fabric Mesh.
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 'az mesh' and 'sfctl' that allows Java developers to use a familiar command line experience for local and Azure development experience.|
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.
Open Azure Cloud Shell
Azure Cloud Shell is a free, interactive shell that you can use to run the steps in this article. Common Azure tools are preinstalled and configured in Cloud Shell for you to use with your account. Just select the Copy button to copy the code, paste it in Cloud Shell, and then press Enter to run it. There are a few ways to open Cloud Shell:
|Select Try It in the upper-right corner of a code block.|
|Open Cloud Shell in your browser.|
|Select the Cloud Shell button on the menu in the upper-right corner of the Azure portal.|
Install the Azure Service Fabric Mesh CLI
You must install the Azure CLI version 2.0.43 or later. Run
az --versionto find the version. To install or upgrade to the latest version of the CLI, see Install the Azure CLI.
Install the Azure Service Fabric Mesh CLI extension module using the following command.
az extension add --name mesh
Update an 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.