Last active
April 15, 2019 14:19
-
-
Save andreujuanc/9f7d94573a2068e39ecc1eb2c0e40216 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$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)." | |
} | |
}, | |
"registryPassword": { | |
"defaultValue": "", | |
"type": "SecureString", | |
"metadata": { | |
"description": "Password for the private image registry server. For Azure Container Registry the CLI command 'az acr credential show --name <myacr> --query \"passwords[0].value\"' will show the password." | |
} | |
}, | |
"registryUserName": { | |
"defaultValue": "", | |
"type": "string", | |
"metadata": { | |
"description": "User name for the private image registry server. For Azure Container Registry the CLI command 'az acr credential show --name <myacr> --query \"username\"' will show the username." | |
} | |
}, | |
"registryServer": { | |
"defaultValue": "", | |
"type": "string", | |
"metadata": { | |
"description": "Private image registry server. For example, jcademos.azurecr.io " | |
} | |
}, | |
"imageName": { | |
"defaultValue": "", | |
"type": "string", | |
"metadata": { | |
"description": "le image with server. jcademos.azurecr.io/web1:latest" | |
} | |
} | |
}, | |
"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": "[parameters('imageName')]", | |
"imageRegistryCredential": { | |
"server": "[parameters('registryServer')]", | |
"username": "[parameters('registryUserName')]", | |
"password": "[parameters('registryPassword')]" | |
}, | |
"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