X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=packer%2Fubuntu1604-juju.json;fp=packer%2Fubuntu1604-juju.json;h=15db3121c232cc4829da3a2a4f7723f764f27e9a;hb=79731f43c074d742a3d90b02684bf48d4bf3b3c1;hp=79b49eda47858cbb1ae3cbc68e43302988592041;hpb=1b64bd46bd7765a4dc3eee3d868bf0d6cc95ca66;p=osm%2Fdevops.git diff --git a/packer/ubuntu1604-juju.json b/packer/ubuntu1604-juju.json index 79b49eda..15db3121 100644 --- a/packer/ubuntu1604-juju.json +++ b/packer/ubuntu1604-juju.json @@ -21,7 +21,17 @@ }, { "type": "shell", - "script": "scripts/juju-setup.sh" + "inline": ["echo 'vagrant' | sudo shutdown -r now"], + "expect_disconnect": "true" + }, + { + "type": "shell", + "script": "scripts/juju-setup.sh", + "pause_before": "10s" + }, + { + "type": "shell", + "script": "scripts/cleanup.sh" } ], "builders": [ @@ -54,7 +64,7 @@ "" ], "boot_wait": "10s", - "disk_size": 15360, + "disk_size": 20480, "guest_os_type": "Ubuntu_64", "headless": true, "http_directory": "http", @@ -71,7 +81,8 @@ "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now", "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", "virtualbox_version_file": ".vbox_version", - "vm_name": "packer-ubuntu-16.04-amd64-juju", + "output_directory": "jujubase-{{timestamp}}", + "vm_name": "xenial-jujubase", "vboxmanage": [ [ "modifyvm", @@ -87,5 +98,12 @@ ] ] } + ], + "post-processors": [ + { + "output": "jujubase-{{timestamp}}/{{.Provider}}-jujubase.box", + "type": "vagrant", + "keep_input_artifact": true + } ] }