Major refactor of Packer Vagrant+Docker logic
[integration/packaging.git] / packer / templates / libvirt.json
1 {
2   "variables": {
3     "odl_version": null,
4     "centos_version": null,
5     "iso_urls": null,
6     "iso_checksum": null,
7     "rpm_repo_file": null,
8     "rpm_repo_url": null
9   },
10   "builders": [
11     {
12       "type": "qemu",
13       "iso_urls": "{{ user `iso_urls` }}",
14       "iso_checksum": "{{ user `iso_checksum` }}",
15       "iso_checksum_type": "sha256",
16       "ssh_username": "vagrant",
17       "ssh_password": "vagrant",
18       "ssh_wait_timeout": "20m",
19       "shutdown_command": "sudo shutdown -P now",
20       "http_directory": ".",
21       "boot_command":
22         [
23         "<tab>text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/provision/centos_kickstart.cfg<enter>"
24         ]
25     }
26   ],
27   "provisioners": [
28     {
29       "type": "shell",
30       "scripts":
31         [
32           "provision/config_vagrant.sh",
33           "provision/config_ansible.sh"
34         ]
35     },
36     {
37       "type": "ansible-local",
38       "playbook_file": "provision/install_odl.yml",
39       "extra_arguments": [
40         "--extra-vars",
41         "\"rpm_repo_file={{ user `rpm_repo_file` }}",
42         "rpm_repo_url={{ user `rpm_repo_url` }}\""
43       ]
44     }
45   ],
46   "post-processors": [
47     {
48       "type": "vagrant",
49       "compression_level": "9",
50       "output": "opendaylight-{{ user `odl_version` }}-centos-{{ user `centos_version` }}-libvirt.box"
51     }
52   ]
53 }