blob: 2df566ee13248d7c81c449f8d976c42fe3d08d9d [file] [log] [blame]
Michael Marchetti1b60d172018-08-02 17:15:48 +02001{
2 "provisioners": [
3 {
4 "type": "shell",
5 "script": "scripts/get-install-osm.sh",
6 "execute_command": "{{.Path}} {{user `osm_install_options`}}"
7 },
8 {
9 "type": "shell",
10 "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
11 "script": "scripts/vimemu.sh"
12 },
13 {
14 "type": "shell",
15 "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
16 "script": "scripts/cleanup.sh"
17 }
18 ],
19 "variables": {
20 "osm_install_options": "--vimemu",
21 "input_ovf": "output-virtualbox-iso/packer-ubuntu-16.04-amd64-juju.ovf",
22 "vm_name": "xenial-osm",
23 "build_dir": "osm-{{timestamp}}"
24 },
25 "builders": [
26 {
27 "type": "virtualbox-ovf",
28 "source_path": "{{user `input_ovf`}}",
29 "headless": true,
30 "ssh_username": "vagrant",
31 "ssh_password": "vagrant",
32 "ssh_port": 22,
33 "ssh_wait_timeout": "10000s",
34 "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
35 "virtualbox_version_file": ".vbox_version",
36 "vm_name": "{{user `vm_name`}}",
37 "output_directory": "{{user `build_dir`}}",
38 "vboxmanage": [
39 [
40 "modifyvm",
41 "{{.Name}}",
42 "--memory",
43 "4096"
44 ],
45 [
46 "modifyvm",
47 "{{.Name}}",
48 "--cpus",
49 "2"
50 ]
51 ]
52 }
53 ],
54 "post-processors": [
55 [
56 {
57 "output": "{{user `build_dir`}}/{{.Provider}}-osm.box",
58 "type": "vagrant",
59 "keep_input_artifact": true
60 }
61 ]
62 ]
63}