diff --git a/bin/perms.sh b/bin/perms.sh index cf3b5d4..4044f28 100755 --- a/bin/perms.sh +++ b/bin/perms.sh @@ -2,15 +2,8 @@ aws_acct_id="823003027569" bucket="internet2-tier-appliance-us-west-1" -vagrant_key=$(aws s3api list-objects --bucket $bucket --query 'reverse(sort_by(Contents[?contains(Key, `vagrant`)], &LastModified))[0].[Key]' --output text | tr -d '\n' ) -ova_key=$(aws s3api list-objects --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 "(https://s3-us-west-1.amazonaws.com/$bucket/$vagrant_key)" - -echo $(md5sum builds/$vagrant_key) +ova_key=$(aws s3api list-objects --bucket $bucket --query 'reverse(sort_by(Contents[?contains(Key, `ova`)], &LastModified))[0].[Key]' --output text | tr -d '\n' ) echo "Found $ova_key" aws s3api put-object-acl --bucket $bucket --key $ova_key --acl public-read diff --git a/comanage-appliance.json b/comanage-appliance.json index 28a30cc..0b43b3c 100644 --- a/comanage-appliance.json +++ b/comanage-appliance.json @@ -4,8 +4,8 @@ "variables": { "profile": "xfs", "disk_size": "20000", - "memory": "6122", - "cpus": "2", + "memory": "2048", + "cpus": "1", "ssh_username": "centos", "ssh_password": "centos", "region": "us-west-1", @@ -63,11 +63,6 @@ "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`}}.box" - }, { "type": "amazon-import", "access_key": "{{user `aws_access_key`}}", @@ -75,7 +70,8 @@ "region": "{{user `region`}}", "s3_bucket_name": "internet2-ami-import-us-west-1", "tags": { - "Description": "packer amazon-import-comanage-appliance {{user `timestamper`}}" + "Description": "packer amazon-import-comanage-appliance {{user `timestamper`}}", + "Name": "TIER-Shibb Build: {{user `build_number`}}" } } ] diff --git a/grouper-appliance.json b/grouper-appliance.json index e4418e4..39ac27d 100644 --- a/grouper-appliance.json +++ b/grouper-appliance.json @@ -65,11 +65,6 @@ "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`}}", @@ -77,7 +72,8 @@ "region": "{{user `region`}}", "s3_bucket_name": "internet2-tier-ami-import-us-west-1", "tags": { - "Description": "packer amazon-import-grouper-appliance {{user `timestamper`}}" + "Description": "packer amazon-import-grouper-appliance {{user `timestamper`}}", + "Name": "TIER-Shibb Build: {{user `build_number`}}" } } ] diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh old mode 100644 new mode 100755 index 0eff8cb..abaabba --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -1,11 +1,11 @@ #!/bin/bash -eux -# Remove Ansible and its dependencies. -yum -y remove ansible - # Zero out the rest of the free space using dd, then delete the written file. dd if=/dev/zero of=/EMPTY bs=1M rm -f /EMPTY +# Disable the centos user +chsh -s /bin/false centos + # Add `sync` so Packer doesn't quit too early, before the large file is deleted. sync diff --git a/shibboleth-appliance.json b/shibboleth-appliance.json index e3cccf9..68e1afe 100644 --- a/shibboleth-appliance.json +++ b/shibboleth-appliance.json @@ -11,7 +11,8 @@ "ssh_password": "centos", "region": "us-west-1", "timestamper": "{{timestamp}}", - "outputfile_name": "shibboleth-appliance-centos7" + "outputfile_name": "shibboleth-appliance-centos7", + "build_number": "{{env `BUILD_NUMBER`}}" }, "provisioners": [ { @@ -65,11 +66,6 @@ "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`}}", @@ -77,7 +73,8 @@ "region": "{{user `region`}}", "s3_bucket_name": "internet2-tier-ami-import-us-west-1", "tags": { - "Description": "packer amazon-import-shibboleth-appliance {{user `timestamper`}}" + "Description": "packer amazon-import-shibboleth-appliance {{user `timestamper`}}", + "Name": "TIER-Shibb Build: {{user `build_number`}}" } } ]