diff --git a/README.md b/README.md index 775062d..b085209 100644 --- a/README.md +++ b/README.md @@ -59,12 +59,6 @@ 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) @@ -72,12 +66,8 @@ This template only is tested against 64 bit systems. With the following sizing r ``` "profile": "xfs", "disk_size": "20000", - "memory": "6122", - "cpus": "2", -``` - -``` - "disk_size": 81920 + "memory": "2048", + "cpus": "1", ``` ## Post Processors @@ -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 diff --git a/bin/perms.sh b/bin/perms.sh index 2ca38b6..c9ab1ab 100755 --- a/bin/perms.sh +++ b/bin/perms.sh @@ -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' ) @@ -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\"}]}" \ No newline at end of file +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\"}]}" + diff --git a/shibboleth-appliance-aws.json b/shibboleth-appliance-aws.json deleted file mode 100644 index 8851f07..0000000 --- a/shibboleth-appliance-aws.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "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}}" - } - ] -} diff --git a/shibboleth-appliance.json b/shibboleth-appliance.json index 68e1afe..66240dd 100644 --- a/shibboleth-appliance.json +++ b/shibboleth-appliance.json @@ -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": [" text ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks-{{user `profile`}}.cfg"],