diff --git a/README.md b/README.md index 350d35f..ef19f65 100644 --- a/README.md +++ b/README.md @@ -2,87 +2,86 @@ ## Introduction -This packer templates create vmware image of CentOS 7 with `.box` and `.ova`. In addition, there is an AMI you can create for AWS. You will need to have credentials setup according to [AWS credentials setup](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-config-files) +In conjunction with the [ansible-playbooks](https://github.internet2.edu/docker/ansible-playbooks), these packer templates create the Shibboleth IdP, Grouper, and COmanage appliances for use by TIER members. These appliances are CentOS 7 with `.vmx` and `.ova` formats available. In addition, if your account has VMImport privileges on EC2, you can also create AMI for AWS purposes. You will need to have credentials setup according to [AWS credentials setup](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-config-files) -The OS versions are: - - Centos 7 +## Requirements -For all operating systems we generate images for +The templates are only tested with [packer](http://www.packer.io/downloads.html) 0.10.1 and later. If you have homebrew installed, `brew install packer` is effective. -- 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) +For local builds, you will need to provide a symbolic link to the `ansible-playbooks` directory for matching repo location. Make sure you have cloned and setup the [ansible-playbooks repo](https://github.internet2.edu/docker/ansible-playbooks). -This template only is tested against 64 bit systems. With the following sizing requirements: +#### example ``` - "vmx_data": { - "cpuid.coresPerSocket": "1", - "memsize": "512", - "numvcpus": "2" - } +ln -s /path/to/ansible-playbooks ansible-playbooks ``` +##### common parent + +If you have ansible-playbooks checked out in the same parent directory as this repository, this command will work. ``` - "disk_size": 81920 +ln -s ../ansible-playbooks ansible-playbooks ``` -## Requirements +### Pre-Requisites for AWS / AMI import -The templates are only tested with [packer](http://www.packer.io/downloads.html) 0.10.1 and later. +- IAM needs to be setup for the `vmimport` role per the [AWS guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html#vmimport-service-role). +- The bucket `internet2-ami-import-us-west-1` needs to be setup on AWS S3. (Alternatively, you can provide your own bucket name that you prefer.) + + +AMI build will require both `aws_access_key` and `aws_secret_key` to be setup with [AWS credentials setup](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-config-files) -For local builds, you will need to provide a symbolic link to the `ansible-playbooks` directory for matching repo location. Make sure you have cloned and setup the [ansible-playbooks repo](https://github.internet2.edu/docker/ansible-playbooks). +## Building +``` +packer build shibboleth-appliance.json ``` -# example -ln -s /path/to/ansible-playbooks ansible-playbooks -# specific setup -ln -s ../ansible-playbooks ansible-playbooks +If you encounter issues you don't understand, try this command: + +``` +PACKER_LOG packer build shibboleth-appliance.json ``` -### Pre-Requisites for AWS / AMI import +Expect the build to take 30-45 minutes. If you are in position to watch the VirtualBox window, it can verify that progress is continuing during some times that the process appears to have hung. -- IAM needs to be setup for the `vmimport` role per the [AWS guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html#vmimport-service-role). -- The bucket `internet2-ami-import-us-west-1` needs to be setup on AWS S3. +## Author + - Author:: Mason Packard () -## Run conversion process +## Appendix -VMware and Virtualbox build +The OS versions are: -``` -# Build CentOS VMWare and Virtualbox images -PACKER_LOG=1 packer build centos7.json -```` + - Centos 7 -AMI build will require both `aws_access_key` and `aws_secret_key` to be setup with [AWS credentials setup](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-config-files) +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: ``` -# Build CentOS for AWS / AMI -packer build aws-centos7-base.json + "vmx_data": { + "cpuid.coresPerSocket": "1", + "memsize": "512", + "numvcpus": "2" + } ``` -Shibboleth Appliance build for `.ova`, `.box`, and AWS ami ``` -# Build CentOS for ova, box, ami -packer build shibboleth-appliance.json + "disk_size": 81920 ``` -## Issues during build time - -If you experience issues with packer, please use `PACKER_LOG=1 packer ... ` to find the errors. - -## Author - - - Author:: Mason Packard () # License TBD +