Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/shibboleth-production' into AMIname
Browse files Browse the repository at this point in the history
  • Loading branch information
chubing committed Feb 16, 2017
2 parents f41fcaf + e1a5d2f commit c944b81
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 46 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,25 +59,15 @@ The OS versions are:

For all operating systems we generate images for

- centos7.json will build:
- VirtualBox (user: packer/changeme1234)

- aws-centos7-base.json will build:
- AMI for AWS (user: centos/centos)

- sibboleth-appliance.json will build:
- VirtualBox (user: centos/centos)

This template only is tested against 64 bit systems. With the following sizing requirements:
```
"profile": "xfs",
"disk_size": "20000",
"memory": "6122",
"cpus": "2",
```

```
"disk_size": 81920
"memory": "2048",
"cpus": "1",
```

## Post Processors
Expand All @@ -88,9 +78,19 @@ The final VM appliance formats will be uploaded into AWS infrastructure. The two
- Compressed Vagrant format
- Imported AWS AMI

## Updating CentOS release

When CentOS distributes a new Minimal ISO build to mirrors, the ISO checksum will fail.

To update the repo, download the file in question, and perform this command on it:

`shasum -a 256 CentOS-7-x86_64-Minimal-1611.iso`

You can then update the JSON config with the output.


# License

TBD
Apache2


7 changes: 5 additions & 2 deletions bin/perms.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/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' )
Expand All @@ -13,9 +14,11 @@ 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"
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

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\"}]}"
aws ec2 modify-image-attribute --image-id $ami_id --launch-permission "{\"Add\":[{\"UserId\":\"$aws_acct_id_plus\"}]}"

29 changes: 0 additions & 29 deletions shibboleth-appliance-aws.json

This file was deleted.

4 changes: 2 additions & 2 deletions shibboleth-appliance.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"],
["modifyvm", "{{.Name}}", "--ostype", "{{user `guest_os_type`}}"]
],
"iso_url": "http://mirror.vcu.edu/pub/gnu+linux/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
"iso_checksum": "f90e4d28fa377669b2db16cbcb451fcb9a89d2460e3645993e30e137ac37d284",
"iso_url": "http://mirrors.mit.edu/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso",
"iso_checksum": "27bd866242ee058b7a5754e83d8ee8403e216b93d130d800852a96f41c34d86a",
"iso_checksum_type": "sha256",
"http_directory": "http",
"boot_command": ["<tab> text ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks-{{user `profile`}}.cfg<enter><wait>"],
Expand Down

0 comments on commit c944b81

Please sign in to comment.