From c1c473f15da06c3400d84cd1295f9433f223d064 Mon Sep 17 00:00:00 2001 From: Vipul Modi - MSFT Date: Wed, 19 Sep 2018 13:23:08 -0700 Subject: [PATCH 1/5] change the API version to 2018-09-01-preview --- templates/counter/mesh_rp.linux.json | 6 +++--- templates/counter/mesh_rp.windows.json | 6 +++--- templates/helloworld/mesh_rp.linux.json | 4 ++-- templates/helloworld/mesh_rp.private_registry.linux.json | 4 ++-- templates/helloworld/mesh_rp.windows.json | 4 ++-- templates/todolist/mesh_rp.windows.json | 4 ++-- templates/visualobjects/mesh_rp.base.linux.json | 4 ++-- templates/visualobjects/mesh_rp.base.windows.json | 4 ++-- templates/visualobjects/mesh_rp.scaleout.linux.json | 4 ++-- templates/visualobjects/mesh_rp.scaleout.windows.json | 4 ++-- templates/visualobjects/mesh_rp.upgrade.linux.json | 4 ++-- templates/visualobjects/mesh_rp.upgrade.windows.json | 4 ++-- templates/voting/mesh_rp.linux.json | 4 ++-- templates/voting/mesh_rp.windows.json | 4 ++-- 14 files changed, 30 insertions(+), 30 deletions(-) diff --git a/templates/counter/mesh_rp.linux.json b/templates/counter/mesh_rp.linux.json index 07d0687e..fbdf2b88 100644 --- a/templates/counter/mesh_rp.linux.json +++ b/templates/counter/mesh_rp.linux.json @@ -36,7 +36,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "counterApp", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", @@ -94,7 +94,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "counterAppNetwork", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -116,7 +116,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "counterVolume", "type": "Microsoft.ServiceFabricMesh/volumes", "location": "[parameters('location')]", diff --git a/templates/counter/mesh_rp.windows.json b/templates/counter/mesh_rp.windows.json index 22e738d6..28c42f6b 100644 --- a/templates/counter/mesh_rp.windows.json +++ b/templates/counter/mesh_rp.windows.json @@ -36,7 +36,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "counterAppWindows", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", @@ -94,7 +94,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "counterAppWindowsNetwork", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -116,7 +116,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "counterVolumeWindows", "type": "Microsoft.ServiceFabricMesh/volumes", "location": "[parameters('location')]", diff --git a/templates/helloworld/mesh_rp.linux.json b/templates/helloworld/mesh_rp.linux.json index 2f3b6362..3ac63c57 100644 --- a/templates/helloworld/mesh_rp.linux.json +++ b/templates/helloworld/mesh_rp.linux.json @@ -11,7 +11,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "helloWorldNetwork", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -32,7 +32,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "helloWorldApp", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", diff --git a/templates/helloworld/mesh_rp.private_registry.linux.json b/templates/helloworld/mesh_rp.private_registry.linux.json index 01bd2305..2963cf28 100644 --- a/templates/helloworld/mesh_rp.private_registry.linux.json +++ b/templates/helloworld/mesh_rp.private_registry.linux.json @@ -29,7 +29,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "helloWorldPrivateRegistryNetwork", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -49,7 +49,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "helloWorldPrivateRegistryApp", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", diff --git a/templates/helloworld/mesh_rp.windows.json b/templates/helloworld/mesh_rp.windows.json index 96f193aa..96c0d5bd 100644 --- a/templates/helloworld/mesh_rp.windows.json +++ b/templates/helloworld/mesh_rp.windows.json @@ -11,7 +11,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "helloWorldNetworkWindows", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -31,7 +31,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "helloWorldAppWindows", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", diff --git a/templates/todolist/mesh_rp.windows.json b/templates/todolist/mesh_rp.windows.json index 9b87f2b1..33922a6e 100644 --- a/templates/todolist/mesh_rp.windows.json +++ b/templates/todolist/mesh_rp.windows.json @@ -89,7 +89,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "todolistapp", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", @@ -195,7 +195,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "todolistappNetwork", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", diff --git a/templates/visualobjects/mesh_rp.base.linux.json b/templates/visualobjects/mesh_rp.base.linux.json index 1c7d67b3..27d75fc3 100644 --- a/templates/visualobjects/mesh_rp.base.linux.json +++ b/templates/visualobjects/mesh_rp.base.linux.json @@ -11,7 +11,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsNetwork", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -32,7 +32,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsApp", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", diff --git a/templates/visualobjects/mesh_rp.base.windows.json b/templates/visualobjects/mesh_rp.base.windows.json index 895a4f98..1be8006c 100644 --- a/templates/visualobjects/mesh_rp.base.windows.json +++ b/templates/visualobjects/mesh_rp.base.windows.json @@ -11,7 +11,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsNetworkWindows", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -32,7 +32,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsAppWindows", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", diff --git a/templates/visualobjects/mesh_rp.scaleout.linux.json b/templates/visualobjects/mesh_rp.scaleout.linux.json index 5a4e5ad5..5e41c314 100644 --- a/templates/visualobjects/mesh_rp.scaleout.linux.json +++ b/templates/visualobjects/mesh_rp.scaleout.linux.json @@ -11,7 +11,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsNetwork", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -32,7 +32,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsApp", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", diff --git a/templates/visualobjects/mesh_rp.scaleout.windows.json b/templates/visualobjects/mesh_rp.scaleout.windows.json index 5f5e8dc6..1e9c7895 100644 --- a/templates/visualobjects/mesh_rp.scaleout.windows.json +++ b/templates/visualobjects/mesh_rp.scaleout.windows.json @@ -11,7 +11,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsNetworkWindows", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -32,7 +32,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsAppWindows", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", diff --git a/templates/visualobjects/mesh_rp.upgrade.linux.json b/templates/visualobjects/mesh_rp.upgrade.linux.json index 54f78de7..2311d7f5 100644 --- a/templates/visualobjects/mesh_rp.upgrade.linux.json +++ b/templates/visualobjects/mesh_rp.upgrade.linux.json @@ -11,7 +11,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsNetwork", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -32,7 +32,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsApp", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", diff --git a/templates/visualobjects/mesh_rp.upgrade.windows.json b/templates/visualobjects/mesh_rp.upgrade.windows.json index 9215d787..1b500b9a 100644 --- a/templates/visualobjects/mesh_rp.upgrade.windows.json +++ b/templates/visualobjects/mesh_rp.upgrade.windows.json @@ -11,7 +11,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsNetworkWindows", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -32,7 +32,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "visualObjectsAppWindows", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", diff --git a/templates/voting/mesh_rp.linux.json b/templates/voting/mesh_rp.linux.json index b2534fb9..f09e8338 100644 --- a/templates/voting/mesh_rp.linux.json +++ b/templates/voting/mesh_rp.linux.json @@ -11,7 +11,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "votingapp-network-linux", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -33,7 +33,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "votingapp-linux", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", diff --git a/templates/voting/mesh_rp.windows.json b/templates/voting/mesh_rp.windows.json index 8b929d41..7b732885 100644 --- a/templates/voting/mesh_rp.windows.json +++ b/templates/voting/mesh_rp.windows.json @@ -11,7 +11,7 @@ }, "resources": [ { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "VotingAppNetwork", "type": "Microsoft.ServiceFabricMesh/networks", "location": "[parameters('location')]", @@ -33,7 +33,7 @@ } }, { - "apiVersion": "2018-07-01-preview", + "apiVersion": "2018-09-01-preview", "name": "VotingApp", "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", From 9f9ff8351ee1663f89daf2020e41cb382c8034bc Mon Sep 17 00:00:00 2001 From: Vipul Modi - MSFT Date: Wed, 19 Sep 2018 22:36:13 -0700 Subject: [PATCH 2/5] Use secret resource for the ACR password. The ACR server name should be appended to the image name. --- .../mesh_rp.private_registry.linux.json | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/templates/helloworld/mesh_rp.private_registry.linux.json b/templates/helloworld/mesh_rp.private_registry.linux.json index 2963cf28..4e5f28a6 100644 --- a/templates/helloworld/mesh_rp.private_registry.linux.json +++ b/templates/helloworld/mesh_rp.private_registry.linux.json @@ -28,6 +28,30 @@ } }, "resources": [ + { + "apiVersion": "2018-09-01-preview", + "name": "hellowWorld_acr_password", + "type": "Microsoft.ServiceFabricMesh/secrets", + "location": "[parameters('location')]", + "dependsOn": [], + "properties": { + "kind": "inlinedValue", + "contentType": "text/plain", + "description": "Azure container registry password." + } + }, + { + "apiVersion": "2018-09-01-preview", + "name": "hellowWorld_acr_password/v1", + "type": "Microsoft.ServiceFabricMesh/secrets/values", + "location": "[parameters('location')]", + "dependsOn": [ + "Microsoft.ServiceFabricMesh/secrets/hellowWorld_acr_password" + ], + "properties": { + "value": "[parameters('registry-password')]" + } + }, { "apiVersion": "2018-09-01-preview", "name": "helloWorldPrivateRegistryNetwork", @@ -54,7 +78,8 @@ "type": "Microsoft.ServiceFabricMesh/applications", "location": "[parameters('location')]", "dependsOn": [ - "Microsoft.ServiceFabricMesh/networks/helloWorldPrivateRegistryNetwork" + "Microsoft.ServiceFabricMesh/networks/helloWorldPrivateRegistryNetwork", + "Microsoft.ServiceFabricMesh/secrets/hellowWorld_acr_password/values/v1" ], "properties": { "description": "SeaBreeze example application with container deployed from private image registry.", @@ -69,11 +94,11 @@ "codePackages": [ { "name": "helloWorldCode", - "image": "azure-mesh-helloworld:1.1-alpine", + "image": "[concat(parameters('registry-server'), '/seabreeze/azure-mesh-helloworld:1.1-alpine')]", "imageRegistryCredential": { "server": "[parameters('registry-server')]", "username": "[parameters('registry-username')]", - "password": "[parameters('registry-password')]" + "password": "[resourceId('Microsoft.ServiceFabricMesh/secrets/values','hellowWorld_acr_password','v1')]" }, "endpoints": [ { From 52378490d10f0180cae10cfd55ca819f76089038 Mon Sep 17 00:00:00 2001 From: Vipul Modi - MSFT Date: Thu, 20 Sep 2018 10:07:29 -0700 Subject: [PATCH 3/5] add description and windows file for private registry --- templates/helloworld/mesh_rp.linux.json | 3 +- .../mesh_rp.private_registry.linux.json | 5 +- .../mesh_rp.private_registry.windows.json | 130 ++++++++++++++++++ templates/helloworld/mesh_rp.windows.json | 3 +- 4 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 templates/helloworld/mesh_rp.private_registry.windows.json diff --git a/templates/helloworld/mesh_rp.linux.json b/templates/helloworld/mesh_rp.linux.json index 3ac63c57..82cc8ed9 100644 --- a/templates/helloworld/mesh_rp.linux.json +++ b/templates/helloworld/mesh_rp.linux.json @@ -17,6 +17,7 @@ "location": "[parameters('location')]", "dependsOn": [], "properties": { + "description": "Service Fabric Mesh network for HelloWorld sample.", "addressPrefix": "10.0.0.4/22", "ingressConfig": { "layer4": [ @@ -40,7 +41,7 @@ "Microsoft.ServiceFabricMesh/networks/helloWorldNetwork" ], "properties": { - "description": "Service Fabric Mesh HelloWorld Application!", + "description": "Service Fabric Mesh HelloWorld application.", "services": [ { "type": "Microsoft.ServiceFabricMesh/services", diff --git a/templates/helloworld/mesh_rp.private_registry.linux.json b/templates/helloworld/mesh_rp.private_registry.linux.json index 4e5f28a6..f5369c31 100644 --- a/templates/helloworld/mesh_rp.private_registry.linux.json +++ b/templates/helloworld/mesh_rp.private_registry.linux.json @@ -60,6 +60,7 @@ "dependsOn": [], "properties": { "addressPrefix": "10.0.0.4/22", + "description": "Service Fabric Mesh network for HelloWorld sample with private registry support.", "ingressConfig": { "layer4": [ { @@ -82,14 +83,14 @@ "Microsoft.ServiceFabricMesh/secrets/hellowWorld_acr_password/values/v1" ], "properties": { - "description": "SeaBreeze example application with container deployed from private image registry.", + "description": "Service Fabric Mesh HelloWorld application with container deployed from private registry.", "services": [ { "type": "Microsoft.ServiceFabricMesh/services", "location": "[parameters('location')]", "name": "helloWorldService", "properties": { - "description": "SeaBreeze example service with container deployed from private image registry.", + "description": "Service Fabric Mesh HelloWorld service with container deployed from private registry.", "osType": "linux", "codePackages": [ { diff --git a/templates/helloworld/mesh_rp.private_registry.windows.json b/templates/helloworld/mesh_rp.private_registry.windows.json new file mode 100644 index 00000000..d8d775b9 --- /dev/null +++ b/templates/helloworld/mesh_rp.private_registry.windows.json @@ -0,0 +1,130 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Location of the resources (e.g. westus, eastus, westeurope)." + } + }, + "registry-server": { + "type": "string", + "metadata": { + "description": "Private image registry server. For example, .azurecr.io" + } + }, + "registry-username": { + "type": "string", + "metadata": { + "description": "User name for the private image registry server. For Azure Container Registry the CLI command 'az acr credential show --name --query \"username\"' will show the username." + } + }, + "registry-password": { + "type": "securestring", + "metadata": { + "description": "Password for the private image registry server. For Azure Container Registry the CLI command 'az acr credential show --name --query \"passwords[0].value\"' will show the password." + } + } + }, + "resources": [ + { + "apiVersion": "2018-09-01-preview", + "name": "hellowWorld_acr_password", + "type": "Microsoft.ServiceFabricMesh/secrets", + "location": "[parameters('location')]", + "dependsOn": [], + "properties": { + "kind": "inlinedValue", + "contentType": "text/plain", + "description": "Azure container registry password." + } + }, + { + "apiVersion": "2018-09-01-preview", + "name": "hellowWorld_acr_password/v1", + "type": "Microsoft.ServiceFabricMesh/secrets/values", + "location": "[parameters('location')]", + "dependsOn": [ + "Microsoft.ServiceFabricMesh/secrets/hellowWorld_acr_password" + ], + "properties": { + "value": "[parameters('registry-password')]" + } + }, + { + "apiVersion": "2018-09-01-preview", + "name": "helloWorldPrivateRegistryNetworkWindows", + "type": "Microsoft.ServiceFabricMesh/networks", + "location": "[parameters('location')]", + "dependsOn": [], + "properties": { + "description": "Service Fabric Mesh network for HelloWorld windows sample with private registry support.", + "addressPrefix": "10.0.0.4/22", + "ingressConfig": { + "layer4": [ + { + "publicPort": "80", + "applicationName": "helloWorldPrivateRegistryAppWindows", + "serviceName": "helloWorldService", + "endpointName": "helloWorldListener" + } + ] + } + } + }, + { + "apiVersion": "2018-09-01-preview", + "name": "helloWorldPrivateRegistryAppWindows", + "type": "Microsoft.ServiceFabricMesh/applications", + "location": "[parameters('location')]", + "dependsOn": [ + "Microsoft.ServiceFabricMesh/networks/helloWorldPrivateRegistryNetworkWindows", + "Microsoft.ServiceFabricMesh/secrets/hellowWorld_acr_password/values/v1" + ], + "properties": { + "description": "Service Fabric Mesh HelloWorld windows application with container deployed from private registry.", + "services": [ + { + "type": "Microsoft.ServiceFabricMesh/services", + "location": "[parameters('location')]", + "name": "helloWorldService", + "properties": { + "description": "Service Fabric Mesh HelloWorld windows service with container deployed from private registry.", + "osType": "Windows", + "codePackages": [ + { + "name": "helloWorldCode", + "image": "[concat(parameters('registry-server'), '/seabreeze/azure-mesh-helloworld:1.1-windowsservercore-1709')]", + "imageRegistryCredential": { + "server": "[parameters('registry-server')]", + "username": "[parameters('registry-username')]", + "password": "[resourceId('Microsoft.ServiceFabricMesh/secrets/values','hellowWorld_acr_password','v1')]" + }, + "endpoints": [ + { + "name": "helloWorldListener", + "port": "80" + } + ], + "resources": { + "requests": { + "cpu": "1", + "memoryInGB": "1" + } + } + } + ], + "replicaCount": "1", + "networkRefs": [ + { + "name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'helloWorldPrivateRegistryNetworkWindows')]" + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/templates/helloworld/mesh_rp.windows.json b/templates/helloworld/mesh_rp.windows.json index 96c0d5bd..1e4c6a1c 100644 --- a/templates/helloworld/mesh_rp.windows.json +++ b/templates/helloworld/mesh_rp.windows.json @@ -17,6 +17,7 @@ "location": "[parameters('location')]", "dependsOn": [], "properties": { + "description": "Service Fabric Mesh network for HelloWorld windows sample.", "addressPrefix": "10.0.0.4/22", "ingressConfig": { "layer4": [ @@ -39,7 +40,7 @@ "Microsoft.ServiceFabricMesh/networks/helloWorldNetworkWindows" ], "properties": { - "description": "Service Fabric Mesh HelloWorld Application!", + "description": "Service Fabric Mesh HelloWorld windows application.", "services": [ { "type": "Microsoft.ServiceFabricMesh/services", From b36acb585c653375058b7f417e5bec85f92f04ae Mon Sep 17 00:00:00 2001 From: Vipul Modi - MSFT Date: Fri, 21 Sep 2018 16:59:11 -0700 Subject: [PATCH 4/5] counter with service fabric volume driver --- templates/counter/mesh_rp.sfvolume.linux.json | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 templates/counter/mesh_rp.sfvolume.linux.json diff --git a/templates/counter/mesh_rp.sfvolume.linux.json b/templates/counter/mesh_rp.sfvolume.linux.json new file mode 100644 index 00000000..9364905e --- /dev/null +++ b/templates/counter/mesh_rp.sfvolume.linux.json @@ -0,0 +1,104 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "metadata": { + "description": "Location of the resources (e.g. westus, eastus, westeurope)." + } + }, + "stateFolderName": { + "type": "string", + "defaultValue": "CounterService", + "metadata": { + "description": "Folder in which to store the state. Provide a empty value to create a unique folder for each container to store the state. A non-empty value will retain the state across deployments, however if more than one applications are using the same folder, the counter may update more frequently." + } + } + }, + "resources": [ + { + "apiVersion": "2018-09-01-preview", + "name": "sfVolCounterApp", + "type": "Microsoft.ServiceFabricMesh/applications", + "location": "[parameters('location')]", + "dependsOn": [ + "Microsoft.ServiceFabricMesh/networks/sfVolCounterAppNetwork" + ], + "properties": { + "description": "Azure Service Fabric Mesh sample counter application using SF Volume Disk", + "services": [ + { + "name": "counterService", + "properties": { + "description": "A web service that serves the counter value stored in the Service Fabric volume disk.", + "osType": "linux", + "codePackages": [ + { + "name": "counterService", + "image": "seabreeze/azure-mesh-counter:0.1-alpine", + "volumes": [ + { + "name": "sfvol", + "creationParameters": { + "kind": "ServiceFabricVolumeDisk", + "sizeDisk": "Small" + }, + "destinationPath": "/app/data" + } + ], + "endpoints": [ + { + "name": "counterServiceListener", + "port": 80 + } + ], + "environmentVariables": [ + { + "name": "STATE_FOLDER_NAME", + "value": "[parameters('stateFolderName')]" + } + ], + "resources": { + "requests": { + "cpu": 0.5, + "memoryInGB": 0.5 + } + } + } + ], + "replicaCount": 1, + "networkRefs": [ + { + "name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'sfVolCounterAppNetwork')]" + } + ] + } + } + ] + } + }, + { + "apiVersion": "2018-09-01-preview", + "name": "sfVolCounterAppNetwork", + "type": "Microsoft.ServiceFabricMesh/networks", + "location": "[parameters('location')]", + "dependsOn": [], + "properties": { + "description": "Azure Service Fabric Mesh Counter Application network.", + "addressPrefix": "10.0.0.4/22", + "ingressConfig": { + "layer4": [ + { + "name": "counterServiceIngress", + "publicPort": "80", + "applicationName": "sfVolCounterApp", + "serviceName": "counterService", + "endpointName": "counterServiceListener" + } + ] + } + } + } + ] +} From b35475947408ebf48b04bbcdf0be35a1956fe870 Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Fri, 21 Sep 2018 19:53:54 -0700 Subject: [PATCH 5/5] Voting App with ReliableCollections for linux --- templates/voting-rc/mesh_rp.voting.linux.json | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 templates/voting-rc/mesh_rp.voting.linux.json diff --git a/templates/voting-rc/mesh_rp.voting.linux.json b/templates/voting-rc/mesh_rp.voting.linux.json new file mode 100644 index 00000000..89ab629f --- /dev/null +++ b/templates/voting-rc/mesh_rp.voting.linux.json @@ -0,0 +1,133 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [ + { + "type": "Microsoft.ServiceFabricMesh/applications", + "apiVersion": "2018-09-01-preview", + "name": "votinglinuxv9", + "location": "eastus", + "properties": { + "services": [ + { + "name": "VotingWeb", + "properties": { + "description": "VotingWeb description", + "osType": "linux", + "codePackages": [ + { + "name": "VotingWeb", + "image": " kailaslokhande/votingweb:linux_mv4", + "endpoints": [ + { + "name": "VotingWebListener", + "port": "80" + } + ], + "environmentVariables": [ + { + "name": "ASPNETCORE_URLS", + "value": "http://+:80" + }, + { + "name": "Voting_BackendHostName", + "value": "votingdata.votinglinuxv9" + }, + { + "name": "Voting_BackendHostPort", + "value": "8288" + } + ], + "resources": { + "requests": { + "cpu": 0.5, + "memoryInGB": 1.0 + } + } + } + ], + "replicaCount": 1, + "networkRefs":[ + { + "name":"[resourceId('Microsoft.ServiceFabricMesh/networks', 'votingnetworkmridul')]" + } + ] + } + }, + { + "name": "VotingData", + "properties": { + "description": "VotingData backend service", + "osType": "linux", + "codePackages": [ + { + "name": "VotingData", + "image": "kailaslokhande/votingdata:mridul_v2", + "endpoints": [ + { + "name": "VotingDataListener", + "port": "8288" + } + ], + "environmentVariables": [ + { + "name": "ASPNETCORE_URLS", + "value": "http://+:8288" + }, + { + "name": "SF_FORCE_NAMED_PARTITION", + "value": "1" + } + ], + "resources": { + "requests": { + "cpu": "1.0", + "memoryInGB": "1.0" + } + }, + "reliableCollectionsRefs": [ + { + "name": "SeaBreezeDemoCollection" + } + ] + } + ], + "replicaCount": "3", + "networkRefs":[ + { + "name":"[resourceId('Microsoft.ServiceFabricMesh/networks', 'votingnetworkmridul')]" + } + ] + } + } + ], + "description": "Mesh Voting App", + "dependsOn":[ + "Microsoft.ServiceFabricMesh/networks/votingnetworkmridul" + ] + } + }, + { + "type": "Microsoft.ServiceFabricMesh/networks", + "name": "votingnetworkmridul", + "apiVersion": "2018-09-01-preview", + "location": "eastus", + "properties": { + "description": "Azure Service Fabric Mesh Counter Application network.", + "addressPrefix": "10.0.0.4/22", + "ingressConfig": { + "layer4": [ + { + "name": "votingIngressMridul", + "publicPort": "80", + "applicationName": "votinglinuxv9", + "serviceName": "VotingWeb", + "endpointName": "VotingWebListener" + } + ] + } + }, + "dependsOn": [] + } + ] +}