Skip to content

Instantly share code, notes, and snippets.

@kpietralik
Last active July 17, 2018 21:01
Show Gist options
  • Save kpietralik/751ff946be1b767cd521892733010375 to your computer and use it in GitHub Desktop.
Save kpietralik/751ff946be1b767cd521892733010375 to your computer and use it in GitHub Desktop.
Service Fabric Mesh - Minecraft
{
"$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."
}
}
},
"resources": [
{
"apiVersion": "2018-07-01-preview",
"name": "mcNetwork",
"type": "Microsoft.ServiceFabricMesh/networks",
"location": "[parameters('location')]",
"dependsOn": [],
"properties": {
"addressPrefix": "10.0.0.4/22",
"ingressConfig": {
"layer4": [
{
"name": "mcIngress",
"publicPort": "80",
"applicationName": "mcApp",
"serviceName": "mcService",
"endpointName": "mcListener"
}
]
}
}
},
{
"apiVersion": "2018-07-01-preview",
"name": "mcApp",
"type": "Microsoft.ServiceFabricMesh/applications",
"location": "[parameters('location')]",
"dependsOn": [
"Microsoft.ServiceFabricMesh/networks/mcNetwork"
],
"properties": {
"description": "Service Fabric Mesh mc Application!",
"services": [
{
"type": "Microsoft.ServiceFabricMesh/services",
"location": "[parameters('location')]",
"name": "mcService",
"properties": {
"description": "Service Fabric Mesh Hello World Service.",
"osType": "linux",
"codePackages": [
{
"name": "mcCode",
"image": "itzg/minecraft-server",
"endpoints": [
{
"name": "mcListener",
"port": "80"
}
],
"resources": {
"requests": {
"cpu": "2",
"memoryInGB": "4"
}
}
}
],
"replicaCount": "1",
"networkRefs": [
{
"name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'mcNetwork')]"
}
]
}
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment