Name: azure-quickstart-templates
Owner: Chef Partners
Description: Azure Quickstart Templates
Forked from: Azure/azure-quickstart-templates
Created: 2017-06-02 16:27:52.0
Updated: 2017-06-02 16:28:01.0
Pushed: 2017-06-21 12:44:36.0
Homepage: https://azure.microsoft.com/en-us/documentation/templates
Size: 199372
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This repo contains all currently available Azure Resource Manager templates contributed by the community. A searchable template index is maintained at https://azure.microsoft.com/en-us/documentation/templates/. The following information is relevant to get started with contributing to this repository.
You can deploy these samples directly through the Azure Portal or by using the scripts supplied in the root of the repo.
To deploy a sample using the Azure Portal, click the Deploy to Azure button found in the README.md of each sample.
To deploy the sample via the command line (using Azure PowerShell or the Azure CLI 1.0) you can use the scripts below.
Simply execute the script and pass in the folder name of the sample you want to deploy.
For example:
ploy-AzureResourceGroup.ps1 -ResourceGroupLocation 'eastus' -ArtifactStagingDirectory '[foldername]'
Please ensure that you have node and npm, jq and azure-cli installed.
ure-group-deploy.sh -a [foldername] -l eastus
If the sample has artifacts that need to be “staged” for deployment (Configuration Scripts, Nested Templates, DSC Packages) then set the upload switch on the command. You can optionally specify a storage account to use, if so the storage account must already exist within the subscription. If you don't want to specify a storage account one will be created by the script or reused if it already exists (think of this as “temp” storage for AzureRM).
ploy-AzureResourceGroup.ps1 -ResourceGroupLocation 'eastus' -ArtifactStagingDirectory '201-vm-custom-script-windows' -UploadArtifacts
ure-group-deploy.sh -a [foldername] -l eastus -u
To make sure your template is added to Azure.com index, please follow these guidelines. Any templates that are out of compliance will be added to the blacklist and not be indexed on Azure.com
The README.md describes your deployment. A good description helps other community members to understand your deployment. The README.md uses Github Flavored Markdown for formatting text. If you want to add images to your README.md file, store the images in the images folder. Reference the images in the README.md with a relative path (e.g. ![alt text](images/namingConvention.png "Files, folders and naming conventions")
). This ensures the link will reference the target repository if the source repository is forked. A good README.md contains the following sections
cluster, ha, sql
)Do not include the parameters or the variables of the deployment script. We render this on Azure.com from the template. Specifying these in the README.md will result in duplicate entries on Azure.com.
You can download a sample README.md for use in your deployment scenario. The sample README.md also contains the code for the Deploy to Azure and Visualize buttons, that you can use as a reference.
A valid metadata.json must adhere to the following structure
temDisplayName": "",
escription": "",
ummary": "",
ithubUsername": "",
ateUpdated": "<e.g. 2015-12-20>"
The metadata.json file will be validated using these rules
itemDisplayName
description
summary
githubUsername
dateUpdated
acomghbot is a bot designed to enforce the above rules and check the syntactic correctness of the template using the ARM Validate Template API. Below are some of the more cryptic error messages you might receive from the bot and how to solve these issues.
This error is received when the parameters file contains a parameter that is not defined in the template.
The file azuredeploy.json is not valid. Response from ARM API: BadRequest - {“error”:{“code”:“InvalidTemplate”,“message”:“Deployment template validation failed: 'The template parameters 'vmDnsName' are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'newStorageAccountName, adminUsername, adminPassword, dnsNameForPublicIP, windowsOSVersion, sizeOfDiskInGB'.'.“}}
This error is received when a parameter in the parameter file has an empty value.
The file azuredeploy.json is not valid. Response from ARM API: BadRequest - {“error”:{“code”:“InvalidTemplate”,“message”:“Deployment template validation failed: 'The template resource '' at line '66' and column '6' is not valid. The name property cannot be null or empty'.“}}
This error message is received when a value entered in the parameters file is different from the allowed values defined for the parameter in the template file.
The file azuredeploy.json is not valid. Response from ARM API: BadRequest - {“error”:{“code”:“InvalidTemplate”,“message”:“Deployment template validation failed: 'The provided value for the template parameter 'publicIPAddressType' at line '40' and column '29' is not valid.'.“}}
We have automated template validation through Travis CI. These builds can be accessed by clicking the 'Details' link at the bottom of the pull-request dialog. This process will ensure that your template conforms to all the rules mentioned above and will also deploy your template to our test azure subscription.
To ensure your template passes, special placeholder values are required when deploying a template, depending what the parameter is used for:
[N]
, where [N]
can be any number from 3 to 32 inclusive.Here's an example in an azuredeploy.parameters.json
file:
hema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
tentVersion": "1.0.0.0",
ameters": {
wStorageAccountName":{
alue": "GEN-UNIQUE"
minUsername": {
alue": "sedouard"
hKeyData": {
alue": "GEN-SSH-PUB-KEY"
sNameForPublicIP": {
alue": "GEN-UNIQUE-13"
If you're making use of raw.githubusercontent.com links within your template contribution (within the template file itself or any scripts in your contribution) please ensure the following:
https://raw.githubusercontent.com/Azure/azure-quickstart-templates/...
and NOT your fork.https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/...
may not exist in the Azure repo at the time of your pull-request, at CI run-time, those links will be converted to https://raw.githubusercontent.com/{your_user_name}/azure-quickstart-templates/{your_branch}/...
. Be sure to check the casing of https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/...
as this is case-sensitive.Note: You can find an example of relative linking in the nested template section of best practices document.
If your template has some pre-requisite such as an Azure Active Directory application or service principal, we don't support this yet. To bypass the CI workflow include a file called .ci_skip in the root of your template folder.
If your deployment fails, check the details link of the Travis CI build, which will take you to the CI log. If the template deployment was attempted, you will get two top-level fields. The first is parameters
which is the rendered version of your azuredeploy.parameters.json
. This will include any replacements for GEN-
parameters. The second is template
which is the contents of your azuredeploy.json
, after any raw.githubusercontent.com
relinking. These values are the exact values you need to reproduce the error. Keep in mind, that depending on the resources allocated, it can take a few minutes for the CI system to cleanup provisioned resources.
Here is an example failure log:
er Error:{
"error": "Deployment provisioning state was not successful\n",
"_rgName": "qstci-26dd2ec4-bae9-12fb-fd46-fd4ce455a035",
"command": "azure group deployment create --resource-group (your_group_name) --template-file azuredeploy.json --parameters-file azuredeploy.parameters.json",
"parameters": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"value": "ci4391bcd700f86e84"
},
"clusterType": {
"value": "hadoop"
},
"clusterStorageAccountName": {
"value": "cifb07cf059735afba"
},
"clusterLoginUserName": {
"value": "admin"
},
"clusterLoginPassword": {
"value": "ciP$ss2e6a28784055eda8"
}
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterType": {
"type": "string",
"allowedValues": [
"hadoop",
"hbase",
"storm",
"spark"
],
"metadata": {
"description": "The type of the HDInsight cluster to create."
}
}
// more parameters here...
},
"variables": {
"defaultApiVersion": "2015-06-15",
"clusterApiVersion": "2015-03-01-preview",
"adlsApiVersion": "2015-10-01-preview"
},
"resources": [
{
"name": "[parameters('adlStoreName')]",
"type": "Microsoft.DataLakeStore/accounts",
"location": "East US 2",
"apiVersion": "[variables('adlsApiVersion')]",
"dependsOn": [],
"tags": {},
"properties": {
"initialUser": "[parameters('servicePrincipalObjectId')]"
}
},
// more resources here...
],
"outputs": {
"adlStoreAccount": {
"type": "object",
"value": "[reference(resourceId('Microsoft.DataLakeStore/accounts',parameters('adlStoreName')))]"
}
// more outputs here...
}
}
project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.