imfreedom/bamboo-terraform

a70f5ef491c9
make sure the cloud init images end up in the right pool
# Pidgin Bamboo Terraform
# Requirements
terraform and terraform-libvirt provider
# Terraform Host
mkisofs and libvirt are needed on the machine where terraform is running for
these plans to run properly.
On Debian based hosts there is an apparmor policy that missing that will cause
permission errors. To fix it you need to add the following to
`/etc/apparmor.d/abstractions/libvirt-qemu`. I've been putting it at the end
of the file and everything is fine.
```
# for terraform-libvirt
/var/lib/libvirt/images/* rwk,
```
# Usage
You need to have a `node.tfvars` in the `nodes/` directory which has contents
like the following.
```
libvirt_uri = "qemu:///system"
admin_ssh_pubkey = "ssh pubkey"
worker_count = 2
```
`libvirt_uri` is the connect string for libvirt and `admin_ssh_pubkey` is the
SSH pubkey that should be accepted for the root user.
`worker_count` is the number of Bamboo agents to provision.
You can also use the `volume_pool` variable to use a different volume pool.
Once that file is created you provision it via:
```
make plan NODE=node1
make apply NODE=node1
```