d963ccd2eb52118f5b8df62c8c203669b6eb2d9f
[packer_vagrant.git] / jessie.json
1 {
2     "push": {
3       "name": "",
4       "vcs": true
5     },
6     "variables": {
7         "atlas_username": "{{env `ATLAS_USERNAME`}}",
8         "atlas_name": "{{env `ATLAS_NAME`}}",
9         "disk_size": "10000",
10         "password": "vagrant",
11         "user": "vagrant",
12         "hostname": "varac-jessie"
13     },
14     "provisioners": [
15         {
16             "type": "shell",
17             "scripts": [
18                 "scripts/base.sh",
19                 "scripts/custom.sh",
20                 "scripts/virtualbox.sh",
21                 "scripts/vagrant.sh",
22                 "scripts/dep.sh",
23                 "scripts/cleanup.sh",
24                 "scripts/zerodisk.sh"
25             ],
26             "override": {
27                 "qemu": {
28                     "execute_command": "echo 'vagrant'|sudo -S bash '{{.Path}}'"
29                 },
30                 "virtualbox-iso": {
31                     "execute_command": "echo 'vagrant'|sudo -S bash '{{.Path}}'"
32                 }
33             }
34         }
35     ],
36     "builders": [
37     {
38       "type": "qemu",
39       "accelerator": "kvm",
40       "boot_command": [
41         "<esc><wait><wait>",
42         "install auto <wait>",
43         "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
44         "debian-installer=en_US locale=en_US.UTF-8 keymap=us <wait>",
45         "netcfg/get_hostname={{ .Name }} <wait>",
46         "netcfg/get_domain={{ user `domain`}} <wait>",
47         "hostname={{user `hostname`}} ",
48         "fb=false debconf/frontend=noninteractive <wait>",
49         "passwd/user-fullname={{user `user`}} <wait>",
50         "passwd/user-password={{user `password`}} <wait>",
51         "passwd/user-password-again={{user `password`}} <wait>",
52         "passwd/username={{user `user`}} <wait>",
53         "<enter><wait>"
54       ],
55       "boot_wait": "5s",
56       "disk_cache": "none",
57       "disk_interface": "virtio",
58       "disk_size": "{{ user `disk_size`}}",
59       "format": "qcow2",
60       "headless": "true",
61       "http_directory": "http",
62       "iso_checksum": "762eb3dfc22f85faf659001ebf270b4f",
63       "iso_checksum_type": "md5",
64       "iso_url": "http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-8.2.0-amd64-netinst.iso",
65       "net_device": "virtio-net",
66       "qemuargs": [
67         [ "-m", "1024M" ]
68       ],
69       "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -h now",
70       "ssh_password": "{{user `password`}}",
71       "ssh_username": "{{user `user`}}",
72       "ssh_wait_timeout": "15m"
73     },
74       {
75             "type": "virtualbox-iso",
76             "boot_command": [
77               "<esc><wait><wait>",
78               "install auto <wait>",
79               "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
80               "debian-installer=en_US locale=en_US.UTF-8 keymap=us <wait>",
81               "netcfg/get_hostname={{ .Name }} <wait>",
82               "netcfg/get_domain={{ user `domain`}} <wait>",
83               "hostname={{user `hostname`}} ",
84               "fb=false debconf/frontend=noninteractive <wait>",
85               "passwd/user-fullname={{user `user`}} <wait>",
86               "passwd/user-password={{user `password`}} <wait>",
87               "passwd/user-password-again={{user `password`}} <wait>",
88               "passwd/username={{user `user`}} <wait>",
89               "<enter><wait>"
90             ],
91             "headless": true,
92             "boot_wait": "10s",
93             "disk_size": "{{ user `disk_size`}}",
94             "guest_os_type": "Debian_64",
95             "http_directory": "http",
96             "iso_checksum": "d393d17ac6b3113c81186e545c416a00f28ed6e05774284bb5e8f0df39fcbcb9",
97             "iso_checksum_type": "sha256",
98             "iso_url": "http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-8.2.0-amd64-netinst.iso",
99             "ssh_username": "vagrant",
100             "ssh_password": "vagrant",
101             "ssh_port": 22,
102             "ssh_wait_timeout": "15m",
103             "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'vagrant'|sudo -S bash 'shutdown.sh'",
104             "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
105             "virtualbox_version_file": ".vbox_version"
106        }
107     ],
108     "post-processors": [
109         [{
110             "type": "vagrant",
111             "keep_input_artifact": false
112         },
113         {
114             "type": "atlas",
115             "only": ["virtualbox-iso"],
116             "artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}",
117             "artifact_type": "vagrant.box",
118             "metadata": {
119                 "provider": "virtualbox",
120                 "created_at": "{{timestamp}}"
121             }
122         },
123         {
124             "type": "atlas",
125             "only": ["qemu"],
126             "artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}",
127             "artifact_type": "vagrant.box",
128             "metadata": {
129                 "provider": "libvirt",
130                 "created_at": "{{timestamp}}"
131             }
132         }]
133     ]
134 }