-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcentos-7.2-x86_64.json
160 lines (159 loc) · 4.86 KB
/
centos-7.2-x86_64.json
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
"variables": {
"box_basename": "centos-7.2-x86_64",
"build_timestamp": "{{isotime \"20060102150405\"}}",
"access_key": "$AWS_ACCESS_KEY",
"secret_key": "$AWS_SECRET_KEY",
"cpus": "2",
"disk_size": "40960",
"git_revision": "__unknown_git_revision__",
"headless": "true",
"iso_checksum": "907e5755f824c5848b9c8efbb484f3cd945e93faa024bad6ba875226f9683b16",
"iso_checksum_type": "sha256",
"iso_name": "CentOS-7-x86_64-DVD-1511.iso",
"ks_path_vagrant": "centos-7.2/vagrant/ks.cfg",
"ks_path_ami": "centos-7.2/ami/ks.cfg",
"memory": "4096",
"metadata": "floppy/metadata_centos-7.2-x86_64.json",
"mirror": "http://mirrors.kernel.org/centos",
"mirror_directory": "7.2.1511/isos/x86_64",
"name": "centos-7.2",
"template": "centos-7.2-x86_64",
"version": "0.1.TIMESTAMP"
},
"builders": [
{
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path_vagrant`}}<enter><wait>"
],
"type": "virtualbox-iso",
"name": "centos-7.2-x86_64-vagrant-dev",
"boot_wait": "10s",
"disk_size": "{{user `disk_size`}}",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"guest_os_type": "RedHat_64",
"hard_drive_interface": "sata",
"headless": "{{ user `headless` }}",
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "iso/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-vagrant-dev",
"shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -h -p",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_wait_timeout": "10000s",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"{{ user `memory` }}"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"{{ user `cpus` }}"
]
],
"virtualbox_version_file": ".vbox_version",
"vm_name": "packer-{{user `template`}}-vagrant-dev"
},
{
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path_ami`}}<enter><wait>"
],
"type": "virtualbox-iso",
"format": "ova",
"name": "centos-7.2-x86_64-ami",
"boot_wait": "10s",
"disk_size": "{{user `disk_size`}}",
"guest_additions_mode": "disable",
"guest_os_type": "RedHat_64",
"hard_drive_interface": "sata",
"headless": "{{ user `headless` }}",
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "iso/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-ami",
"shutdown_command": "echo 'root' | /sbin/halt -h -p",
"ssh_password": "nhu8BGY&",
"ssh_port": 22,
"ssh_username": "root",
"ssh_wait_timeout": "10000s",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"{{ user `memory` }}"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"{{ user `cpus` }}"
]
],
"virtualbox_version_file": ".vbox_version",
"vm_name": "packer-{{user `template`}}-ami"
}
],
"provisioners": [
{
"destination": "/tmp/metadata.json",
"source": "{{user `metadata`}}",
"type": "file"
},
{
"type": "shell",
"only": ["centos-7.2-x86_64-vagrant-dev"],
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'",
"environment_vars": [
"HOME_DIR=/home/vagrant"
],
"scripts": [
"scripts/common/metadata.sh",
"scripts/common/sshd.sh",
"scripts/centos/networking.sh",
"scripts/common/vagrant.sh",
"scripts/common/vmtools.sh",
"scripts/centos/cleanup.sh",
"scripts/common/minimize.sh"
]
},
{
"type": "shell",
"only": ["centos-7.2-x86_64-ami"],
"scripts": [
"scripts/common/metadata.sh",
"scripts/common/sshd.sh",
"scripts/centos/networking.sh",
"scripts/centos/cleanup.sh",
"scripts/common/minimize.sh"
]
}
],
"post-processors": [
{
"only": ["centos-7.2-x86_64-vagrant-dev"],
"output": "builds/{{user `box_basename`}}.vagrant.box",
"type": "vagrant"
},
{
"type": "amazon-import",
"only": ["centos-7.2-x86_64-ami"],
"access_key": "{{user `access_key`}}",
"secret_key": "{{user `secret_key`}}",
"region": "us-west-2",
"s3_bucket_name": "or-01p-s3-001",
"tags": {
"Description": "packer centos-7.2-x86_64 amazon-import {{timestamp}}",
"Name": "centos-7.2-x86_64-{{timestamp}}"
}
}
]
}