зеркало из https://github.com/Azure/Moodle.git
142 строки
6.2 KiB
JSON
142 строки
6.2 KiB
JSON
{
|
|
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
|
|
"contentVersion": "1.0.0.0",
|
|
"parameters": {
|
|
"moodleCommon": {
|
|
"metadata": {
|
|
"description": "Common Moodle values"
|
|
},
|
|
"type": "object"
|
|
},
|
|
"lbPubIp": {
|
|
"metadata": {
|
|
"description": "Public IP address of the deployed load balancer"
|
|
},
|
|
"type": "string"
|
|
},
|
|
"lbOut001PubIp": {
|
|
"metadata": {
|
|
"description": "Outgoing Public IP address of the deployed load balancer"
|
|
},
|
|
"type": "string"
|
|
},
|
|
"lbOut002PubIp": {
|
|
"metadata": {
|
|
"description": "Outgoing Public IP address of the deployed load balancer"
|
|
},
|
|
"type": "string"
|
|
},
|
|
"ctlrPubIp": {
|
|
"metadata": {
|
|
"description": "Public IP address of the deployed controller VM"
|
|
},
|
|
"type": "string"
|
|
},
|
|
"subnetIdDb": {
|
|
"metadata": {
|
|
"description": "Azure resource ID of the subnet where the Db is to be deployed.(if deployed in vnet)"
|
|
},
|
|
"type": "string"
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"type": "Microsoft.DBforPostgreSQL/servers",
|
|
"apiVersion": "2017-12-01",
|
|
"kind": "",
|
|
"location": "[parameters('moodleCommon').location]",
|
|
"name": "[parameters('moodleCommon').serverName]",
|
|
"properties": {
|
|
"administratorLogin": "[parameters('moodleCommon').dbLogin]",
|
|
"administratorLoginPassword": "[parameters('moodleCommon').dbLoginPassword]",
|
|
"sslEnforcement": "[parameters('moodleCommon').sslEnforcement]",
|
|
"storageProfile": {
|
|
"storageMB": "[mul(parameters('moodleCommon').mysqlPgresStgSizeGB, 1024)]",
|
|
"backupRetentionDays": "35",
|
|
"geoRedundantBackup": "Enabled"
|
|
},
|
|
"version": "[parameters('moodleCommon').postgresVersion]"
|
|
},
|
|
"sku": {
|
|
"capacity": "[parameters('moodleCommon').mysqlPgresVcores]",
|
|
"name": "[parameters('moodleCommon').mysqlPgresSkuName]",
|
|
"tier": "[parameters('moodleCommon').mysqlPgresSkuTier]",
|
|
"family": "[parameters('moodleCommon').mysqlPgresSkuHwFamily]"
|
|
},
|
|
"resources": [
|
|
{
|
|
"apiVersion": "2017-12-01",
|
|
"dependsOn": [
|
|
"[concat('Microsoft.DBforPostgreSQL/servers/', parameters('moodleCommon').serverName)]"
|
|
],
|
|
"location": "[parameters('moodleCommon').location]",
|
|
"name": "postgres-firewall-allow-lb",
|
|
"properties": {
|
|
"startIpAddress": "[parameters('lbPubIp')]",
|
|
"endIpAddress": "[parameters('lbPubIp')]"
|
|
},
|
|
"type": "firewallRules"
|
|
},
|
|
{
|
|
"apiVersion": "2017-12-01",
|
|
"dependsOn": [
|
|
"[concat('Microsoft.DBforPostgreSQL/servers/', parameters('moodleCommon').serverName)]"
|
|
],
|
|
"location": "[parameters('moodleCommon').location]",
|
|
"name": "postgres-firewall-allow-lb-out001",
|
|
"properties": {
|
|
"startIpAddress": "[parameters('lbOut001PubIp')]",
|
|
"endIpAddress": "[parameters('lbOut001PubIp')]"
|
|
},
|
|
"type": "firewallRules"
|
|
},
|
|
{
|
|
"apiVersion": "2017-12-01",
|
|
"dependsOn": [
|
|
"[concat('Microsoft.DBforPostgreSQL/servers/', parameters('moodleCommon').serverName)]"
|
|
],
|
|
"location": "[parameters('moodleCommon').location]",
|
|
"name": "postgres-firewall-allow-lb-out002",
|
|
"properties": {
|
|
"startIpAddress": "[parameters('lbOut002PubIp')]",
|
|
"endIpAddress": "[parameters('lbOut002PubIp')]"
|
|
},
|
|
"type": "firewallRules"
|
|
},
|
|
{
|
|
"apiVersion": "2017-12-01",
|
|
"dependsOn": [
|
|
"[concat('Microsoft.DBforPostgreSQL/servers/', parameters('moodleCommon').serverName)]"
|
|
],
|
|
"location": "[parameters('moodleCommon').location]",
|
|
"name": "postgres-firewall-allow-ctlr",
|
|
"properties": {
|
|
"startIpAddress": "[parameters('ctlrPubIp')]",
|
|
"endIpAddress": "[parameters('ctlrPubIp')]"
|
|
},
|
|
"type": "firewallRules"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"outputs": {
|
|
"dbFQDN": {
|
|
"type": "string",
|
|
"value": "[reference(parameters('moodleCommon').serverName).fullyQualifiedDomainName]"
|
|
}
|
|
},
|
|
"variables": {
|
|
"documentation1": "This sub-template creates a postgresql server. It expects certain values in the 'common' datastructure.",
|
|
"documentation10": " serverName - Postgresql server name",
|
|
"documentation11": " postgresVersion - Postgresql version",
|
|
"documentation2": " administratorLogin - postgresql admin username",
|
|
"documentation3": " administratorLoginPassword - postgresql admin password",
|
|
"documentation4": " location - Postgresql server location",
|
|
"documentation5": " mysqlPgresVcores - Postgresql database trasaction units",
|
|
"documentation7": " mysqlPgresSkuName - Postgresql sku name",
|
|
"documentation8": " mysqlPgresStgSizeGB - Postgresql sku size in mb",
|
|
"documentation9": " mysqlPgresSkuTier - Postgresql sku tier",
|
|
"documentationA": " mysqlPgresSkuHwFamily - Mysql sku hardware family"
|
|
}
|
|
}
|