blob: 5b22d2e073850884f470bb545931be49317c1907 [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 Marchettic20704e2018-07-11 21:59:51 +020022 "vm_name": "xenial-osm",
Michael Marchetti6d3457b2018-07-11 20:28:44 +020023 "build_dir": "osm-{{timestamp}}"
Mike Marchetti1b64bd42018-06-13 09:21:40 -040024 },
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`}}",
Michael Marchetti6d3457b2018-07-11 20:28:44 +020037 "output_directory": "{{user `build_dir`}}",
Mike Marchetti1b64bd42018-06-13 09:21:40 -040038 "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": [
Michael Marchetti79731f42018-07-10 18:07:12 +020055 [
56 {
Michael Marchetti6d3457b2018-07-11 20:28:44 +020057 "output": "{{user `build_dir`}}/{{.Provider}}-osm.box",
Michael Marchetti79731f42018-07-10 18:07:12 +020058 "type": "vagrant",
59 "keep_input_artifact": true
60 },
61 {
62 "type": "vagrant-cloud",
63 "box_tag": "osm/{{user `release`}}",
64 "access_token": "{{user `cloud_token`}}",
65 "version": "{{user `version`}}"
66 }
67 ]
Mike Marchetti1b64bd42018-06-13 09:21:40 -040068 ]
69}