Skip to content
Browse files

Adding ability to build grouper, and to share results

  • Loading branch information
Jim Van Fleet
Jim Van Fleet committed Sep 6, 2016
1 parent c360223 commit 0053180c275a9d42a91864b10d1c747b34850c68
Showing with 101 additions and 0 deletions.
  1. +17 −0 bin/
  2. +84 −0 grouper-appliance.json
@@ -0,0 +1,17 @@

vagrant_key=$(aws s3api list-objects-v2 --bucket $bucket --query 'reverse(sort_by(Contents[?contains(Key, `vagrant`)], &LastModified))[0].[Key]' --output text | tr -d '\n' )
ova_key=$(aws s3api list-objects-v2 --bucket $bucket --query 'reverse(sort_by(Contents[?contains(Key, `ova`)], &LastModified))[0].[Key]' --output text | tr -d '\n' )

echo "Found $vagrant_key"
aws s3api put-object-acl --bucket $bucket --key $vagrant_key --acl public-read

echo "Found $ova_key"
aws s3api put-object-acl --bucket $bucket --key $ova_key --acl public-read

ami_id=$(aws ec2 describe-images --owners $aws_acct_id --query 'reverse(sort_by(Images[?starts_with(Name, `import-ami`)], &CreationDate))[0].[ImageId]' --output text | tr -d '\n' )
echo "Found $ami_id"

aws ec2 modify-image-attribute --image-id $ami_id --launch-permission "{\"Add\":[{\"UserId\":\"$aws_acct_id\"}]}"
@@ -0,0 +1,84 @@
"min_packer_version": "0.8.6",
"description": "Grouper appliance ",
"variables": {
"profile": "xfs",
"disk_size": "8192",
"memory": "2048",
"cpus": "1",
"guest_os_type": "RedHat_64",
"ssh_username": "centos",
"ssh_password": "centos",
"region": "us-west-1",
"timestamper": "{{timestamp}}",
"outputfile_name": "grouper-appliance-centos7"
"provisioners": [
"type": "shell",
"execute_command": "echo 'centos' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"script": "scripts/"
"type": "ansible-local",
"playbook_dir": "ansible-playbooks",
"playbook_file": "ansible-playbooks/grouper-appliance-vbox.yml"
"type": "shell",
"execute_command": "echo 'centos' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"script": "scripts/"
"builders": [
"type": "virtualbox-iso",
"name": "grouper-appliance-centos7",
"vm_name": "grouper-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`}}"],
["modifyvm", "{{.Name}}", "--ostype", "{{user `guest_os_type`}}"]
"iso_url": "",
"iso_checksum": "f90e4d28fa377669b2db16cbcb451fcb9a89d2460e3645993e30e137ac37d284",
"iso_checksum_type": "sha256",
"http_directory": "http",
"boot_command": ["<tab> text ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks-{{user `profile`}}.cfg<enter><wait>"],
"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-grouper-{{user `profile`}}",
"format": "ova"
"post-processors": [
"type": "compress",
"compression_level": "9",
"output": "builds/{{user `outputfile_name`}}-ova-{{user `timestamper`}}.tar"
"type": "vagrant",
"compression_level": "9",
"output": "builds/{{user `outputfile_name`}}-vagrant-{{user `timestamper`}}.tar"
"type": "amazon-import",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `region`}}",
"s3_bucket_name": "internet2-tier-ami-import-us-west-1",
"tags": {
"Description": "packer amazon-import-grouper-appliance {{user `timestamper`}}"

0 comments on commit 0053180

Please sign in to comment.
You can’t perform that action at this time.