28f26f3ea14e245e1dca447e8f3e04a1d4138186
[csit.git] / resources / tools / disk-image-builder / ubuntu / ubuntu-14.04.4.json
1 {
2   "_c": "Ubuntu 14.04.4 ISO URL at the time of creation of this file (05/2016)",
3   "_c": "was http://releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso .",
4   "_c": "",
5   "_c": "If and when 14.04.4 becomes superseded, this URL will likely change",
6   "_c": "to:",
7   "_c": "http://old-releases.ubuntu.com/releases/14.04.4/ubuntu-14.04.4-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/14.04/ubuntu-14.04.4-server-amd64.iso",
22       "iso_checksum": "2ac1f3e0de626e54d05065d6f549fa3a",
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-14.04.4-server-amd64.iso",
30       "boot_command":
31         [
32           "<esc><esc><enter><wait>",
33           "/install/vmlinuz noapic ",
34           "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
35           "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
36           "hostname=csit ",
37           "fb=false debconf/frontend=noninteractive ",
38           "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
39           "keyboard-configuration/variant=USA console-setup/ask_detect=false ",
40           "initrd=/install/initrd.gz -- <enter>"
41         ]
42     },
43     {
44       "name": "{{user `release`}}-qemu",
45       "type": "qemu",
46       "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso",
47       "iso_checksum": "2ac1f3e0de626e54d05065d6f549fa3a",
48       "iso_checksum_type": "md5",
49       "output_directory": "{{user `output_dir`}}",
50       "ssh_username": "root",
51       "ssh_password": "csit",
52       "disk_size": "4096",
53       "http_directory": "html",
54       "iso_target_path" : "build/ubuntu-14.04.4-server-amd64.iso",
55       "headless": "true",
56       "boot_command":
57         [
58           "<esc><esc><enter><wait>",
59           "/install/vmlinuz noapic ",
60           "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
61           "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
62           "hostname=csit ",
63           "fb=false debconf/frontend=noninteractive ",
64           "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
65           "keyboard-configuration/variant=USA console-setup/ask_detect=false ",
66           "initrd=/install/initrd.gz -- <enter>"
67         ]
68     }
69   ],
70   "provisioners": [
71     {
72       "type": "file",
73       "source": "{{ user `temp_dir`}}",
74       "destination": "/root"
75     },
76     {
77       "type": "shell",
78       "script": "scripts-remote/post-install.sh"
79     },
80     {
81       "type": "shell",
82       "only": ["{{user `release`}}-qemu"],
83       "script": "scripts-remote/serial-console.sh"
84     },
85     {
86       "type": "shell",
87       "only": ["{{user `release`}}-virtualbox"],
88       "script": "scripts-remote/vagrant-user.sh"
89     },
90     {
91       "type": "shell",
92       "only": ["{{user `release`}}-virtualbox"],
93       "script": "scripts-remote/vagrant-guestadditions.sh"
94     },
95     {
96       "type": "shell",
97       "script": "scripts-remote/cleanup.sh"
98     }
99   ],
100   "post-processors": [
101     {
102       "type": "vagrant",
103       "only": ["{{user `release`}}-virtualbox"],
104       "keep_input_artifact": true
105     },
106     {
107       "type": "shell-local",
108       "only": ["{{user `release`}}-qemu"],
109       "script": "scripts-local/upload-image-to-virl.sh",
110       "keep_input_artifact": true,
111       "environment_vars":
112         [
113           "VIRL_USER={{user `virl_user`}}",
114           "VIRL_PASSWORD={{user `virl_password`}}",
115           "VIRL_IMAGE_SUBTYPE=server",
116           "VIRL_IMAGE_NAME={{user `release`}}"
117         ]
118      }
119   ]
120 }