Update VIRL images to 16.04.1
[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://releases.ubuntu.com/16.04/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_command":
31         [
32           "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
33           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
34           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
35           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
36           "/install/vmlinuz<wait>",
37           " auto<wait>",
38           " console-setup/ask_detect=false<wait>",
39           " console-setup/layoutcode=us<wait>",
40           " console-setup/modelcode=pc105<wait>",
41           " debconf/frontend=noninteractive<wait>",
42           " debian-installer=en_US<wait>",
43           " fb=false<wait>",
44           " initrd=/install/initrd.gz<wait>",
45           " kbd-chooser/method=us<wait>",
46           " keyboard-configuration/layout=USA<wait>",
47           " keyboard-configuration/variant=USA<wait>",
48           " locale=en_US<wait>",
49           " netcfg/get_domain=vm<wait>",
50           " netcfg/get_hostname=virtualbox<wait>",
51           " grub-installer/bootdev=/dev/vda<wait>",
52           " noapic<wait>",
53           " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
54           " -- <wait>",
55            "<enter><wait>"
56         ]
57     },
58     {
59       "name": "{{user `release`}}-qemu",
60       "type": "qemu",
61       "iso_url": "http://releases.ubuntu.com/16.04.1/ubuntu-16.04.1-server-amd64.iso",
62       "iso_checksum": "d2d939ca0e65816790375f6826e4032f",
63       "iso_checksum_type": "md5",
64       "output_directory": "{{user `output_dir`}}",
65       "ssh_username": "root",
66       "ssh_password": "csit",
67       "disk_size": "4096",
68       "http_directory": "html",
69       "iso_target_path" : "build/ubuntu-16.04.1-server-amd64.iso",
70       "headless": "true",
71       "boot_command":
72         [
73           "<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
74           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
75           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
76           "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
77           "/install/vmlinuz<wait>",
78           " auto<wait>",
79           " console-setup/ask_detect=false<wait>",
80           " console-setup/layoutcode=us<wait>",
81           " console-setup/modelcode=pc105<wait>",
82           " debconf/frontend=noninteractive<wait>",
83           " debian-installer=en_US<wait>",
84           " fb=false<wait>",
85           " initrd=/install/initrd.gz<wait>",
86           " kbd-chooser/method=us<wait>",
87           " keyboard-configuration/layout=USA<wait>",
88           " keyboard-configuration/variant=USA<wait>",
89           " locale=en_US<wait>",
90           " netcfg/get_domain=vm<wait>",
91           " netcfg/get_hostname=qemu<wait>",
92           " grub-installer/bootdev=/dev/vda<wait>",
93           " noapic<wait>",
94           " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
95           " -- <wait>",
96            "<enter><wait>"
97         ]
98     }
99   ],
100   "provisioners": [
101     {
102       "type": "file",
103       "source": "{{ user `temp_dir`}}",
104       "destination": "/root"
105     },
106     {
107       "type": "shell",
108       "script": "scripts-remote/post-install.sh"
109     },
110     {
111       "type": "shell",
112       "only": ["{{user `release`}}-qemu"],
113       "script": "scripts-remote/serial-console-ubuntu-16.04.1.sh"
114     },
115     {
116       "type": "shell",
117       "only": ["{{user `release`}}-virtualbox"],
118       "script": "scripts-remote/vagrant-user.sh"
119     },
120     {
121       "type": "shell",
122       "only": ["{{user `release`}}-virtualbox"],
123       "script": "scripts-remote/vagrant-guestadditions.sh"
124     },
125     {
126       "type": "shell",
127       "script": "scripts-remote/cleanup.sh"
128     }
129   ],
130   "post-processors": [
131     {
132       "type": "vagrant",
133       "only": ["{{user `release`}}-virtualbox"],
134       "keep_input_artifact": true
135     },
136     {
137       "type": "shell-local",
138       "only": ["{{user `release`}}-qemu"],
139       "script": "scripts-local/upload-image-to-virl.sh",
140       "keep_input_artifact": true,
141       "environment_vars":
142         [
143           "VIRL_USER={{user `virl_user`}}",
144           "VIRL_PASSWORD={{user `virl_password`}}",
145           "VIRL_IMAGE_SUBTYPE=server",
146           "VIRL_IMAGE_NAME={{user `release`}}"
147         ]
148      }
149   ]
150 }