This repository has been archived by the owner on Aug 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample-local.json
104 lines (104 loc) · 2.75 KB
/
sample-local.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
{
"variables": {
"version" : "1.0.{{timestamp}}",
"http":"http",
"ks_file": "/foo.cfg",
"distribution":"",
"scripts_path":"scripts/foo",
"name":"packer-foo-7-x86_64",
"shutdown":"echo 'vagrant'|sudo -S /sbin/halt -h -p",
"iso_base_url": "iso",
"iso_checksum_type": "sha256",
"username": "vagrant",
"password": "vagrant",
"disk_size": "40960",
"timeout": "300m",
"headless": "true",
"iso_checksum": "foobarchecksum"
},
"builders": [
{
"type": "qemu",
"qemu_binary": "/usr/libexec/qemu-kvm",
"iso_urls": [
"{{user `iso_base_url`}}/.iso",
"http://iso"
],
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"ssh_username": "{{user `username`}}",
"ssh_password": "{{user `password`}}",
"ssh_wait_timeout": "{{user `timeout`}}",
"disk_size": "{{user `disk_size`}}",
"headless": "{{user `headless`}}",
"format": "{{user `format`}}",
"accelerator": "kvm",
"net_device": "virtio-net",
"disk_interface": "virtio",
"http_directory": "{{user `http`}}",
"boot_command": [
""
],
"shutdown_command": "{{user `shutdown`}}",
"qemuargs": [[ "-m", "2048M" ],[ "-smp", "2" ]],
"vm_name": "{{user `name`}}"
},
{
"type": "virtualbox-iso",
"iso_urls": [
"{{user `iso_base_url`}}/.iso",
"http://.iso"
],
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"ssh_username": "{{user `username`}}",
"ssh_password": "{{user `password`}}",
"ssh_wait_timeout": "{{user `timeout`}}",
"disk_size": "{{user `disk_size`}}",
"guest_os_type": "RedHat_64",
"headless": "{{user `headless`}}",
"http_directory": "{{user `http`}}",
"boot_command": [
""
],
"shutdown_command": "{{user `shutdown`}}",
"virtualbox_version_file": ".vbox_version",
"vm_name": "{{user `name`}}",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"2048"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"2"
]
]
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"scripts": [
"{{user `scripts_path`}}/vagrant.sh",
"{{user `scripts_path`}}/update.sh",
"{{user `scripts_path`}}/sshd.sh",
"{{user `scripts_path`}}/cleanup.sh"
]
}
],
"post-processors": [
[
{
"output": "builds/{{user `distribution`}}-{{.Provider}}.box",
"compression_level": 9,
"type": "vagrant"
}
]
]
}