Add Centos 7 image to CSIT.
[csit.git] / resources / tools / disk-image-builder / centos / centos-7-1511.json
1 {
2   "_c": "CentOS-7 ISO URL at the time of creation of this file (05/2016)",
3   "_c": "was http://centos.mirrors.hoobly.com/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso .",
4   "_c": "",
5   "variables": {
6     "release": null,
7     "output_dir": null,
8     "temp_dir": null,
9     "atlas_token": "{{env `ATLAS_TOKEN`}}",
10     "virl_user": "{{env `VIRL_USER`}}",
11     "virl_password": "{{env `VIRL_PASSWORD`}}"
12   },
13   "builders": [
14     {
15       "name": "{{user `release`}}-virtualbox",
16       "type": "virtualbox-iso",
17       "guest_os_type": "RedHat_64",
18       "iso_url": "http://centos.mirrors.hoobly.com/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
19       "iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67",
20       "iso_checksum_type": "md5",
21       "output_directory": "{{user `output_dir`}}",
22       "ssh_username": "root",
23       "ssh_password": "csit",
24       "disk_size": "4096",
25       "shutdown_command": "echo 'packer' | sudo -S /sbin/halt -h -p",
26       "http_directory": "html",
27       "iso_target_path" : "build/centos-7-1511.iso",
28       "headless": "true",
29       "boot_command":
30         [
31           "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
32         ]
33     },
34     {
35       "name": "{{user `release`}}-qemu",
36       "type": "qemu",
37       "iso_url": "http://centos.mirrors.hoobly.com/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
38       "iso_checksum": "88c0437f0a14c6e2c94426df9d43cd67",
39       "iso_checksum_type": "md5",
40       "output_directory": "{{user `output_dir`}}",
41       "ssh_username": "root",
42       "ssh_password": "csit",
43       "ssh_wait_timeout": "30m",
44       "disk_size": "4096",
45       "shutdown_command": "echo 'packer' | sudo -S /sbin/halt -h -p",
46       "http_directory": "html",
47       "iso_target_path" : "build/centos-7-1511.iso",
48       "headless": "true",
49       "boot_command":
50         [
51           "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
52         ]
53     }
54   ],
55   "provisioners": [
56     {
57       "type": "file",
58       "source": "{{ user `temp_dir`}}",
59       "destination": "/root"
60     },
61     {
62       "type": "shell",
63       "script": "scripts-remote/post-install.sh"
64     },
65     {
66       "type": "shell",
67       "only": ["{{user `release`}}-qemu"],
68       "script": "scripts-remote/serial-console-centos-7-1511.sh"
69     },
70     {
71       "type": "shell",
72       "only": ["{{user `release`}}-virtualbox"],
73       "script": "scripts-remote/vagrant-user.sh"
74     },
75     {
76       "type": "shell",
77       "only": ["{{user `release`}}-virtualbox"],
78       "script": "scripts-remote/vagrant-guestadditions.sh"
79     },
80     {
81       "type": "shell",
82       "script": "scripts-remote/cleanup.sh"
83     }
84   ],
85   "post-processors": [
86     {
87       "type": "vagrant",
88       "only": ["{{user `release`}}-virtualbox"],
89       "keep_input_artifact": true
90     },
91     {
92       "type": "shell-local",
93       "only": ["{{user `release`}}-qemu"],
94       "script": "scripts-local/upload-image-to-virl.sh",
95       "keep_input_artifact": true,
96       "environment_vars":
97         [
98           "VIRL_USER={{user `virl_user`}}",
99           "VIRL_PASSWORD={{user `virl_password`}}",
100           "VIRL_IMAGE_SUBTYPE=server",
101           "VIRL_IMAGE_NAME={{user `release`}}"
102         ]
103      }
104   ]
105 }