From 62f1408c9d176dc39ad438dec87b39a9aec4f078 Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Tue, 18 Oct 2016 11:22:16 -0400 Subject: [PATCH 01/13] Ansible is now desired on the appliances --- scripts/cleanup.sh | 3 --- 1 file changed, 3 deletions(-) mode change 100644 => 100755 scripts/cleanup.sh diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh old mode 100644 new mode 100755 index 0eff8cb..b995cf0 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -1,8 +1,5 @@ #!/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 From 4ceba6e13facf9d0e51636a394a660cf1f40e4dd Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Tue, 8 Nov 2016 12:26:41 -0500 Subject: [PATCH 02/13] Removing vagrant processing --- comanage-appliance.json | 5 ----- grouper-appliance.json | 5 ----- shibboleth-appliance.json | 5 ----- 3 files changed, 15 deletions(-) diff --git a/comanage-appliance.json b/comanage-appliance.json index 28a30cc..84f02c3 100644 --- a/comanage-appliance.json +++ b/comanage-appliance.json @@ -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`}}", diff --git a/grouper-appliance.json b/grouper-appliance.json index e4418e4..77859ca 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`}}", diff --git a/shibboleth-appliance.json b/shibboleth-appliance.json index e3cccf9..a58007e 100644 --- a/shibboleth-appliance.json +++ b/shibboleth-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`}}", From c5ba555c8dcc076005d7f2bc9ada123fef335e9a Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Tue, 8 Nov 2016 12:27:40 -0500 Subject: [PATCH 03/13] Removing vagrant processing from build script --- bin/perms.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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 From 8f0c8b3210be69c98fb3bdf8db9ab9fe23b3dcb2 Mon Sep 17 00:00:00 2001 From: villadalmine Date: Tue, 6 Dec 2016 16:33:32 +0100 Subject: [PATCH 04/13] Update comanage-appliance.json --- comanage-appliance.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comanage-appliance.json b/comanage-appliance.json index 84f02c3..1fd14bd 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", From af6fd0706657ad8c67dd2f11eabfe0a7ca88d3c3 Mon Sep 17 00:00:00 2001 From: Chris Hubing Date: Mon, 19 Dec 2016 14:19:08 -0500 Subject: [PATCH 05/13] Added code to delete centos user with default password --- scripts/cleanup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index b995cf0..fa3c700 100755 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -4,5 +4,8 @@ dd if=/dev/zero of=/EMPTY bs=1M rm -f /EMPTY +# Remove the centos user +userdel centos + # Add `sync` so Packer doesn't quit too early, before the large file is deleted. sync From 1cc917432ccd8f2fe670e81b681a524f0c1c3d57 Mon Sep 17 00:00:00 2001 From: Christopher Hubing Date: Thu, 9 Feb 2017 13:24:35 -0500 Subject: [PATCH 06/13] Update cleanup.sh --- scripts/cleanup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index fa3c700..b71c611 100755 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -6,6 +6,7 @@ rm -f /EMPTY # Remove the centos user userdel centos +echo user centos deletion exited with $? # Add `sync` so Packer doesn't quit too early, before the large file is deleted. sync From 97eb875e048e575ac499338252e99cb2b2f50518 Mon Sep 17 00:00:00 2001 From: Christopher Hubing Date: Fri, 10 Feb 2017 17:50:40 -0500 Subject: [PATCH 07/13] Update cleanup.sh --- scripts/cleanup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index b71c611..abaabba 100755 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -4,9 +4,8 @@ dd if=/dev/zero of=/EMPTY bs=1M rm -f /EMPTY -# Remove the centos user -userdel centos -echo user centos deletion exited with $? +# 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 From e9293ed06edd3eb341dad439b58c1cddc7a7c77f Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Fri, 10 Feb 2017 17:48:18 -0600 Subject: [PATCH 08/13] add descriptive name with build number to the AMI --- shibboleth-appliance.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shibboleth-appliance.json b/shibboleth-appliance.json index a58007e..78d7620 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": [ { @@ -70,6 +71,7 @@ "access_key": "{{user `aws_access_key`}}", "secret_key": "{{user `aws_secret_key`}}", "region": "{{user `region`}}", + "ami_name": "TIER-Shibb Build: {{user `build_number`}}", "s3_bucket_name": "internet2-tier-ami-import-us-west-1", "tags": { "Description": "packer amazon-import-shibboleth-appliance {{user `timestamper`}}" From 3e176c284e8dc3f679b49165a8da5970a6c27859 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Fri, 10 Feb 2017 17:51:05 -0600 Subject: [PATCH 09/13] fix minor spacing issue --- shibboleth-appliance.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shibboleth-appliance.json b/shibboleth-appliance.json index 78d7620..1dcf568 100644 --- a/shibboleth-appliance.json +++ b/shibboleth-appliance.json @@ -12,7 +12,7 @@ "region": "us-west-1", "timestamper": "{{timestamp}}", "outputfile_name": "shibboleth-appliance-centos7", - "build_number": "{{env `BUILD_NUMBER`}}" + "build_number": "{{env `BUILD_NUMBER`}}" }, "provisioners": [ { @@ -71,7 +71,7 @@ "access_key": "{{user `aws_access_key`}}", "secret_key": "{{user `aws_secret_key`}}", "region": "{{user `region`}}", - "ami_name": "TIER-Shibb Build: {{user `build_number`}}", + "ami_name": "TIER-Shibb Build: {{user `build_number`}}", "s3_bucket_name": "internet2-tier-ami-import-us-west-1", "tags": { "Description": "packer amazon-import-shibboleth-appliance {{user `timestamper`}}" From aa886d8447bba5c52a1d0786731910a44aaa70f0 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Sat, 11 Feb 2017 07:40:26 -0600 Subject: [PATCH 10/13] another attempt to set 'Name' tag of AMI --- shibboleth-appliance.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shibboleth-appliance.json b/shibboleth-appliance.json index 1dcf568..b081da0 100644 --- a/shibboleth-appliance.json +++ b/shibboleth-appliance.json @@ -74,7 +74,8 @@ "ami_name": "TIER-Shibb Build: {{user `build_number`}}", "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`}}" } } ] From e2ddddce47e29b055f2deb4441905940bc76c895 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Sat, 11 Feb 2017 07:42:41 -0600 Subject: [PATCH 11/13] fix spacing issue --- shibboleth-appliance.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shibboleth-appliance.json b/shibboleth-appliance.json index b081da0..dc68d5c 100644 --- a/shibboleth-appliance.json +++ b/shibboleth-appliance.json @@ -75,7 +75,7 @@ "s3_bucket_name": "internet2-tier-ami-import-us-west-1", "tags": { "Description": "packer amazon-import-shibboleth-appliance {{user `timestamper`}}", - "Name": "TIER-Shibb Build: {{user `build_number`}}" + "Name": "TIER-Shibb Build: {{user `build_number`}}" } } ] From 681205026b0a57dfe365835dcd2db7434a45c80b Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Sat, 11 Feb 2017 08:27:19 -0600 Subject: [PATCH 12/13] remove conflicting AWS import directive for ami_name --- shibboleth-appliance.json | 1 - 1 file changed, 1 deletion(-) diff --git a/shibboleth-appliance.json b/shibboleth-appliance.json index dc68d5c..68e1afe 100644 --- a/shibboleth-appliance.json +++ b/shibboleth-appliance.json @@ -71,7 +71,6 @@ "access_key": "{{user `aws_access_key`}}", "secret_key": "{{user `aws_secret_key`}}", "region": "{{user `region`}}", - "ami_name": "TIER-Shibb Build: {{user `build_number`}}", "s3_bucket_name": "internet2-tier-ami-import-us-west-1", "tags": { "Description": "packer amazon-import-shibboleth-appliance {{user `timestamper`}}", From e5b2d3e79376092242533801e5b7e12d81edeea4 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Sat, 11 Feb 2017 11:35:08 -0600 Subject: [PATCH 13/13] add AMI 'Name' tag to AWS export post-processors for COmanage and grouper to include product and build number --- comanage-appliance.json | 3 ++- grouper-appliance.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/comanage-appliance.json b/comanage-appliance.json index 1fd14bd..0b43b3c 100644 --- a/comanage-appliance.json +++ b/comanage-appliance.json @@ -70,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 77859ca..39ac27d 100644 --- a/grouper-appliance.json +++ b/grouper-appliance.json @@ -72,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`}}" } } ]