-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'grouper-refactor' into grouper-production
- Loading branch information
Showing
5 changed files
with
135 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| #!/bin/bash | ||
|
|
||
| aws_acct_id="823003027569" | ||
| bucket="internet2-tier-appliance-us-west-1" | ||
| 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 "(https://s3-us-west-1.amazonaws.com/$bucket/$vagrant_key)" | ||
|
|
||
| echo $(md5 builds/$vagrant_key) | ||
|
|
||
| echo "Found $ova_key" | ||
| aws s3api put-object-acl --bucket $bucket --key $ova_key --acl public-read | ||
|
|
||
| echo "(https://s3-us-west-1.amazonaws.com/$bucket/$ova_key)" | ||
|
|
||
| echo $(md5 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 ec2 modify-image-attribute --image-id $ami_id --launch-permission "{\"Add\":[{\"UserId\":\"$aws_acct_id\"}]}" | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "min_packer_version": "0.8.6", | ||
| "description": "Shibboleth appliance ", | ||
| "variables": { | ||
| "region": "us-west-1", | ||
| "timestamper": "{{timestamp}}" | ||
| }, | ||
| "provisioners": [ | ||
| { | ||
| "type": "ansible", | ||
| "playbook_file": "ansible-playbooks/shibboleth-appliance-vbox.yml", | ||
| "sftp_command": "/usr/libexec/sftp-server -e", | ||
| "ansible_env_vars": [ "ANSIBLE_HOST_KEY_CHECKING=False" ], | ||
| "user": "centos" | ||
| } | ||
| ], | ||
| "builders": [ | ||
| { | ||
| "type": "amazon-ebs", | ||
| "access_key": "AKIAJGTQSCEQTDCIUU6A", | ||
| "secret_key": "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", | ||
| "region": "us-west-1", | ||
| "source_ami": "ami-af4333cf", | ||
| "instance_type": "t2.large", | ||
| "ssh_username": "centos", | ||
| "ami_name": "shibboleth-idp {{timestamp}}" | ||
| } | ||
| ] | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters