From 175bff9a2be62b96000532d73b02cff79008da65 Mon Sep 17 00:00:00 2001 From: villadalmine Date: Tue, 15 Nov 2016 17:32:02 +0100 Subject: [PATCH 1/4] Added the new account --- bin/perms.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/perms.sh b/bin/perms.sh index 4044f28..fd07086 100755 --- a/bin/perms.sh +++ b/bin/perms.sh @@ -1,6 +1,8 @@ #!/bin/bash aws_acct_id="823003027569" +aws_acct_id_plus="886593122405" + bucket="internet2-tier-appliance-us-west-1" ova_key=$(aws s3api list-objects --bucket $bucket --query 'reverse(sort_by(Contents[?contains(Key, `ova`)], &LastModified))[0].[Key]' --output text | tr -d '\n' ) @@ -13,10 +15,12 @@ echo "(https://s3-us-west-1.amazonaws.com/$bucket/$ova_key)" echo $(md5sum builds/$ova_key) 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 "Publishing $ami_id to $aws_acct_id" ami_image_description=$(aws ec2 describe-images --image-ids $ami_id --query 'Images[0].{Description:Tags[0].Value}') echo $ami_image_description aws ec2 modify-image-attribute --image-id $ami_id --launch-permission "{\"Add\":[{\"UserId\":\"$aws_acct_id\"}]}" +aws ec2 modify-image-attribute --image-id $ami_id --launch-permission "{\"Add\":[{\"UserId\":\"$aws_acct_id_plus\"}]}" From b4e0ecbf59d32a4e2edc279d541cd983a330ad79 Mon Sep 17 00:00:00 2001 From: villadalmine Date: Tue, 15 Nov 2016 18:02:07 +0100 Subject: [PATCH 2/4] added descriptiof of account --- bin/perms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/perms.sh b/bin/perms.sh index fd07086..c94c3fa 100755 --- a/bin/perms.sh +++ b/bin/perms.sh @@ -16,7 +16,7 @@ echo $(md5sum builds/$ova_key) 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 "Publishing $ami_id to $aws_acct_id" +echo "Publishing $ami_id to $aws_acct_id $aws_acct_id_plus" ami_image_description=$(aws ec2 describe-images --image-ids $ami_id --query 'Images[0].{Description:Tags[0].Value}') echo $ami_image_description From 5a2a0ab1073f7878d3171275fc2fc45c70059b59 Mon Sep 17 00:00:00 2001 From: villadalmine Date: Tue, 15 Nov 2016 19:04:22 +0100 Subject: [PATCH 3/4] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 775062d..c2fdb75 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,6 @@ This template only is tested against 64 bit systems. With the following sizing r The final VM appliance formats will be uploaded into AWS infrastructure. The two compressed tarballs to S3 buckets and AMI to EC2. - Compressed ova / ovf format -- Compressed Vagrant format - Imported AWS AMI From b349944169ce2522ed24ab9af5157128c238f7cc Mon Sep 17 00:00:00 2001 From: villadalmine Date: Tue, 15 Nov 2016 21:02:00 +0100 Subject: [PATCH 4/4] Update perms.sh --- bin/perms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/perms.sh b/bin/perms.sh index c94c3fa..e13757d 100755 --- a/bin/perms.sh +++ b/bin/perms.sh @@ -16,7 +16,7 @@ echo $(md5sum builds/$ova_key) 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 "Publishing $ami_id to $aws_acct_id $aws_acct_id_plus" +echo "Publishing $ami_id to all accounts" ami_image_description=$(aws ec2 describe-images --image-ids $ami_id --query 'Images[0].{Description:Tags[0].Value}') echo $ami_image_description