Skip to content

Instantly share code, notes, and snippets.

@timabell
Last active November 11, 2019 15:27
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 timabell/b957edb746ec9c7a6c9b05d2176f0111 to your computer and use it in GitHub Desktop.
Save timabell/b957edb746ec9c7a6c9b05d2176f0111 to your computer and use it in GitHub Desktop.
simple azure ARM template for schema explorer docker image. Newer version: https://gist.github.com/timabell/ad51ef7ab1525ad2c4d929f427c535df
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"containerName": {
"value": "s121d01-schema-explorer-test"
},
"location": {
"value": "westeurope"
},
"numberCpuCores": {
"value": "1"
},
"memory": {
"value": "0.5"
},
"ipAddressType": {
"value": "Public"
},
"dnsNameLabel": {
"value": "schema-explorer-test"
},
"displayName": {
"value": "testing SSE on azure with ARM"
},
"pgHost": {
"value": ""
},
"pgDatabase": {
"value": ""
},
"pgUser": {
"value": ""
},
"pgPassword": {
"value": ""
}
}
}
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string"
},
"containerName": {
"type": "string"
},
"numberCpuCores": {
"type": "string"
},
"memory": {
"type": "string"
},
"ipAddressType": {
"type": "string"
},
"dnsNameLabel": {
"type": "string"
},
"displayName": {
"type": "string"
},
"pgHost": {
"type": "string"
},
"pgDatabase": {
"type": "string"
},
"pgUser": {
"type": "string"
},
"pgPassword": {
"type": "string"
}
},
"variables":
{
"environmentVariables":
[
{
"name": "schemaexplorer_listen_on_port",
"value": "80"
},
{
"name": "schemaexplorer_driver",
"value": "pg"
},
{
"name": "schemaexplorer_display_name",
"value": "[parameters('displayName')]"
},
{
"name": "schemaexplorer_pg_host",
"value": "[parameters('pgHost')]"
},
{
"name": "schemaexplorer_pg_database",
"value": "[parameters('pgDatabase')]"
},
{
"name": "schemaexplorer_pg_user",
"value": "[parameters('pgUser')]"
},
{
"name": "schemaexplorer_pg_password",
"value": "[parameters('pgPassword')]"
}
]
},
"resources": [
{
"location": "[parameters('location')]",
"name": "[parameters('containerName')]",
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2018-10-01",
"properties": {
"containers": [
{
"name": "[parameters('containerName')]",
"properties": {
"image": "timabell/sdv",
"resources": {
"requests": {
"cpu": "[int(parameters('numberCpuCores'))]",
"memoryInGB": "[float(parameters('memory'))]"
}
},
"ports": [
{
"port": "80"
}
],
"environmentVariables": "[variables('environmentVariables')]"
}
}
],
"restartPolicy": "OnFailure",
"osType": "Linux",
"ipAddress": {
"type": "[parameters('ipAddressType')]",
"ports": [
{
"protocol": "tcp",
"port": "80"
}
],
"dnsNameLabel": "[parameters('dnsNameLabel')]"
}
},
"tags": {}
}
]
}
#!/bin/sh
sub='your-sub'
rg='your-rg'
az group deployment create --subscription "$sub" --resource-group "$rg" --name tim-deploys-things --template-file schema-explorer-template.json --parameters @schema-explorer-parameters.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment