You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains Azure Resource Manager deployment templates that have been tested on the first Technical Preview of Microsoft Azure Stack.
3
+
This repository contains Azure Resource Manager deployment templates that have been tested on Microsoft Azure Stack Technical Preview 2.
4
4
5
5
## What repository?
6
6
7
-
The primary ARM templates repository on GitHub is the azure-quickstart-templates. You can find the repository here https://github.com/Azure/azure-quickstart-templates
8
-
Over time many GitHub users have contributed to the repository, resulting in a huge collection of more than 250 deployment templates. This repository is a great starting point to get a better understanding of how you can deploy various kinds of environment to Microsoft Azure. If you scroll through the templates in the azure-quickstart-templates repository, you will notice that there are templates that reference services (resource providers) that are not part of the Microsoft Azure Stack Technical Preview, such as ExpressRoute or CDN.
7
+
The primary Azure Resource Manager templates repository on GitHub is the azure-quickstart-templates. You can find the repository here https://github.com/Azure/azure-quickstart-templates
9
8
10
-
To ensure the successful deployment of templates to both Microsoft Azure and Microsoft Azure Stack Technical Preview, this temporary GitHub repository AzureStack-quickstart-templates was created. This repository contains a few samples to test your Microsoft Azure Stack Technical Preview environment. Over time, some templates from this temporary repository will be moved to the azure-quickstart-templates repository and this temporary AzureStack-quickstart-templates repository will disappear.
9
+
Over time many GitHub users have contributed to the repository, resulting in a huge collection of more than 400 deployment templates. This repository is a great starting point to get a better understanding of how you can deploy various kinds of environment to Microsoft Azure. If you scroll through the templates in the azure-quickstart-templates repository, you will notice that there are templates that reference services (resource providers) that are not part of Microsoft Azure Stack Technical Preview 2, such as ExpressRoute or CDN.
11
10
12
-
**If you want to contribute your ARM templates to GitHub, you should make your contribution to the azure-quickstart-templates repository.**
11
+
To ensure the successful deployment of templates to both Microsoft Azure and Microsoft Azure Stack Technical Preview 2, this temporary GitHub repository AzureStack-quickstart-templates was created. This repository contains samples to test your Microsoft Azure Stack Technical Preview 2 environment. Over time, some templates from this temporary repository will be moved to the azure-quickstart-templates repository and this temporary AzureStack-quickstart-templates repository will be depreacated.
13
12
14
-
## Contribution Guide
13
+
**If you want to contribute your Azure Resource Manager templates to GitHub, you should make your contribution to the azure-quickstart-templates repository.**
15
14
16
-
The azure-quickstart-templates repository contains an extensive contribution guide. When you perform a pull-request to the repository, Microsoft will evaluate the code in your pull request based on the guidelines in the contribution guide. You should definitely read the contribution guide. You can find the contribution guide by browsing to the azure-quickstart-templates repository in GitHub and the open the first folder in the repository called [1-CONTRIBUTION-GUIDE](https://github.com/Azure/azure-quickstart-templates/tree/master/1-CONTRIBUTION-GUIDE).
15
+
## Contribution Guide and best practices
17
16
17
+
The azure-quickstart-templates repository contains a contribution guide and best practices. When you perform a pull-request to the repository, Microsoft will evaluate the code in your pull request based on the guidelines in these documents.
Familiarizing yourself with these documentes, improves the contribution experience.
18
23
19
24
The contribution guide also explains how to ensure that your deployment template complies with the requirements for it to show up on the gallery in the public Microsoft Azure website.
20
25
21
-
## Azure Resource Manager limitations in Microsoft Azure Stack Technical Preview
26
+
## Azure Resource Manager limitations in Microsoft Azure Stack Technical Preview 2
22
27
23
28
You can use all kind of template functions within your deployment template. You can find a description of these template functions here: https://azure.microsoft.com/en-us/documentation/articles/resource-group-template-functions/
24
29
25
-
To ensure that the templates that you create will deploy to both Microsoft Azure and Microsoft Azure Stack Technical Preview, you must be aware of a couple of limitations related to Azure Resource Manager in the first Technical Preview of Microsoft Azure Stack. Some functions of Azure Resource Manager are not yet available in this Technical Preview release of Microsoft Azure Stack.
30
+
To ensure that the templates that you create will deploy to both Microsoft Azure and Microsoft Azure Stack Technical Preview 2, you must be aware of a couple of limitations related to Azure Resource Manager in the Microsoft Azure Stack Technical Preview 2. Some functions of Azure Resource Manager are not yet available in this Technical Preview release of Microsoft Azure Stack.
26
31
27
32
The following template functions are not available in Microsoft Azure Stack Technical Preview yet.
28
33
29
-
* subString
30
-
* Trim
31
-
* uniqueString
32
-
* Uri
33
-
* concat (only works for string values, not for arrays)
34
-
35
-
The following validation functions for parameters are not available in Microsoft Azure Stack Technical Preview yet.
36
-
37
-
* minLength
38
-
* maxLength
39
-
* minValue
40
-
* maxValue
41
-
42
-
Also take note that the maximum number of outputs in a template is limited to ten. If you define more output values in your template the deployment will fail with the following error.
43
-
44
-
`Error submitting the deployment request. Additional details from the underlying API that might be helpful: Deployment template validation failed: 'The number of template output parameters limit exceeded. Expected 10 and actual 12.'.`
34
+
* skip
35
+
* take
45
36
46
37
### API Versions for Resource Providers
47
38
48
-
Each resource provider in Microsoft Azure has its own API version. The first Technical Preview of Microsoft Azure Stack will support the current API versions for the available resource providers, with some minor exceptions. To ensure your template will succesfully deploy to both Microsoft Azure and the first technical preview of Microsoft Azure Stack, use the latest API versions that are available in the first technical Preview of Azure Stack for all resources in your template. To retrieve a list of the available API versions connect to your Microsoft Azure Stack Technical Preview environment by following the **Authenticate PowerShell with Microsoft Azure Stack** procedure described in this article.
39
+
Each resource provider in Microsoft Azure has its own API version. Microsoft Azure Stack Technical Preview 2 supports the current API versions for the available resource providers, with some minor exceptions. To ensure your template will succesfully deploy to both Microsoft Azure and Microsoft Azure Stack Technical Preview 2, use the latest API versions that are available in Microsoft Azure Stack Technical Preview 2 for all resources in your template. To retrieve a list of the available API versions connect to your Microsoft Azure Stack Technical Preview 2 environment by following the **Authenticate PowerShell with Microsoft Azure Stack** procedure described in this article.
Please note that this cmdlet does not verify the resource provider specific properties for the resources within the template. This cmdlet can be used for Microsoft Azure and Microsoft Azure Stack Technical Preview.
69
-
70
-
## Guidelines for Microsoft Azure Stack deployment templates
71
-
72
-
There are a couple of additional guidelines you should be aware of if you are contributing your deployment templates to the azure-quickstart-templates repository.
73
-
74
-
* Your README.md file should contain a table that describes to what endpoint the deployment is tested.
75
-
* Your template should be deployable to Microsoft Azure with the "deploy to Microsoft Azure" button that must be in your README.md file
76
-
* The location of your resources should be set or the location of the resource group
77
-
* The storageAccountName should be a fixed value and prepended with a unique string
78
-
* The endpoint of your storage namespace should be retrieved from the API at runtime. Do not hardcode the namespace.
79
-
80
-
### README.md
81
-
82
-
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. To quickly identify a template that is tested for deployment to Microsoft Azure and to Microsoft Azure Stack, the following table should be added to the top of your README.md file. Update the table after you have validated the Deployment script to each endpoint.
83
-
84
-
| Endpoint | Version | Validated |
85
-
| ------------- |:-------------:| -----:|
86
-
| Microsoft Azure | - | no |
87
-
| Microsoft Azure Stack | TP1 | no |
88
-
89
-
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.
90
-
91
-
You can download a [sample README.md](../master/Sample README.md) here to use for your own contributions. This folder also contains some example README.md files.
92
-
93
-
### Deploy to Azure button
94
-
95
-
The README.md file of your deployment folder should contain a good description of what will be deployed with your deployment template. Besides the description the README.md file should also contains a "Deploy to Azure" button. You can create a button by adding the following code to your README.md
96
-
97
-
```HTML
98
-
<ahref="https://portal.azure.com/#create/Microsoft.Template/uri/<replace with the encoded raw path of your azuredeploy.json>"target="_blank">
For example, if you want create a "Deploy to Azure" Button for the deployment template in https://github.com/Azure/azure-quickstart-templates/tree/master/101-vnet-two-subnets, open the azuredeploy.json file in the repository.
103
-
104
-
105
-
Click the "Raw" button on the menu. This opens the raw code of the template without any surrounding HTML code. Copy the URL in the header of the browser. In this example: `https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vnet-two-subnets/azuredeploy.json`
106
-
107
-
Next we need to encode the URL. Open your favorite search engine and search for URL encoder. Paste the URL in an online encoder, encode the URL and copy the result. In this example the encoded result is `https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-vnet-two-subnets%2Fazuredeploy.json`
108
-
109
-
Update the README.md file by replacing the <replacewiththeencodedrawpathofyourazuredeploy.json> code with the result from the URL encoder. In this example the following code creates the working "Download to Azure" button.
Do not use a parameter to specify the location. Use the location property of the resourceGroup instead. By using the `resourceGroup().location` expression for all your resources, the resources in the template will automatically be deployed in the same location as the resource group.
119
-
120
-
```JSON
121
-
"resources": [
122
-
{
123
-
"name": "[variables('storageAccountName')]",
124
-
"type": "Microsoft.Storage/storageAccounts",
125
-
"apiVersion": "[variables('apiVersionStorage')]",
126
-
"location": "[resourceGroup().location]",
127
-
"comments": "This storage account is used to store the VM disks",
128
-
"properties": {
129
-
"accountType": "Standard_GRS"
130
-
}
131
-
}
132
-
]
133
-
```
134
-
135
-
### Storage accountname
136
-
137
-
Storage account names need to be lower case and can't contain hyphens (-) in addition to other domain name restrictions. A storage account has a limit of 24 characters. They also need to be globally unique on Microsoft Azure. The template function uniqueString is the preferred option used to prevent deployment issues on Microsoft Azure. The function uniqueString is not available in this Technical Preview, and deployments of templates containing this function on the Technical Preview of Microsoft Azure Stack will fail. The guidance for this technical preview is to create one parameter and two variables to randomize the storagAccountName
138
-
139
-
```JSON
140
-
"parameters": {
141
-
"storageAccountName": {
142
-
"type": "string",
143
-
"metadata": {
144
-
"description": "provide a name for your storage acount of max 11 characters"
Once uniqueString is added to ARM in a future technical preview release of Microsoft Azure Stack this sample will be updated based on uniqueString.
155
-
156
-
157
-
### Public endpoint namespace
158
-
159
-
If you use a public endpoint in your template (e.g. blob storage public endpoint), **do not hardcode the namespace**. Use the **reference** function to retrieve the namespace dynamically. This allows you to deploy the template to different public namespace environments, without the requirement to change the endpoint in the template manually.
160
-
161
-
Use the following reference to specify the osDisk. Define a variable for the `storageAccountName` (as specified in the previous example), a variable for the `vmStorageAccountContainerName` and a variable for the `OSDiskName`. Set the apiVersion to the same version you are using for the storageAccount in your template.
If you have other values in your template configured with a public namespace, change these to reflect the same reference function. For example the `storageUri` property of the virtual machine `diagnosticsProfile`. Set the apiVersion to the same version you are using for the corresponding resource in your template.
You can also reference an existing storage account in a different resource group. Set the apiVersion to the same version you are using for the existing storageAccount.
Please note that this cmdlet does not verify the resource provider specific properties for the resources within the template. This cmdlet can be used for Microsoft Azure and Microsoft Azure Stack Technical Preview 2.
185
60
186
61
## Next steps
187
62
188
-
Start with creating a couple of deployment templates in your own repository. Make sure they deploy to both Microsoft Azure and Microsoft Azure Stack Technical Preview, they are in line with the guidelines in the azure-quickstart-templates contribution guide and the guidelines described here. Fork the azure-quickstart-templates repository, add or update and send pull requests to the azure-quickstart-templates. If your templates comply with the requirments they will even show up in the gallery on the public Microsoft Azure website.
63
+
Start with creating deployment templates in your own repository. Make sure they deploy to both Microsoft Azure and Microsoft Azure Stack Technical Preview 2, they are in line with the guidelines in the azure-quickstart-templates contribution guide and the guidelines described here. Fork the azure-quickstart-templates repository, add or update and send pull requests to the azure-quickstart-templates. If your templates comply with the requirments they will even show up in the gallery on the public Microsoft Azure website.
0 commit comments