Skip to content
This repository was archived by the owner on Mar 2, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packer_cache/
output*/
10 changes: 9 additions & 1 deletion packer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@ build the AMI's
From this directory, simply run:

```
/path/to/packer build -var-file <YOUR REGION>.json -var kubernetes_version=<YOUR K8S VERSION> -var kubernetes_cni_version=<YOUR K8S CNI VERSION> -var build_version=`git rev-parse HEAD` packer.json
$ /path/to/packer build -var-file <YOUR REGION>.json -var kubernetes_version=<YOUR K8S VERSION> -var kubernetes_cni_version=<YOUR K8S CNI VERSION> -var build_version=`git rev-parse HEAD` packer.json
```
This will build AMI images in the us-east AWS region (additional region support to follow).

You may limit which images build by adding the `-only=` flag to Packer.

build raw images
----------------
From this directory, run:
```
$ cloud-localds cloud.img cloud.cfg
$ /path/to/packer -var kubernetes_version=<YOUR K8S VERSION> -var kubernetes_cni_version=<YOUR K8S CNI VERSION> -var build_version=`git rev-parse HEAD` packer.json
```

deployment
----------
There is a helper script to aid in seeding built AMI's to all other AWS regions.
Expand Down
5 changes: 5 additions & 0 deletions packer/cloud.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#cloud-config
password: ubuntu
ssh_pwauth: true
chpasswd:
expire: false
25 changes: 25 additions & 0 deletions packer/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,31 @@
"kubernetes_version": "{{user `kubernetes_version`}}",
"kubernetes_cni_version": "{{user `kubernetes_cni_version`}}"
}
},
{
"name": "raw-ubuntu-16.04",
"type": "qemu",
"iso_url": "http://mirrors.servercentral.com/ubuntu-cloud-images/xenial/current/xenial-server-cloudimg-amd64-disk1.img",
"iso_checksum": "bdfcdcba8c31dba48b5d5482ae922d153a4d46b2",
"iso_checksum_type": "sha1",
"disk_image": true,
"disk_size": 2500,
"format": "raw",
"headless": true,
"disk_compression": true,
"ssh_username": "ubuntu",
"ssh_password": "ubuntu",
"disk_interface": "virtio",
"accelerator": "none",
"qemuargs": [
"-no-kvm",
[ "-machine", "pc" ],
[ "-m", "2048M" ],
["-smp", "2"],
["-fda", "cloud.img"],
["-serial", "mon:stdio"]
],
"vnc_bind_address": "0.0.0.0"
}
],
"provisioners": [
Expand Down