Guillaume Coré
2018-11-21 6af01ecf6ed53db7f2767905dff8ca01117cf095
refs
author Guillaume Coré <guillaume.core@gmail.com>
Wednesday, November 21, 2018 14:54 +0100
committer GitHub <noreply@github.com>
Wednesday, November 21, 2018 14:54 +0100
commit6af01ecf6ed53db7f2767905dff8ca01117cf095
tree 95946ab3488fd33c3a0993caae09a622f6f0ccc0 tree | zip | gz
parent 873f23163dace07ebe9b689606a67248617369d8 view | diff
Custom images using packer (#283)

- Added new directory: builds/packer
- Created opinionated images for ocp-clientvm (outside aad) and enable AAD to use it
- Define workflow, add Readme.adoc
- Finding the opinionated AMI is dynamic: use tags on the images to identify which one to use
- Update ec2 Cloud template to pick 'custom_image' if it's available
- Fallback to 'repo_version' instead of 'osrelease' when detecting

Allow this simple use-case:

- Create a common RHEL gold images and enable AAD to use it

When deploying, user only provides the name of the image to look for.

- If the image exists: use it
- If the image does not exist: default to CF template

'custom_image_filter' is a lower priority than 'custom_image_stage' which detects opinionated
images that are specific to the tuple (env_type, version, stage).

- Enable custom_image in default Cloudformation template
- Ensure ec2_ami_facts is succeeded before checking the register
- Use another register for the second call ec2_ami_facts to avoid bugs
- Condition hardening
4 files added
16 files modified
281 ■■■■ changed files
ansible/cloud_providers/ec2_destroy_env.yml 2 ●●● diff | view | raw | blame | history
ansible/configs/ocp-clientvm/env_vars.yml 1 ●●●● diff | view | raw | blame | history
ansible/configs/ocp-clientvm/files/cloud_providers/ec2_cloud_template.j2 8 ●●●●● diff | view | raw | blame | history
ansible/configs/ocp-clientvm/post_software.yml 2 ●●● diff | view | raw | blame | history
ansible/configs/ocp-clientvm/pre_infra.yml 6 ●●●●● diff | view | raw | blame | history
ansible/configs/ocp-clientvm/software.yml 2 ●●● diff | view | raw | blame | history
ansible/roles/bastion-opentlc-ipa/tasks/main.yml 2 ●●●●● diff | view | raw | blame | history
ansible/roles/bastion/tasks/main.yml 6 ●●●●● diff | view | raw | blame | history
ansible/roles/common/tasks/main.yml 7 ●●●● diff | view | raw | blame | history
ansible/roles/infra-ec2-template-create/tasks/detect_custom_images.yml 56 ●●●●● diff | view | raw | blame | history
ansible/roles/infra-ec2-template-create/tasks/main.yml 15 ●●●●● diff | view | raw | blame | history
ansible/roles/infra-ec2-template-create/tasks/select_custom_image.yml 18 ●●●●● diff | view | raw | blame | history
ansible/roles/infra-ec2-template-generate/templates/cloud_template.j2 4 ●●●● diff | view | raw | blame | history
ansible/roles/ocp-client-vm/tasks/configure_docker.yml 3 ●●●●● diff | view | raw | blame | history
ansible/roles/ocp-client-vm/tasks/main.yml 7 ●●●● diff | view | raw | blame | history
ansible/roles/ocp-client-vm/tasks/packages.yml 32 ●●●●● diff | view | raw | blame | history
ansible/roles/set-repositories/tasks/main.yml 25 ●●●● diff | view | raw | blame | history
ansible/roles/set-repositories/tasks/satellite-repos.yml 2 ●●●●● diff | view | raw | blame | history
builds/packer/readme.adoc 63 ●●●●● diff | view | raw | blame | history
builds/packer/rhel_gold.json 20 ●●●●● diff | view | raw | blame | history