File tree Expand file tree Collapse file tree 8 files changed +81
-0
lines changed Expand file tree Collapse file tree 8 files changed +81
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ common_rpms:
2222- jq
2323- nfs-utils
2424common_extra_rpms : []
25+ cloud_init_version : 18.3-52-gc5f78957-1~bddeb~18.04.1
2526common_debs :
2627- openssh-client
2728- openssh-server
@@ -33,6 +34,9 @@ common_debs:
3334- ntp
3435- jq
3536- nfs-client
37+
38+ common_pinned_debs :
39+ - " cloud-init={{ cloud_init_version }}"
3640common_extra_debs : []
3741common_redhat_epel_rpm : " https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
3842common_redhat_cloud_init_copr_rpm : " https://copr.fedorainfracloud.org/coprs/jdetiber/cloud-init/repo/epel-7/jdetiber-cloud-init-epel-7.repo"
Original file line number Diff line number Diff line change 3838 force_apt_get : True
3939 name : " {{ common_extra_debs }}"
4040 state : latest
41+
42+ - name : install pinned debs
43+ apt :
44+ force_apt_get : True
45+ name : " {{ common_pinned_debs }}"
46+ state : present
47+ force : yes
Original file line number Diff line number Diff line change 1+ package :
2+ {{range $name, $vers := index .Vars "packages"}}
3+ {{$name}}:
4+ installed : true
5+ versions :
6+ {{range $vers}}
7+ - {{.}}
8+ {{end}}
9+ {{end}}
Original file line number Diff line number Diff line change 1+ packages :
2+ cloud-init :
3+ - " 18.3+52.gc5f78957"
Original file line number Diff line number Diff line change 1+ packages :
2+ cloud-init :
3+ - " 18.3-52-gc5f78957-1~bddeb~18.04.1"
Original file line number Diff line number Diff line change 9898 " --extra-vars" ,
9999 " kubernetes_version={{user `kubernetes_version`}} kubernetes_cni_version={{user `kubernetes_cni_version`}}"
100100 ]
101+ },
102+ {
103+ "type" : " goss" ,
104+ "vars_file" : " goss/redhat-vars.yaml" ,
105+ "tests" : [
106+ " goss/goss.yaml"
107+ ],
108+ "only" : [
109+ " amazon-2" ,
110+ " centos-7"
111+ ]
112+ },
113+ {
114+ "type" : " goss" ,
115+ "vars_file" : " goss/ubuntu-vars.yaml" ,
116+ "tests" : [
117+ " goss/goss.yaml"
118+ ],
119+ "only" : [
120+ " ubuntu-1804"
121+ ]
101122 }
102123 ]
103124}
Original file line number Diff line number Diff line change 55- [ Getting started] ( getting-started.md )
66- [ List of AMIs] ( amis.md )
77- [ Accessing cluster instances] ( accessing-instances.md )
8+ - [ Packer] ( packer.md )
89
910## Development
1011
Original file line number Diff line number Diff line change 1+ # Using Packer and baking AMIs
2+
3+ ## Overview
4+
5+ [ Packer] ( http://packer.io/ ) is well known tool for baking images of any kind.
6+ We use it to bake our AMIs.
7+
8+ ## Prerequisites
9+
10+ * ` packer ` binary
11+ * [ packer-goss] ( https://github.com/YaleUniversity/packer-provisioner-goss ) plugin
12+ * ansible
13+
14+ ## Plugin instalation
15+
16+ To install ` packer-goss ` plugin the following should be executed inside of the
17+ ` build/amis/packer ` directory:
18+
19+ ``` bash
20+ $ curl -o packer-goss https://github.com/YaleUniversity/packer-provisioner-goss/releases/download/v0.3.0/packer-provisioner-goss-v0.3.0-linux-amd64
21+
22+ $ chmod +x packer-goss
23+ ```
24+
25+ ## Running Packer
26+
27+ The following command should build all the AMIs:
28+
29+ ``` bash
30+ $ AWS_REGION=us-east-1 packer build -var-file=base-images-us-east-1.json packer.json
31+ ```
32+
33+ ** NOTE** that AWS credentials have to be set.
You can’t perform that action at this time.
0 commit comments