From 8b99e80c041d7686d4b3fee40a318a909c3c4100 Mon Sep 17 00:00:00 2001 From: Mason Packard Date: Fri, 19 Aug 2016 10:55:39 -0400 Subject: [PATCH] Basic setup for shibboleth appliance for compressed virtualbox. --- shibboleth-appliance-vbox.json | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 shibboleth-appliance-vbox.json diff --git a/shibboleth-appliance-vbox.json b/shibboleth-appliance-vbox.json new file mode 100644 index 0000000..b4ea6be --- /dev/null +++ b/shibboleth-appliance-vbox.json @@ -0,0 +1,64 @@ +{ + "min_packer_version": "0.8.6", + "description": "Shibboleth appliance ", + "variables": { + "profile": "xfs", + "disk_size": "8192", + "memory": "6122", + "cpus": "2", + "ssh_username": "centos", + "ssh_password": "centos", + "region": "us-west-1" + }, + "provisioners": [ + { + "type": "shell", + "execute_command": "echo 'centos' | {{.Vars}} sudo -S -E bash '{{.Path}}'", + "script": "scripts/ansible.sh" + }, + { + "type": "ansible-local", + "playbook_dir": "../ansible-playbooks", + "playbook_file": "../ansible-playbooks/shibboleth-appliance-vbox.yml" + }, + { + "type": "shell", + "execute_command": "echo 'centos' | {{.Vars}} sudo -S -E bash '{{.Path}}'", + "script": "scripts/cleanup.sh" + } + ], + "builders": [ + { + "type": "virtualbox-iso", + "name": "shibboleth-appliance-centos7", + "vm_name": "shibboleth-appliance-centos7-{{user `profile`}}", + "headless": true, + "guest_os_type": "RedHat_64", + "disk_size": "{{user `disk_size`}}", + "vboxmanage": [ + ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], + ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] + ], + "iso_url": "http://mirror.vcu.edu/pub/gnu+linux/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso", + "iso_checksum": "f90e4d28fa377669b2db16cbcb451fcb9a89d2460e3645993e30e137ac37d284", + "iso_checksum_type": "sha256", + "http_directory": "http", + "boot_command": [" text ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks-{{user `profile`}}.cfg"], + "boot_wait": "10s", + "ssh_username": "{{user `ssh_username`}}", + "ssh_password": "{{user `ssh_password`}}", + "ssh_port": 22, + "ssh_wait_timeout": "10000s", + "guest_additions_mode": "disable", + "shutdown_command": "sudo -S shutdown -P now", + "output_directory": "output-{{user `profile`}}", + "format": "ova" + } + ], + "post-processors": [ + { + "output": "builds/shibboleth-appliance-centos7-vbox-{{timestamp}}.tar", + "type": "compress" + } + ] +}