X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=packer%2Fubuntu1604-ovf-osm.json;fp=packer%2Fubuntu1604-ovf-osm.json;h=08221bd2efc904ddf76359d580f1b9c90e9adc57;hb=1b64bd46bd7765a4dc3eee3d868bf0d6cc95ca66;hp=0000000000000000000000000000000000000000;hpb=0ebde16bc0c979a6a069fd5c089ffca700e1dc41;p=osm%2Fdevops.git diff --git a/packer/ubuntu1604-ovf-osm.json b/packer/ubuntu1604-ovf-osm.json new file mode 100644 index 00000000..08221bd2 --- /dev/null +++ b/packer/ubuntu1604-ovf-osm.json @@ -0,0 +1,53 @@ +{ + "provisioners": [ + { + "type": "shell", + "script": "scripts/get-install-osm.sh", + "execute_command": "{{.Path}} {{user `osm_installer`}}" + }, + { + "type": "shell", + "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", + "script": "scripts/cleanup.sh" + } + ], + "variables": { + "osm_installer": "https://osm-download.etsi.org/ftp/osm-4.0-four/install_osm.sh", + "input_ovf": "output-virtualbox-iso/packer-ubuntu-16.04-amd64-juju.ovf", + "vm_name": "packer-ubuntu-16.04-ovf-amd64" + }, + "builders": [ + { + "type": "virtualbox-ovf", + "source_path": "{{user `input_ovf`}}", + "headless": true, + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_wait_timeout": "10000s", + "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now", + "virtualbox_version_file": ".vbox_version", + "vm_name": "{{user `vm_name`}}", + "vboxmanage": [ + [ + "modifyvm", + "{{.Name}}", + "--memory", + "4096" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "2" + ] + ] + } + ], + "post-processors": [ + { + "output": "builds/{{.Provider}}-osm.box", + "type": "vagrant" + } + ] +}