Skip to content

Instantly share code, notes, and snippets.

@andreujuanc
Last active April 15, 2019 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreujuanc/707f6c0ce1548675f978c5e6b98b7490 to your computer and use it in GitHub Desktop.
Save andreujuanc/707f6c0ce1548675f978c5e6b98b7490 to your computer and use it in GitHub Desktop.
MeshDemoTemplate1
{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location of the resources (e.g. westus, eastus, westeurope)."
}
}
},
"resources": [
{
"apiVersion": "2018-09-01-preview",
"name": "helloWorldNetworkWindows",
"type": "Microsoft.ServiceFabricMesh/networks",
"location": "[parameters('location')]",
"dependsOn": [],
"properties": {
"kind": "Local",
"description": "Service Fabric Mesh Network for HelloWorld Window sample.",
"networkAddressPrefix": "10.0.0.0/24"
}
},
{
"apiVersion": "2018-09-01-preview",
"name": "helloWorldGatewayWindows",
"type": "Microsoft.ServiceFabricMesh/gateways",
"location": "[parameters('location')]",
"tags": {},
"dependsOn": [
"Microsoft.ServiceFabricMesh/networks/helloWorldNetworkWindows"
],
"properties": {
"description": "Service Fabric Mesh Gateway for HelloWorld Windows sample.",
"sourceNetwork": {
"name": "Open"
},
"destinationNetwork": {
"name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'helloWorldNetworkWindows')]"
},
"tcp": [
{
"name": "web",
"port": 80,
"destination": {
"applicationName": "helloWorldAppWindows",
"serviceName": "helloWorldService",
"endpointName": "helloWorldListener"
}
}
]
}
},
{
"apiVersion": "2018-09-01-preview",
"name": "helloWorldAppWindows",
"type": "Microsoft.ServiceFabricMesh/applications",
"location": "[parameters('location')]",
"dependsOn": [
"Microsoft.ServiceFabricMesh/networks/helloWorldNetworkWindows"
],
"properties": {
"description": "Service Fabric Mesh HelloWorld Windows Application.",
"services": [
{
"type": "Microsoft.ServiceFabricMesh/services",
"name": "helloWorldService",
"properties": {
"description": "Service Fabric Mesh Hello World Service.",
"osType": "windows",
"codePackages": [
{
"name": "helloWorldCode",
"image": "seabreeze/azure-mesh-helloworld:1.1-windowsservercore-1709",
"endpoints": [
{
"name": "helloWorldListener",
"port": "80"
}
],
"resources": {
"requests": {
"cpu": "1",
"memoryInGB": "1"
}
}
}
],
"replicaCount": "1",
"networkRefs": [
{
"name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'helloWorldNetworkWindows')]",
"endpointRefs": [
{
"name": "helloWorldListener"
}
]
}
]
}
}
]
}
}
],
"outputs": {
"publicIPAddress": {
"value": "[reference('helloWorldGatewayWindows').ipAddress]",
"type": "string"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment