Skip to content

Commit

Permalink
CustomScript rollout - stage Azure#6
Browse files Browse the repository at this point in the history
See Azure#2340 for details.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
  • Loading branch information
ahmetb committed Sep 19, 2016
1 parent 9ba0a78 commit 945b257
Show file tree
Hide file tree
Showing 23 changed files with 100 additions and 91 deletions.
31 changes: 16 additions & 15 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,23 @@ To make sure your template is added to Azure.com index, please follow these guid
9. Name **variables** using this scheme **templateScenarioResourceName** (e.g. simpleLinuxVMVNET, userRoutesNSG, elasticsearchPublicIP etc.) that describe the scenario rather. This ensures when a user browses all the resources in the Portal there aren't a bunch of resources with the same name (e.g. myVNET, myPublicIP, myNSG)
10. **Storage account names** need to be lower case and can't contain hyphens (-) in addition to other domain name restrictions. These also need to be globally unique.
11. **Passwords** must be passed into parameters of type `securestring`.
* Passwords must also be passed to customScriptExtension using the `commandToExecute` property in `protectedSettings`. This will look like below
* Passwords must also be passed to Custom Script Extension using the `commandToExecute` property in `protectedSettings`. This will look like below:

```
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.4",
"settings": {
"fileUris": [
"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/lamp-app/install_lamp.sh"
]
},
"protectedSettings": {
"commandToExecute": "[concat('sh install_lamp.sh ', parameters('mySqlPassword'))]"
}
}
"properties": {
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/lamp-app/install_lamp.sh"
]
},
"protectedSettings": {
"commandToExecute": "[concat('sh install_lamp.sh ', parameters('mySqlPassword'))]"
}
}
```

12. Every parameter in the template must have the **lower-case description** tag specified using the metadata property. This looks like below
Expand Down Expand Up @@ -269,4 +270,4 @@ Server Error:{
}
}
}
```
```
6 changes: 4 additions & 2 deletions 1-CONTRIBUTION-GUIDE/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ The following guidelines are relevant to the main deployment template and nested

