Packer Flashcards

1
Q

Packer

A

Identical machine image creator. Capable of multi-platform image creation. Not a configuration manager, instead in parallel of managers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Packer templates

A

JSON files, portable, static, RW, human and machine editable.
builders: kind of image: avi, docker, both?
Description
Min_packer_version
Post-processor: tagging docker image, publishing.
Provisioners: how to configure image. Puppet, Chef, Ansible, shell scripts.
Variables: Key Value pairs consumed in template.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

packer build

A

Runs all in order, generates set of artifacts given template.

fix: finds backwards incompatible parts, brings them up to date if possible.
inspect: Reads template and outputs various components template defines.
validate: checks syntax, configuration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Provisioners

A

Install and configure image after booting.
Ansible: Local, remote Ansible on guest, playbooks.
Chef: Solo ( local execution, requires uploading of cookbooks. ) or Server ( Chef Client ).
File: upload files.
PowerShell:
Puppet:
Shell:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Cloud Init

A

Frequently used package with Packer, python scripts handling cloud initialization. Can be used to set default locale, instance host name, instance ssh key generation, adding ssh to user’s .ssh/authorized-keys.
Installed on Ubuntu Cloud Images, EC2, Azure, GCE.
Also on Red Hat, Debian.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

cloud-init init

A

Performs initial modules.
module: Activate modules with configuration key.
single: runs single module.
dhclient-hook: runs the dhclient hook to record network info.
features: lists defined features.
analyze: Analyzes logs and data.
devel: runs developer tools.
collect-logs: collets and tar all cloud-init debug info.
clean: remove logs and artifacts to rerun
status: reports cloud-init status or wait on completion.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

User-Data Script

A

Cloud-init.
Typically used to execute shell script.
Begins as #! or Content-Type: text/x-shellscript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Include File

A

Cloud-init
Include file
Begin as #include or Content-Type: text/x-include-url

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Cloud Config Data

A

Cloud Init
Simplest way to accomplish some things via user-data. Cloud-config syntax, can specify certain things in human-friendly format.
Begin as #cloud-config or Content-Type: text/cloud-config

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Upstart Job

A

Cloud Init
Content placed into file in /etc/init and will be consumed by upstart as any other upstart job.
As #upstart-job or Content-Type: text/upstart-job

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Cloud Boothook

A

Cloud Init
boothook data. Stored in file under /var/lib/cloud and executed immediately.
Begin as #cloud-boothook or Content-Type: text/cloud-boothook

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Part Hander

A

Cloud Init
Contains custom code for either supporting new mime-types in multi-part user data or overriding existing handlers for supported mime-types.
Begin as #part-handler or Content-Type: text/part-handler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Format example:

A
#!/bin/sh
echo “Hello World”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly