Skip to content
Permalink
Newer
Older
100644 95 lines (57 sloc) 3.22 KB
Jim Van Fleet
Jul 7, 2016
1
# Packer Image Builder for CentOS
2
3
## Introduction
4
Jim Van Fleet
Aug 29, 2016
5
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)
Jim Van Fleet
Aug 29, 2016
8
## Requirements
Jim Van Fleet
Aug 29, 2016
10
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.
12
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). The `master` branch is acceptable for all developer test builds.
14
For Automated builds utilizing Jenkins, you will want to setup your build hosts on physical hardware, as how VirtualBox interacts with the host environment.
15
Jim Van Fleet
Aug 29, 2016
16
#### example
Jim Van Fleet
Aug 29, 2016
18
ln -s /path/to/ansible-playbooks ansible-playbooks
Jim Van Fleet
Aug 29, 2016
21
##### common parent
22
23
If you have ansible-playbooks checked out in the same parent directory as this repository, this command will work.
Jim Van Fleet
Aug 29, 2016
25
ln -s ../ansible-playbooks ansible-playbooks
Jim Van Fleet
Aug 29, 2016
28
### Pre-Requisites for AWS / AMI import
Jim Van Fleet
Aug 29, 2016
30
- 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).
31
- 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.)
32
33
34
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)
Jim Van Fleet
Aug 29, 2016
37
## Building
38
```
39
packer build shibboleth-appliance.json
Mason Packard
Aug 20, 2016
40
```
41
Jim Van Fleet
Aug 29, 2016
42
If you encounter issues you don't understand, try this command:
43
44
```
45
PACKER_LOG packer build shibboleth-appliance.json
Jim Van Fleet
Aug 29, 2016
48
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.
Jim Van Fleet
Aug 29, 2016
50
## Author
Jim Van Fleet
Aug 29, 2016
52
- Author:: Mason Packard (<mason.packard@levvel.io>)
Jim Van Fleet
Aug 29, 2016
54
## Appendix
Jim Van Fleet
Aug 29, 2016
56
The OS versions are:
Jim Van Fleet
Aug 29, 2016
58
- Centos 7
Jim Van Fleet
Aug 29, 2016
60
For all operating systems we generate images for
61
62
- centos7.json will build:
63
- VirtualBox (user: packer/changeme1234)
64
65
- aws-centos7-base.json will build:
66
- AMI for AWS (user: centos/centos)
Jim Van Fleet
Aug 29, 2016
68
- sibboleth-appliance.json will build:
69
- VirtualBox (user: centos/centos)
70
71
This template only is tested against 64 bit systems. With the following sizing requirements:
73
"profile": "xfs",
74
"disk_size": "20000",
75
"memory": "6122",
76
"cpus": "2",
Jim Van Fleet
Jul 7, 2016
79
```
Jim Van Fleet
Aug 29, 2016
80
"disk_size": 81920
Jim Van Fleet
Jul 7, 2016
81
```
82
83
## Post Processors
84
85
The final VM appliance formats will be uploaded into AWS infrastructure. The two compressed tarballs to S3 buckets and AMI to EC2.
86
87
- Compressed ova / ovf format
88
- Imported AWS AMI
89
Jim Van Fleet
Jul 7, 2016
90
91
# License
92
93
TBD
Mason Packard
Aug 20, 2016
94
Jim Van Fleet
Aug 29, 2016
95
You can’t perform that action at this time.