Added initial azure documentation
This commit is contained in:
parent
f25be250c7
commit
7b9fa48a1b
|
@ -0,0 +1,93 @@
|
|||
---
|
||||
description: |
|
||||
|
||||
layout: docs
|
||||
page_title: Azure Resource Manager
|
||||
...
|
||||
|
||||
# Azure Resource Manager Builder
|
||||
|
||||
Type: `azure-arm`
|
||||
|
||||
Packer supports building VHDs in [Azure Resource Manager](https://azure.microsoft.com/en-us/documentation/articles/resource-group-overview/). Azure provides new users a [$200 credit for the first 30 days](https://azure.microsoft.com/en-us/free/); after which you will incur costs for VMs built and stored using Packer.
|
||||
|
||||
Unlike most Packer builders, the artifact produced by the ARM builder is a VHD (virtual hard disk), not a full virtual machine image. This means you will need to [perform some additional steps](https://github.com/Azure/packer-azure/issues/201) in order to launch a VM from your build artifact.
|
||||
|
||||
Azure uses a combination of OAuth and Active Directory to authorize requests to the ARM API. Learn how to [authorize access to ARM](/docs/builders/azure-setup.html).
|
||||
|
||||
The documentation below references command output from the [Azure CLI](https://azure.microsoft.com/en-us/documentation/articles/xplat-cli-install/).
|
||||
|
||||
-> At this time packer supports building Linux virtual machines in Azure. Support for building Windows VMs is in progress and will be added in an upcoming release.
|
||||
|
||||
## Configuration Reference
|
||||
|
||||
The following configuration options are available for building Azure images. In addition to the options listed here, a
|
||||
[communicator](/docs/templates/communicator.html) can be configured for this
|
||||
builder.
|
||||
|
||||
### Required:
|
||||
|
||||
- `client_id` (string) The Active Directory service principal associated with your builder.
|
||||
|
||||
- `client_secret` (string) The password or secret for your service principal.
|
||||
|
||||
- `resource_group_name` (string) Resource group under which the final artifact will be stored.
|
||||
|
||||
- `storage_account` (string) Storage account under which the final artifact will be stored.
|
||||
|
||||
- `subscription_id` (string) Subscription under which the build will be performed. **The service principal specified in `client_id` must have full access to this subscription.**
|
||||
|
||||
- `tenant_id` (string) The account identifier with which your `client_id` and `subscription_id` are associated.
|
||||
|
||||
- `capture_container_name` (string) Destination container name. Essentially the "folder" where your VHD will be organized in Azure.
|
||||
|
||||
- `capture_name_prefix` (string) VHD prefix. The final artifacts will be named `PREFIX-osDisk.UUID` and `PREFIX-vmTemplate.UUID`.
|
||||
|
||||
- `image_publisher` (string) PublisherName for your base image. See [documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/) for details.
|
||||
|
||||
CLI example `azure vm image list-publishers -l westus`
|
||||
|
||||
- `image_offer` (string) Offer for your base image. See [documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/) for details.
|
||||
|
||||
CLI example `azure vm image list-offers -l westus -p Canonical`
|
||||
|
||||
- `image_sku` (string) SKU for your base image. See [documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/) for details.
|
||||
|
||||
CLI example `azure vm image list-skus -l westus -p Canonical -o UbuntuServer`
|
||||
|
||||
- `location` (string) Azure datacenter in which your VM will build.
|
||||
|
||||
CLI example `azure location list`
|
||||
|
||||
- `vm_size` (string) Size of the VM used for building. This can be changed when you deploy a VM from your VHD. See [pricing](https://azure.microsoft.com/en-us/pricing/details/virtual-machines/) information.
|
||||
|
||||
CLI example `azure vm sizes -l westus`
|
||||
|
||||
## Basic Example
|
||||
|
||||
Here is a basic example for Azure.
|
||||
|
||||
``` {.javascript}
|
||||
{
|
||||
"type": "azure-arm",
|
||||
|
||||
"client_id": "{{user `client_id`}}",
|
||||
"client_secret": "{{user `client_secret`}}",
|
||||
"resource_group_name": "{{user `resource_group`}}",
|
||||
"storage_account": "{{user `storage_account`}}",
|
||||
"subscription_id": "{{user `subscription_id`}}",
|
||||
"tenant_id": "{{user `tenant_id`}}",
|
||||
|
||||
"capture_container_name": "images",
|
||||
"capture_name_prefix": "packer",
|
||||
|
||||
"image_publisher": "Canonical",
|
||||
"image_offer": "UbuntuServer",
|
||||
"image_sku": "14.04.3-LTS",
|
||||
|
||||
"location": "West US",
|
||||
"vm_size": "Standard_A2"
|
||||
}
|
||||
```
|
||||
|
||||
See the [examples/azure](https://github.com/mitchellh/packer/tree/master/examples/azure) folder in the packer project for more examples.
|
|
@ -36,6 +36,7 @@
|
|||
<h4>Builders</h4>
|
||||
</li>
|
||||
<li><a href="/docs/builders/amazon.html">Amazon EC2 (AMI)</a></li>
|
||||
<li><a href="/docs/builders/azure.html">Azure Resource Manager</a></li>
|
||||
<li><a href="/docs/builders/digitalocean.html">DigitalOcean</a></li>
|
||||
<li><a href="/docs/builders/docker.html">Docker</a></li>
|
||||
<li><a href="/docs/builders/googlecompute.html">Google Compute Engine</a></li>
|
||||
|
|
Loading…
Reference in New Issue