-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.txt
70 lines (50 loc) · 2.54 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
,
"override": {
"virtualbox-iso": {
"execute_command": "echo 'centos'|sudo -S bash '{{.Path}}'"
}
}
"virtualbox_version_file": ".vbox_version",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
aws ec2 import-image --cli-input-json "{\"Description\": \"centos-${centos_version}-x86_64-${build_timestamp}-disk1\",\"DiskContainers\": [{\"Description\": \"centos-${centos_version}-x86_64-${build_timestamp}-disk1\",\"UserBucket\": {\"S3Bucket\": \"${s3_bucket}\",\"S3Key\": \"centos-${centos_version}-x86_64-${build_timestamp}-disk1.vmdk\"}}]}"
packer-virtualbox-iso-1469314539-disk1.vmdk
centos-7.2.1511-x86_64-1469314539.vmdk
aws ec2 import-image --cli-input-json "{\"Description\": \"packer-virtualbox-iso-1469314539-disk1\",\"DiskContainers\": [{\"Description\": \"packer-virtualbox-iso-1469314539-disk1\",\"UserBucket\": {\"S3Bucket\": \"kettlewell-images\",\"S3Key\": \"packer-virtualbox-iso-1469314539-disk1.vmdk\"}}]}"
---------------
Should really consider creating a minimal, bare-bones image as an AMI,
and then use packers 'amazon-ebs' builder to configure and provision new images ...
---------------
"scripts": [
"scripts/console.sh",
"scripts/disable-rhgb.sh",
"scripts/yum_installs.sh",
"scripts/pip_installs.sh",
"scripts/ansible.sh",
"scripts/ansible-deploys.sh",
"scripts/ansible-profile.sh",
"scripts/term-profile.sh",
"scripts/rhel-bug-1212883.sh",
"scripts/dracut-growpart.sh",
"scripts/cloud-init.sh",
"scripts/avahi-daemon.sh",
"scripts/kdump.sh",
"scripts/lock-root.sh",
"scripts/cleanup.sh"
]
-----------
Still need to verify that the ansible deploy depot is uploaded and usable, as well as any AWS security roles that need to be applied
-----------
To integrate the amazon import process directly into Packer, you can
use a post-processor of type amazon-import, like so:
"post-processors": [
{
"type": "amazon-import",
"region": "us-east-1",
"s3_bucket_name": "my-bucket-name",
"tags": {
"Description": "packer amazon-import {{timestamp}}"
}
}
]
I may use this again, instead of using a shell script.... it does mean that you have to rebuild the entire thing from scratch,
and not as flexible as what a shell script can be, but there is a lot of simplicity here that can't be underestimated.