Update disk-image-builder scripts to allow IPv6
[csit.git] / resources / tools / disk-image-builder / ubuntu / ubuntu-16.04.1.json
1 {
2   "_c": "Ubuntu 16.04.1 ISO URL at the time of creation of this file (10/2016)",
3   "_c": "was http://releases.ubuntu.com/14.04/ubuntu-16.04.1-server-amd64.iso .",
4   "_c": "",
5   "_c": "If and when 16.04.1 becomes superseded, this URL will likely change",
6   "_c": "to:",
7   "_c": "http://old-releases.ubuntu.com/releases/16.04.1/ubuntu-16.04.1-server-amd64.iso",
8   "variables": {
9     "release": null,
10     "output_dir": null,
11     "temp_dir": null,
12     "atlas_token": "{{env `ATLAS_TOKEN`}}",
13     "virl_user": "{{env `VIRL_USER`}}",
14     "virl_password": "{{env `VIRL_PASSWORD`}}"
15   },
16   "builders": [
17     {
18       "name": "{{user `release`}}-virtualbox",
19       "type": "virtualbox-iso",
20       "guest_os_type": "Ubuntu_64",
21       "iso_url": "http://old-releases.ubuntu.com/releases/16.04.1/ubuntu-16.04.1-server-amd64.iso",
22       "iso_checksum": "d2d939ca0e65816790375f6826e4032f",
23       "iso_checksum_type": "md5",
24       "output_directory": "{{user `output_dir`}}",
25       "ssh_username": "root",
26       "ssh_password": "csit",
27       "disk_size": "4096",
28       "http_directory": "html",
29       "iso_target_path" : "build/ubuntu-16.04.1-server-amd64.iso",
30       "boot_wait": "30s",
31       "boot_command":
32         [
33           "<enter><wait>",
34           "<f6><esc>",
35           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
36           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
37           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
38           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
39           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
40           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
41           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
42           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
43           "<bs><bs><bs>",
44           "/install/vmlinuz",
45           " auto",
46           " console-setup/ask_detect=false",
47           " console-setup/layoutcode=us",
48           " console-setup/modelcode=pc105",
49           " debconf/frontend=noninteractive",
50           " debian-installer=en_US",
51           " fb=false",
52           " initrd=/install/initrd.gz",
53           " kbd-chooser/method=us",
54           " keyboard-configuration/layout=USA",
55           " keyboard-configuration/variant=USA",
56           " locale=en_US",
57           " netcfg/get_domain=vm",
58           " netcfg/get_hostname=qemu",
59           " grub-installer/bootdev=/dev/vda",
60           " noapic",
61           " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg --- ",
62           "<enter>"
63         ]
64     },
65     {
66       "name": "{{user `release`}}-qemu",
67       "type": "qemu",
68       "iso_url": "http://old-releases.ubuntu.com/releases/16.04.1/ubuntu-16.04.1-server-amd64.iso",
69       "iso_checksum": "d2d939ca0e65816790375f6826e4032f",
70       "iso_checksum_type": "md5",
71       "output_directory": "{{user `output_dir`}}",
72       "ssh_username": "root",
73       "ssh_password": "csit",
74       "disk_size": "4096",
75       "http_directory": "html",
76       "iso_target_path" : "build/ubuntu-16.04.1-server-amd64.iso",
77       "headless": "true",
78       "boot_wait": "30s",
79       "boot_command":
80         [
81           "<enter><wait>i",
82           "<f6><esc>",
83           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
84           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
85           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
86           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
87           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
88           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
89           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
90           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
91           "<bs><bs><bs>",
92           "/install/vmlinuz",
93           " auto",
94           " console-setup/ask_detect=false",
95           " console-setup/layoutcode=us",
96           " console-setup/modelcode=pc105",
97           " debconf/frontend=noninteractive",
98           " debian-installer=en_US",
99           " fb=false",
100           " initrd=/install/initrd.gz",
101           " kbd-chooser/method=us",
102           " keyboard-configuration/layout=USA",
103           " keyboard-configuration/variant=USA",
104           " locale=en_US",
105           " netcfg/get_domain=vm",
106           " netcfg/get_hostname=qemu",
107           " grub-installer/bootdev=/dev/vda",
108           " noapic",
109           " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg --- ",
110           "<enter>"
111         ]
112     }
113   ],
114   "provisioners": [
115     {
116       "type": "file",
117       "source": "{{ user `temp_dir`}}",
118       "destination": "/root"
119     },
120     {
121       "type": "shell",
122       "script": "scripts-remote/post-install.sh"
123     },
124     {
125       "type": "shell",
126       "only": ["{{user `release`}}-qemu"],
127       "script": "scripts-remote/serial-console-ubuntu-16.04.1.sh"
128     },
129     {
130       "type": "shell",
131       "only": ["{{user `release`}}-virtualbox"],
132       "script": "scripts-remote/vagrant-user.sh"
133     },
134     {
135       "type": "shell",
136       "only": ["{{user `release`}}-virtualbox"],
137       "script": "scripts-remote/vagrant-guestadditions.sh"
138     },
139     {
140       "type": "shell",
141       "script": "scripts-remote/disable_ipv6.sh"
142     },
143     {
144       "type": "shell",
145       "script": "scripts-remote/cleanup.sh"
146     }
147   ],
148   "post-processors": [
149     {
150       "type": "vagrant",
151       "only": ["{{user `release`}}-virtualbox"],
152       "keep_input_artifact": true
153     },
154     {
155       "type": "shell-local",
156       "only": ["{{user `release`}}-qemu"],
157       "script": "scripts-local/upload-image-to-virl.sh",
158       "keep_input_artifact": true,
159       "environment_vars":
160         [
161           "VIRL_USER={{user `virl_user`}}",
162           "VIRL_PASSWORD={{user `virl_password`}}",
163           "VIRL_IMAGE_SUBTYPE=server",
164           "VIRL_IMAGE_NAME={{user `release`}}"
165         ]
166      }
167   ]
168 }