зеркало из
1
0
Форкнуть 0
azure-quickstart-templates/jenkins-on-ubuntu/azuredeploy.json

261 строка
7.5 KiB
JSON

{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"region": {
"type": "string",
"defaultValue": "West US",
"metadata": {
"Description": "Location where resources will be provisioned"
}
},
"storageAccountPrefix": {
"type": "string",
"defaultValue": "uniqueStorageAccountName",
"metadata": {
"Description": "Unique namespace for the Storage Account where the Virtual Machine's disks will be placed"
}
},
"virtualNetworkName": {
"type": "string",
"defaultValue": "myVNET",
"metadata": {
"Description": "Name of the virtual network provisioned for the cluster"
}
},
"adminUsername": {
"type": "string",
"metadata": {
"Description": "Administrator user name used when provisioning virtual machines"
}
},
"adminPassword": {
"type": "securestring",
"metadata": {
"Description": "Administrator password used when provisioning virtual machines"
}
},
"dnsName": {
"type": "string",
"metadata": {
"Description": "Domain name for the publicly accessible Jenkins master node"
}
},
"masterVmSize": {
"type": "string",
"defaultValue": "Standard_D3",
"allowedValues": [
"Standard_D3",
"Standard_D4"
],
"metadata": {
"Description": "The size of the virtual machines used when provisioning the Jenkins master node"
}
},
"slaveNodes": {
"type": "int",
"defaultValue": 1,
"metadata": {
"Description": "Number of Jenkins slave node (1 is the default)"
}
},
"slaveVmSize": {
"type": "string",
"defaultValue": "Standard_D3",
"allowedValues": [
"Standard_D3",
"Standard_D4"
],
"metadata": {
"Description": "The size of the virtual machines used when provisioning Jenkins slave node(s)"
}
}
},
"variables": {
"templateBaseUrl": "https://raw.githubusercontent.com/dennisan/azure-quickstart-templates/master/jenkins-on-ubuntu/",
"sharedTemplateUrl": "[concat(variables('templateBaseUrl'), 'shared-resources.json')]",
"jenkMasterTemplateUrl": "[concat(variables('templateBaseUrl'), 'jenkmaster-resources.json')]",
"jenkSlaveTemplateUrl": "[concat(variables('templateBaseUrl'), 'jenkslave-resources.json')]",
"namespace": "jenk",
"networkSettings": {
"virtualNetworkName": "[parameters('virtualNetworkName')]",
"addressPrefix": "10.0.0.0/16",
"subnet": {
"dse": {
"name": "dse",
"prefix": "10.0.0.0/24",
"vnet": "[parameters('virtualNetworkName')]"
}
},
"statics": {
"clusterRange": {
"base": "10.0.0.",
"start": 5
},
"jenkMaster": "10.0.0.240"
}
},
"masterOsSettings": {
"imageReference": {
"publisher": "Canonical",
"offer": "UbuntuServer",
"sku": "14.04.2-LTS",
"version": "14.04.201503090"
},
"scripts": [
"https://raw.githubusercontent.com/dennisan/azure-quickstart-templates/master/jenkins-on-ubuntu/jenkMstrInstall.sh",
"https://raw.githubusercontent.com/dennisan/azure-quickstart-templates/master/jenkins-on-ubuntu/jenkAddNode"
]
},
"slaveOsSettings": {
"imageReference": {
"publisher": "Canonical",
"offer": "UbuntuServer",
"sku": "14.04.2-LTS",
"version": "14.04.201503090"
},
"scripts": [
"https://raw.githubusercontent.com/dennisan/azure-quickstart-templates/master/jenkins-on-ubuntu/jenkSlaveInstall.sh"
]
},
"sharedStorageAccountName": "[parameters('storageAccountPrefix')]"
},
"resources": [
{
"name": "shared",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('sharedTemplateUrl')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"region": {
"value": "[parameters('region')]"
},
"networkSettings": {
"value": "[variables('networkSettings')]"
},
"storageAccountName": {
"value": "[variables('sharedStorageAccountName')]"
}
}
}
},
{
"name": "jenkMasterNode",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"dependsOn": [
"[concat('Microsoft.Resources/deployments/', 'shared')]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('jenkMasterTemplateUrl')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"region": {
"value": "[parameters('region')]"
},
"storageAccountName": {
"value": "[variables('sharedStorageAccountName')]"
},
"adminUsername": {
"value": "[parameters('adminUsername')]"
},
"adminPassword": {
"value": "[parameters('adminPassword')]"
},
"namespace": {
"value": "[variables('namespace')]"
},
"vmbasename": {
"value": "Master"
},
"subnet": {
"value": "[variables('networkSettings').subnet.dse]"
},
"dnsname": {
"value": "[parameters('dnsName')]"
},
"staticIp": {
"value": "[variables('networkSettings').statics.jenkMaster]"
},
"vmSize": {
"value": "[parameters('masterVmSize')]"
},
"slaveNodes": {
"value": "[parameters('slaveNodes')]"
},
"osSettings": {
"value": "[variables('masterOsSettings')]"
}
}
}
},
{
"name": "[concat('jenkSlaveNode', copyindex())]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"dependsOn": [
"[concat('Microsoft.Resources/deployments/', 'shared')]",
"[concat('Microsoft.Resources/deployments/', 'jenkMasterNode')]"
],
"copy": {
"name": "vmLoop",
"count": "[parameters('slaveNodes')]"
},
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('jenkSlaveTemplateUrl')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"region": {
"value": "[parameters('region')]"
},
"storageAccountName": {
"value": "[variables('sharedStorageAccountName')]"
},
"adminUsername": {
"value": "[parameters('adminUsername')]"
},
"adminPassword": {
"value": "[parameters('adminPassword')]"
},
"namespace": {
"value": "[variables('namespace')]"
},
"vmbasename": {
"value": "[concat('Slave', copyindex())]"
},
"masterNode": {
"value": "[variables('networkSettings').statics.jenkMaster]"
},
"subnet": {
"value": "[variables('networkSettings').subnet.dse]"
},
"vmSize": {
"value": "[parameters('slaveVmSize')]"
},
"osSettings": {
"value": "[variables('slaveOsSettings')]"
}
}
}
}
],
"outputs": {}
}