This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
packer-template.json
90 lines (89 loc) · 2.88 KB
/
packer-template.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
{
"provisioners": [
{
"type": "shell",
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"script": "bin/ansible.sh"
},
{
"type": "ansible-local",
"playbook_file": "ansible/centos.yml",
"playbook_dir": "ansible",
"extra_arguments": "-vvvvv"
},
{
"type": "ansible-local",
"playbook_file": "ansible/dcos-node.yml",
"playbook_dir": "ansible",
"extra_arguments": "-vvvvv"
},
{
"type": "shell",
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"script": "bin/zerodisk.sh"
}
],
"post-processors": [
{
"type": "vagrant",
"compression_level": 9,
"output": "dcos-centos-{{ .BuildName }}.box"
}
],
"builders": [
{
"type": "virtualbox-iso",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
],
"boot_wait": "5s",
"disk_size": 102400,
"guest_os_type": "RedHat_64",
"http_directory": "http",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"iso_url": "{{ user `iso_url` }}",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"ssh_username": "{{ user `ssh_username` }}",
"ssh_password": "{{ user `ssh_password` }}",
"shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"virtualbox_version_file": ".vbox_version",
"vboxmanage": [
[ "modifyvm", "{{.Name}}", "--memory", "2048" ],
[ "modifyvm", "{{.Name}}", "--cpus", "1" ]
]
},
{
"type": "vmware-iso",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
],
"boot_wait": "5s",
"disk_size": 102400,
"guest_os_type": "centos-64",
"http_directory": "http",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"iso_url": "{{ user `iso_url` }}",
"memory": 2048,
"cpus": 1,
"cores": 1,
"ssh_username": "{{ user `ssh_username` }}",
"ssh_password": "{{ user `ssh_password` }}",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "echo '/sbin/halt -h -p' > /tmp/shutdown.sh; echo 'vagrant'|sudo -S sh '/tmp/shutdown.sh'",
"tools_upload_flavor": "linux",
"vmx_remove_ethernet_interfaces": true
}
],
"variables": {
"iso_checksum_type": "sha256",
"iso_url": "https://mirror.bytemark.co.uk/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-2003.iso",
"iso_checksum": "659691c28a0e672558b003d223f83938f254b39875ee7559d1a4a14c79173193",
"ssh_username": "vagrant",
"ssh_password": "vagrant"
}
}