Provision a Kubernetes cluster with [Packer](https://packer.io) and [Terraform](https://www.terraform.io) on Azure Resource Manager. Inspired by Kelsey Hightower's [kubestack](https://github.com/kelseyhightower/kubestack) and the [tack](https://github.com/kz8s/tack) project.
Instead of provisioning a VM at boot time, we use Packer to create an immutable image based on a source image. Currently only Ubuntu is supported.
Running the packer commands below will create the following image:
```
acstack-ubuntu-17.10-{{timestamp}}
```
### Create the ACStack Base Image
#### Create resource group
During the build process, Packer creates temporary Azure resources as it builds the source VM. To capture that source VM for use as an image, you must define a resource group. The output from the Packer build process is stored in this resource group.
-`az group create -n myResourceGroup -l westus2`
#### Edit Packer settings
Edit `package/settings.json` with required settings such as your subscription id.
- To generate credentials: `az ad sp create-for-rbac --query "{ client_id: appId, client_secret: password, tenant_id: tenant }" -o json`
- To get your subscription id: `az account show --query "{ subscription_id: id }" -o json`
```
cd packer
packer build -var-file=settings.json acstack.json
```
## Terraform
Terraform will be used to declare and provision a Kubernetes cluster.