```
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"version": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat(variables('template').assets, '/lamp-app/install_lamp.sh')]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"apiVersion": "2015-05-01-preview",
"location": "[resourceGroup().location]",
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.5",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
Expand Down
6 changes: 3 additions & 3 deletions 201-vmss-bottle-autoscale/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@
{
"name": "lapextension",
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.4",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
Expand Down
7 changes: 4 additions & 3 deletions ansible-advancedlinux/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,10 @@
"VMExtensionsLoop"
],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.4",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[variables('customScriptAnsibleUrl')]",
Expand Down
6 changes: 3 additions & 3 deletions influx-blockchain-ubuntu/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.4",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
Expand Down
18 changes: 9 additions & 9 deletions intel-lustre-client-server/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -859,9 +859,9 @@
"[concat('Microsoft.Compute/virtualMachines/', parameters('vmNamePrefix'), 'mgs', '/extensions/init')]"
],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.5",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion":true,
"settings": {
"fileUris": [
Expand Down Expand Up @@ -992,9 +992,9 @@
"count": "[parameters('ossCount')]"
},
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.5",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion":true,
"settings": {
"fileUris": [
Expand Down Expand Up @@ -1174,9 +1174,9 @@
"count": "[parameters('clientCount')]"
},
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.5",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion":true,
"settings": {
"fileUris": [
Expand Down
23 changes: 13 additions & 10 deletions intel-lustre-client-server/monitoring.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@
"name": "[concat(parameters('vmNamePrefix'), 'mds', '/init')]",
"location": "[parameters('location')]",
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.3",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[parameters('scriptUrlMonitoring')]"
Expand All @@ -79,9 +80,10 @@
"count": "[parameters('ossCount')]"
},
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.3",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[parameters('scriptUrlMonitoring')]"
Expand All @@ -96,9 +98,10 @@
"name": "[concat(parameters('vmNamePrefix'), 'mgs', '/init')]",
"location": "[parameters('location')]",
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.3",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[parameters('scriptUrlMonitoring')]"
Expand All @@ -108,4 +111,4 @@
}
}
]
}
}
2 changes: 1 addition & 1 deletion kafka-ubuntu-multidisks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The template creates the following deployment resources:
* Storage accounts to store VM data disks
* Public IP address for accessing the jumpbox via ssh
* Network interface card for each VM
* Multiple remotely-hosted CustomScriptForLinux extensions to strip the data disks and to install and configure Kafka services
* Multiple remotely-hosted Custom Script Extensions to strip the data disks and to install and configure Kafka services

Assuming your domainName parameter was "kafkajumpbox" and region was "West US"
* Kafka servers will be deployed at IP address prefix in the subnet: 10.0.2.10,10.0.2.11,10.0.2.12, etc.
Expand Down
6 changes: 3 additions & 3 deletions kafka-ubuntu-multidisks/zookeeper-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@
"count": "[variables('vmCount')]"
},
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.5",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": "[parameters('osSettings').scripts]",
Expand Down
8 changes: 4 additions & 4 deletions lap-neo4j-ubuntu/nested/lanplap-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@
"[concat('Microsoft.Compute/virtualMachines/', concat(parameters('namespace'), concat(parameters('vmbasename'), 'vm')))]"
],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.5",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": "[parameters('osSettings').scripts]",
"fileUris": "[parameters('osSettings').scripts]",
"commandToExecute": "sudo bash install-lap.sh"
}
}
Expand Down
6 changes: 3 additions & 3 deletions lap-neo4j-ubuntu/nested/lanpneo4j-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@
"[concat('Microsoft.Network/networkInterfaces/', parameters('namespace'), parameters('vmbasename'), 'nic')]"
],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.5",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": "[parameters('osSettings').scripts]",
Expand Down
4 changes: 2 additions & 2 deletions memcached-multi-vm-ubuntu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The template creates the following deployment resources:
* Public IP address (named publicip) for accessing the Apache web server and the hosted PHP test page
* Network Interface Card (NIC) for Apache web (named nicapache)
* Multiple Network Interface Cards (NICs) for memcached servers (named memcachednic0, memcachednic1, etc.)
* One remotely-hosted CustomScriptForLinux (install_apache.sh with passed in parameters) extension to install Apache, PHP5, memcached PHP extension, and the index.php test page on the Apache VM
* Multiple remotely-hosted CustomScriptForLinux (install_memcached.sh with passed in parameters) extensions to install and configure the memcached service on each of the numberOfMemcachedInstances VMs
* One remotely-hosted CustomScript (install_apache.sh with passed in parameters) extension to install Apache, PHP5, memcached PHP extension, and the index.php test page on the Apache VM
* Multiple remotely-hosted CustomScript (install_memcached.sh with passed in parameters) extensions to install and configure the memcached service on each of the numberOfMemcachedInstances VMs

NOTE: In the current version of the template, Apache test page is dynamically configured with the IP addresses of the memcached servers by assuming that they are always deployed into an empty Subnet-Memcached and that the first server is at x.x.x.4, second at x.x.x.5, third at x.x.x.6, etc. IP addresses.
2 changes: 1 addition & 1 deletion mongodb-nodejs-high-availability/frontend-resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('vmName'), '/CustomScriptForLinux')]",
"name": "[concat(variables('vmName'), '/CustomScript')]",
"apiVersion": "2015-05-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [
Expand Down
6 changes: 3 additions & 3 deletions nxt-blockchain-ubuntu/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.4",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
Expand Down
6 changes: 3 additions & 3 deletions openedx-scalable-ubuntu/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,9 @@
"[concat('Microsoft.Compute/virtualMachines/', variables('appVmName'), '0')]"
],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.3",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
Expand Down
2 changes: 1 addition & 1 deletion postgresql-on-ubuntu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The template creates the following deployment resources:
* Storage accounts to store VM data disks
* Public IP address for accessing the jumpbox via ssh
* Network interface card for each VM
* Multiple remotely-hosted CustomScriptForLinux extensions to strip the data disks and to install and configure PostgreSQL services
* Multiple remotely-hosted Custom Script Extensions to strip the data disks and to install and configure PostgreSQL services

NOTE: To access the PostgreSQL servers, you need to use the externally accessible jumpbox VM and ssh from it into the backend servers.

Expand Down
6 changes: 3 additions & 3 deletions stampery-trailbot-ubuntu/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.4",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
Expand Down
6 changes: 3 additions & 3 deletions ubuntu-apache-test-page/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@
"displayName": "PrepareServer"
},
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.4",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
Expand Down
8 changes: 4 additions & 4 deletions vsts-tomcat-redhat-vm/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@
"location": "[resourceGroup().location]",
"dependsOn": ["[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.5",
"autoUpgradeMinorVersion":true,
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/vsts-tomcat-redhat-vm/scripts/tomcat-setup-redhat.sh"
Expand Down
8 changes: 4 additions & 4 deletions vsts-tomcat-ubuntu-vm/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@
"location": "[resourceGroup().location]",
"dependsOn": ["[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.5",
"autoUpgradeMinorVersion":true,
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/vsts-tomcat-ubuntu-vm/scripts/tomcat-setup-ubuntu.sh"
Expand Down
9 changes: 5 additions & 4 deletions zabbix-monitoring-cluster/nested/monitoringAgentByVms.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
"apiVersion": "2015-06-15",
"location": "[variables('location')]",
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.4",
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat(parameters('_artifactsLocation'), '/scripts/setup')]"
Expand All @@ -50,4 +51,4 @@
}
}
]
}
}
Loading

0 comments on commit 945b257

Please sign in to comment.