blob: d4a2c776e299544c6f9741a7b3eaef4a2b1705a5 [file] [log] [blame]
Mike Marchetti1b64bd42018-06-13 09:21:40 -04001{
2 "provisioners": [
3 {
4 "type": "shell",
5 "script": "scripts/get-install-osm.sh",
Michael Marchetti79731f42018-07-10 18:07:12 +02006 "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"
Mike Marchetti1b64bd42018-06-13 09:21:40 -040012 },
13 {
14 "type": "shell",
15 "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
16 "script": "scripts/cleanup.sh"
17 }
18 ],
19 "variables": {
Michael Marchetti79731f42018-07-10 18:07:12 +020020 "osm_install_options": "--vimemu",
Mike Marchetti1b64bd42018-06-13 09:21:40 -040021 "input_ovf": "output-virtualbox-iso/packer-ubuntu-16.04-amd64-juju.ovf",
Michael Marchetti79731f42018-07-10 18:07:12 +020022 "vm_name": "xenial-osm"
Mike Marchetti1b64bd42018-06-13 09:21:40 -040023 },
24 "builders": [
25 {
26 "type": "virtualbox-ovf",
27 "source_path": "{{user `input_ovf`}}",
28 "headless": true,
29 "ssh_username": "vagrant",
30 "ssh_password": "vagrant",
31 "ssh_port": 22,
32 "ssh_wait_timeout": "10000s",
33 "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
34 "virtualbox_version_file": ".vbox_version",
35 "vm_name": "{{user `vm_name`}}",
Michael Marchetti79731f42018-07-10 18:07:12 +020036 "output_directory": "osm-{{timestamp}}",
Mike Marchetti1b64bd42018-06-13 09:21:40 -040037 "vboxmanage": [
38 [
39 "modifyvm",
40 "{{.Name}}",
41 "--memory",
42 "4096"
43 ],
44 [
45 "modifyvm",
46 "{{.Name}}",
47 "--cpus",
48 "2"
49 ]
50 ]
51 }
52 ],
53 "post-processors": [
Michael Marchetti79731f42018-07-10 18:07:12 +020054 [
55 {
56 "output": "osm-{{timestamp}}/{{.Provider}}-osm.box",
57 "type": "vagrant",
58 "keep_input_artifact": true
59 },
60 {
61 "type": "vagrant-cloud",
62 "box_tag": "osm/{{user `release`}}",
63 "access_token": "{{user `cloud_token`}}",
64 "version": "{{user `version`}}"
65 }
66 ]
Mike Marchetti1b64bd42018-06-13 09:21:40 -040067 ]
68}