Last active
April 26, 2018 10:31
-
-
Save PlagueHO/2e3307a21802a97f2db46be7c8f1b984 to your computer and use it in GitHub Desktop.
ARM Template to Install an Azure Container Instance with a Linux Container that requires persistent storage (for example GoCD-Server)
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": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"containername": { | |
"type": "string" | |
}, | |
"containerimage": { | |
"type": "string" | |
}, | |
"cpu": { | |
"type": "int" | |
}, | |
"memoryingb": { | |
"type": "string" | |
}, | |
"containerport": { | |
"type": "string" | |
}, | |
"sharename": { | |
"type": "string" | |
}, | |
"storageaccountname": { | |
"type": "string" | |
}, | |
"storageaccountkey": { | |
"type": "securestring" | |
}, | |
"volumename": { | |
"type": "string" | |
}, | |
"mountpoint": { | |
"type": "string" | |
} | |
}, | |
"resources": [{ | |
"name": "[parameters('containername')]", | |
"type": "Microsoft.ContainerInstance/containerGroups", | |
"apiVersion": "2018-04-01", | |
"location": "[resourceGroup().location]", | |
"properties": { | |
"containers": [{ | |
"name": "[parameters('containername')]", | |
"properties": { | |
"image": "[parameters('containerimage')]", | |
"ports": [{ | |
"port": "[parameters('containerport')]" | |
}], | |
"resources": { | |
"requests": { | |
"cpu": "[parameters('cpu')]", | |
"memoryInGb": "[parameters('memoryingb')]" | |
} | |
}, | |
"volumeMounts": [{ | |
"name": "[parameters('volumename')]", | |
"mountPath": "[parameters('mountpoint')]" | |
}] | |
} | |
}], | |
"osType": "Linux", | |
"ipAddress": { | |
"type": "Public", | |
"ports": [{ | |
"protocol": "tcp", | |
"port": "[parameters('containerport')]" | |
}] | |
}, | |
"volumes": [{ | |
"name": "[parameters('volumename')]", | |
"azureFile": { | |
"shareName": "[parameters('sharename')]", | |
"storageAccountName": "[parameters('storageaccountname')]", | |
"storageAccountKey": "[parameters('storageaccountkey')]" | |
} | |
}] | |
} | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment