You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The preceding command deploys a Linux using [mesh_rp.base.linux.json template](https://sfmeshsamples.blob.core.windows.net/templates/visualobjects/mesh_rp.base.linux.json). If you want to deploy a Windows application, use [mesh_rp.base.windows.json template](https://sfmeshsamples.blob.core.windows.net/templates/visualobjects/mesh_rp.base.windows.json). Windows container images are larger than Linux container images and may take more time to deploy.
54
+
The preceding command deploys a Linux application using [mesh_rp.base.linux.json template](https://sfmeshsamples.blob.core.windows.net/templates/visualobjects/mesh_rp.base.linux.json). If you want to deploy a Windows application, use [mesh_rp.base.windows.json template](https://sfmeshsamples.blob.core.windows.net/templates/visualobjects/mesh_rp.base.windows.json). Windows container images are larger than Linux container images and may take more time to deploy.
55
55
56
56
In a few minutes, your command should return with:
57
57
58
58
`visualObjectsApp has been deployed successfully on visualObjectsNetwork with public ip address <IP Address>`
59
59
60
60
## Open the application
61
-
Once the application successfully deploys, get the public IP address for the service endpoint, and open it on a browser. It should display a web page with one triangle moving through the space.
61
+
Once the application successfully deploys, get the public IP address for the service endpoint, and open it on a browser. It displays a web page with one triangle moving through the space.
62
62
63
-
The deployment command returns the public IP address of the service endpoint. You can also query the network resource to find the public IP address of the service endpoint.
63
+
The deployment command returns the public IP address of the service endpoint. Optionally, You can also query the network resource to find the public IP address of the service endpoint.
64
64
65
65
The network resource name for this application is `visualObjectsNetwork`, fetch information about it using the following command.
title: Deploy an Service Fabric Mesh app that uses Azure Files volume| Microsoft Docs
3
-
description: Learn how to deploy an application that uses the Azure Files volume to Service Fabric Mesh using the Azure CLI.
4
-
services: service-fabric
2
+
title: Store state by mounting Azure Files based volume inside the container in Service Fabric Mesh application | Microsoft Docs
3
+
description: Learn how to store state by mounting Azure Files based volume inside the container in Service Fabric Mesh application using the Azure CLI.
4
+
services: service-fabric-mesh
5
5
documentationcenter: .net
6
6
author: rwike77
7
7
manager: timlt
@@ -18,77 +18,75 @@ ms.author: ryanwi
18
18
ms.custom: mvc, devcenter
19
19
---
20
20
21
-
# Deploy a Service Fabric Mesh application that uses the Azure Files volume
22
-
This sample illustrates the use of storage volumes in a container running in Azure Service Fabric Mesh. As a part of this sample:
21
+
# Store state by mounting Azure Files based volume in Service Fabric Mesh application
23
22
24
-
- Create a file share with [Azure Files](/azure/storage/files/storage-files-introduction)
25
-
- Reference that share as a volume for a container instance that we'll deploy
26
-
- When the container starts, it mounts that share as a specific location within the container
27
-
- The code running inside the container writes a text file to that location
28
-
- Verify the file is written correctly in the share that backs the volume
23
+
This article shows how to store state in Azure Files by mounting a volume inside the container of a Service Fabric Mesh application. In this example, Counter application has an ASP.NET Core service with a web page that shows counter value in a browser.
29
24
30
-
## Example JSON templates
25
+
The `counterService` perodically reads a counter value from a file, increments it and write it back to the file. The file is stored in a folder that is mounted on the volume backed by Azure Files share.
You can use the Azure Cloud Shell or a local installation of the Azure CLI to complete this task. Install Azure Service Fabric Mesh CLI extension module by following these [instructions](service-fabric-mesh-howto-setup-cli.md).
Follow the instructions in the [Azure Files documentation](/azure/storage/files/storage-how-to-create-file-share) to create a file share for the application to use.
You can use the Azure Cloud Shell or a local installation of the Azure CLI to complete these steps. If you choose to install and use the CLI locally, you must install the Azure CLI version 2.0.35 or later. Run `az --version` to find the version. To install or upgrade to the latest version of the CLI, see [Install Azure CLI 2.0][azure-cli-install].
44
-
45
-
Install the Azure Service Fabric Mesh CLI extension module. For the preview, Azure Service Fabric Mesh CLI is written as an extension to Azure CLI.
46
-
47
-
```azurecli-interactive
48
-
az extension add --source https://sfmeshcli.blob.core.windows.net/cli/mesh-0.8.1-py2.py3-none-any.whl
49
-
```
50
-
51
-
## Log in to Azure
52
-
Log in to Azure and set your subscription.
30
+
## Sign in to Azure
31
+
Sign in to Azure and set your subscription.
53
32
54
33
```azurecli-interactive
55
34
az login
56
-
az account set --subscription "<subscriptionName>"
35
+
az account set --subscription "<subscriptionID>"
57
36
```
58
37
38
+
## Create file share
39
+
Create an Azure file share by following these [instructions](/azure/storage/files/storage-how-to-create-file-share). The storage account name, storage account key and the file share name are referenced as `<storageAccountName>`, `<storageAccountKey>`, and `<fileShareName>` in the following instructions.
40
+
59
41
## Create resource group
60
-
Create a resource group (RG) to deploy this example or you can use an existing resource group and skip this step. The preview is available only in `eastus` location.
42
+
Create a resource group to deploy the application to. You can use an existing resource group and skip this step.
61
43
62
44
```azurecli-interactive
63
-
az group create --name <resourceGroupName> --location eastus
45
+
az group create --name myResourceGroup --location eastus
64
46
```
65
47
66
48
## Deploy the template
67
-
Create the application and related resources using one of the following commands.
68
49
69
-
For Linux:
50
+
Create the application and related resources using the following command, and provide the values for `storageAccountName`, `storageAccountKey` and `fileShareName` from the previous step.
51
+
52
+
The `storageAccountKey` parameter in the template is a `securestring`. It will not be displayed in the deployment status and `az mesh service show` commands. Ensure that it is correctly specified in the following command.
70
53
71
54
```azurecli-interactive
72
-
az mesh deployment create --resource-group <resourceGroupName> --template-uri https://seabreezequickstart.blob.core.windows.net/templates/azurefiles-volume/sbz_rp.linux.json
The preceding command deploys a Linux application using [mesh_rp.linux.json template](https://sfmeshsamples.blob.core.windows.net/templates/counter/mesh_rp.linux.json). If you want to deploy a Windows application, use [mesh_rp.windows.json template](https://sfmeshsamples.blob.core.windows.net/templates/counter/mesh_rp.windows.json). Windows container images are larger than Linux container images and may take more time to deploy.
76
59
77
-
```azurecli-interactive
78
-
az mesh deployment create --resource-group <resourceGroupName> --template-uri https://seabreezequickstart.blob.core.windows.net/templates/azurefiles-volume/sbz_rp.windows.json
79
-
```
60
+
In a few minutes, your command should return with:
61
+
62
+
`counterApp has been deployed successfully on counterAppNetwork with public ip address <IP Address>`
80
63
81
-
Follow the prompts to enter the file share name, account name, and account key for the Azure File share that provides the volume. In a minute or so, your command should return with `"provisioningState": "Succeeded"`.
64
+
## Open the application
65
+
Once the application successfully deploys, get the public IP address for the service endpoint, and open it on a browser. It displays a web page with the counter value being updated every second.
82
66
83
-
The password parameter in the template is of `string` type for ease of use. It will be displayed on the screen in clear-text and in the deployment status.
67
+
The deployment command returns the public IP address of the service endpoint. Optionally, You can also query the network resource to find the public IP address of the service endpoint.
68
+
69
+
The network resource name for this application is `counterAppNetwork`, fetch information about it using the following command.
70
+
71
+
```azurecli-interactive
72
+
az mesh network show --resource-group myResourceGroup --name counterAppNetwork
73
+
```
84
74
85
75
## Verify that the application is able to use the volume
86
-
The application creates a file named _data.txt_ in the file share (if it does not exist already). The content of this file is a number that is incremented every 30 seconds by the application. To verify that the example works correctly, open the _data.txt_ file periodically and verify that the number is being updated.
76
+
The application creates a file named `counter.txt` in the file share inside `counter/counterService` folder. The content of this file is the counter value being displayed on the web page.
87
77
88
78
The file may be downloaded using any tool that enables browsing an Azure Files file share. The [Microsoft Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/) is an example of such a tool.
89
79
80
+
## Delete the resources
81
+
82
+
To conserve the limited resources assigned for the preview program, delete the resources frequently. To delete resources related to this example, delete the resource group in which they were deployed.
83
+
84
+
```azurecli-interactive
85
+
az group delete --resource-group myResourceGroup
86
+
```
87
+
90
88
## Next steps
91
89
92
-
- View the Azure Files volume sample application on [GitHub](https://github.com/Azure-Samples/service-fabric-mesh/tree/master/src/azurefiles-volume).
90
+
- View the Azure Files volume sample application on [GitHub](https://github.com/Azure-Samples/service-fabric-mesh/tree/master/src/counter).
93
91
- To learn more about Service Fabric Resource Model, see [Service Fabric Mesh Resource Model](service-fabric-mesh-service-fabric-resources.md).
94
92
- To learn more about Service Fabric Mesh, read the [Service Fabric Mesh overview](service-fabric-mesh-overview.md).
Copy file name to clipboardExpand all lines: articles/service-fabric-mesh/service-fabric-mesh-howto-deploy-app-private-registry.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Deploy app from a private registry to Azure Service Fabric Mesh | Microsoft Docs
3
3
description: Learn how to deploy an app that uses a private container registry to Service Fabric Mesh using the Azure CLI.
4
-
services: service-fabric
4
+
services: service-fabric-mesh
5
5
documentationcenter: .net
6
6
author: rwike77
7
7
manager: jeconnoc
@@ -34,7 +34,7 @@ Install Docker to support the containerized Service Fabric apps used by Service
34
34
35
35
Download and install the latest version of [Docker Community Edition for Windows][download-docker].
36
36
37
-
During the installation, select **Use Windows containers instead of Linux containers** when asked. You'll need to then sign out and sign back in. After logging back in, if you did not previously enable Hyper-V, you may be prompted to enable Hyper-V. You must enable Hyper-V and then restart your computer.
37
+
During the installation, select **Use Windows containers instead of Linux containers** when asked. You'll need to then sign out and sign back in. After logging back in, if you did not previously enable Hyper-V, you may be prompted to enable Hyper-V. Enable Hyper-V and then restart your computer.
38
38
39
39
After your computer has restarted, Docker will prompt you to enable the **Containers** feature, enable it and restart your computer.
40
40
@@ -111,8 +111,7 @@ Result
111
111
--------
112
112
1.1-alpine
113
113
```
114
-
115
-
This shows that `azure-mesh-helloworld:1.1-alpine` image is present in the private container registry.
114
+
The preceding output confirms the presence of `azure-mesh-helloworld:1.1-alpine` in the private container registry.
116
115
117
116
## Retrieve credentials for the registry
118
117
@@ -130,7 +129,8 @@ az acr credential show --name <acrName> --query username
130
129
az acr credential show --name <acrName> --query "passwords[0].value"
131
130
```
132
131
133
-
The values provided by preceding commands is referenced as `<acrLoginServer>`, `<acrUserName>`, and `<acrPassword>` in the following command.
132
+
The values provided by preceding commands are referenced as `<acrLoginServer>`, `<acrUserName>`, and `<acrPassword>` in the following command.
133
+
134
134
135
135
## Deploy the template
136
136
@@ -139,17 +139,17 @@ Create the application and related resources using the following command, and pr
139
139
The `registry-password` parameter in the template is a `securestring`. It will not be displayed in the deployment status and `az mesh service show` commands. Ensure that it is correctly specified in the following command.
In a few minutes, your command should return with:
146
146
147
147
`helloWorldPrivateRegistryApp has been deployed successfully on helloWorldPrivateRegistryNetwork with public ip address <IP Address>`
148
148
149
149
## Open the application
150
-
Once the application successfully deploys, get the public IP address for the service endpoint, and open it on a browser. It should display a web page with Service Fabric Mesh logo.
150
+
Once the application successfully deploys, get the public IP address for the service endpoint, and open it on a browser. It displays a web page with Service Fabric Mesh logo.
151
151
152
-
The deployment command returns the public IP address of the service endpoint. You can also query the network resource to find the public IP address of the service endpoint.
152
+
The deployment command returns the public IP address of the service endpoint. Optionally, You can also query the network resource to find the public IP address of the service endpoint.
153
153
154
154
The network resource name for this application is `helloWorldPrivateRegistryNetwork`, fetch information about it using the following command.
Copy file name to clipboardExpand all lines: articles/service-fabric-mesh/service-fabric-mesh-howto-deploy-app-template.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Deploy an app to Azure Service Fabric Mesh using a template | Microsoft Docs
3
3
description: Learn how to deploy a .NET Core application to Service Fabric Mesh from a template using the Azure CLI.
4
-
services: service-fabric
4
+
services: service-fabric-mesh
5
5
documentationcenter: .net
6
6
author: rwike77
7
7
manager: timlt
@@ -49,28 +49,28 @@ The preceding command deploys a Windows application using [mesh_rp.windows.json
49
49
50
50
In a few minutes, your command should return with:
51
51
52
-
`VotingApp has been deployed successfully on VotingAppNetwork with public ip address <IP address>.`
53
-
54
-
For example, the IP address is 13.68.129.22.
52
+
`VotingApp has been deployed successfully on VotingAppNetwork with public ip address <IP address>`
55
53
56
54
## Open the application
57
-
Once the application successfully deploys, connect to the endpoint of the service (13.68.129.22, from the preceding example) in a browser.
55
+
Once the application successfully deploys, get the public IP address for the service endpoint, and open it on a browser. It displays following web page.
You can now add voting options to the application and vote on it, or delete the voting options.
62
60
63
-
## Check the application details
64
-
You can check the application's status using the `app show` command. The application name for the deployed application is "VotingApp", so fetch its details.
61
+
The deployment command returns the public IP address of the service endpoint. Optionally, You can also query the network resource to find the public IP address of the service endpoint.
62
+
63
+
The network resource name for this application is `VotingAppNetwork`, fetch information about it using the following command.
65
64
66
65
```azurecli-interactive
67
-
az mesh app show --resource-group myResourceGroup --name VotingApp
66
+
az mesh network show --resource-group myResourceGroup --name VotingAppNetwork
68
67
```
69
68
70
-
You can also query the network resource to find the IP address of the container where the service is deployed by running the 'az mesh network show' command:
69
+
## Check the application details
70
+
You can check the application's status using the `app show` command. The application name for the deployed application is "VotingApp", so fetch its details.
71
71
72
72
```azurecli-interactive
73
-
az mesh network show --resource-group myResourceGroup --name VotingAppNetwork
73
+
az mesh app show --resource-group myResourceGroup --name VotingApp
0 commit comments