Last active
January 8, 2019 16:08
-
-
Save suneetnangia/7b0857ed69e89abb6b7fe6d166a83bc8 to your computer and use it in GitHub Desktop.
Minecraft Windows 1803 Container on Service Fabric Mesh
This file contains 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": "WestEurope", | |
"metadata": { | |
"description": "Location of the resources (e.g. westus, eastus, westeurope)." | |
} | |
} | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "2018-09-01-preview", | |
"name": "MinecraftNet", | |
"type": "Microsoft.ServiceFabricMesh/networks", | |
"location": "[parameters('location')]", | |
"dependsOn": [], | |
"properties": { | |
"kind": "Local", | |
"description": "Azure Service Fabric Mesh Minecraft Application network.", | |
"networkAddressPrefix": "10.0.0.0/24" | |
} | |
}, | |
{ | |
"apiVersion": "2018-09-01-preview", | |
"name": "MinecraftServerApp", | |
"type": "Microsoft.ServiceFabricMesh/applications", | |
"location": "[parameters('location')]", | |
"dependsOn": [ | |
"Microsoft.ServiceFabricMesh/networks/MinecraftNet" | |
], | |
"properties": { | |
"description": "Service Fabric Mesh MineCraft Application!", | |
"services": [ | |
{ | |
"type": "Microsoft.ServiceFabricMesh/services", | |
"location": "[parameters('location')]", | |
"name": "MinecraftServerSvc", | |
"properties": { | |
"description": "Service Fabric Mesh Minecraft Service.", | |
"osType": "windows", | |
"codePackages": [ | |
{ | |
"name": "code", | |
"image": "openhack/minecraft-server:1.0-nanoserver-1803", | |
"volumes": [ | |
{ | |
"name": "sfvol", | |
"creationParameters": { | |
"kind": "ServiceFabricVolumeDisk", | |
"sizeDisk": "Small" | |
}, | |
"destinationPath": "C:\\data" | |
} | |
], | |
"endpoints": [ | |
{ | |
"name": "minecraftListener", | |
"port": "25565" | |
}, | |
{ | |
"name": "minecraftAPIListener", | |
"port": "25575" | |
} | |
], | |
"environmentVariables": [ | |
{ | |
"name": "EULA", | |
"value": "TRUE" | |
} | |
], | |
"resources": { | |
"requests": { | |
"cpu": "2", | |
"memoryInGB": "2" | |
} | |
} | |
} | |
], | |
"replicaCount": "1", | |
"networkRefs": [ | |
{ | |
"name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'MinecraftNet')]", | |
"endpointRefs": [ | |
{ | |
"name": "minecraftListener" | |
}, | |
{ | |
"name": "minecraftAPIListener" | |
} | |
] | |
} | |
] | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"apiVersion": "2018-09-01-preview", | |
"name": "MinecraftGateway", | |
"type": "Microsoft.ServiceFabricMesh/gateways", | |
"location": "[parameters('location')]", | |
"dependsOn": [ | |
"Microsoft.ServiceFabricMesh/networks/MinecraftNet" | |
], | |
"properties": { | |
"description": "Service Fabric Mesh Gateway for Minecraft.", | |
"sourceNetwork": { | |
"name": "Open" | |
}, | |
"destinationNetwork": { | |
"name": "[resourceId('Microsoft.ServiceFabricMesh/networks', 'MinecraftNet')]" | |
}, | |
"tcp": [ | |
{ | |
"name": "Public", | |
"port": 25565, | |
"destination": { | |
"applicationName": "MinecraftServerApp", | |
"serviceName": "MinecraftServerSvc", | |
"endpointName": "minecraftListener" | |
} | |
}, | |
{ | |
"name": "Public", | |
"port": 25575, | |
"destination": { | |
"applicationName": "MinecraftServerApp", | |
"serviceName": "MinecraftServerSvc", | |
"endpointName": "minecraftAPIListener" | |
} | |
} | |
] | |
} | |
} | |
], | |
"outputs": { | |
"publicIPAddress": { | |
"value": "[reference('MinecraftGateway').ipAddress]", | |
"type": "string" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment