-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
154 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
|
||
# All AMI's by default have an expiration date, after which they are | ||
# automatically deleted. Since CI images may be in place and needed | ||
# for an extended period of time, a copy of the vendor image needs | ||
# to be produced such that we may dictate it's deprecation date and | ||
# lifecycle. This is also a handy point at which to install some | ||
# fundimental tooling (like the common automation library). | ||
|
||
variables: # Empty value means it must be passed in on command-line | ||
# Naming suffix for images to prevent clashes (default to timestamp) | ||
# N/B: There are length/character limitations in GCE for image names | ||
IMG_SFX: | ||
|
||
# Required for access to ssh key | ||
TEMPDIR: | ||
|
||
# BIG-FAT-WARNING: When updating the base AMI below, | ||
# ensure the distro version numbers contained in the `podman/*_release` | ||
# files exactly match. These represent the container base-image tags | ||
# to build from - just as the sources below are the base-images to | ||
# start from building VM images. | ||
|
||
# Upstream base image in 'US East (N. Virginia)' region | ||
# from https://alt.fedoraproject.org/cloud | ||
FEDORA_BASE_AMI: "ami-08b7bda26f4071b80" | ||
|
||
builders: | ||
# ref: https://www.packer.io/plugins/builders/amazon/ebs | ||
- name: 'fedora-aws' | ||
type: 'amazon-ebs' | ||
source_ami: '{{user `FEDORA_BASE_AMI`}}' | ||
instance_type: 'm5zn.metal' | ||
force_deregister: true | ||
force_delete_snapshot: true | ||
security_group_id: "sg-042c75677872ef81c" | ||
# Prefix IMG_SFX with "b" so this is never confused with a cache_image | ||
ami_name: '{{build_name}}-b{{user `IMG_SFX`}}' | ||
ami_description: 'Built in https://cirrus-ci.com/build/{{user `IMG_SFX`}}' | ||
tags: &tags | ||
name: '{{build_name}}-b{{user `IMG_SFX`}}' | ||
sfx: '{{user `IMG_SFX`}}' | ||
src: '{{user `FEDORA_BASE_AMI`}}' | ||
automation: 'true' | ||
run_tags: *tags | ||
run_volume_tags: *tags | ||
snapshot_tags: *tags | ||
ami_groups: "all" | ||
launch_block_device_mappings: | ||
- device_name: '/dev/sda1' | ||
volume_size: 20 | ||
volume_type: 'gp2' | ||
delete_on_termination: true | ||
# In case of packer problem or ungraceful exit, don't wait for shutdown. | ||
shutdown_behavior: 'terminate' | ||
ssh_username: 'fedora' | ||
ssh_clear_authorized_keys: true | ||
# N/B: Required Packer >= 1.8.0 | ||
# https://github.com/hashicorp/packer/issues/10074#issuecomment-1070469367 | ||
temporary_key_pair_type: 'ed25519' | ||
|
||
provisioners: | ||
- type: 'shell' | ||
inline: | ||
- 'set -e' | ||
- 'mkdir -p /tmp/automation_images' | ||
|
||
- type: 'file' | ||
source: '{{ pwd }}/' | ||
destination: '/tmp/automation_images/' | ||
|
||
- type: 'shell' | ||
inline: | ||
- 'set -e' | ||
- '/bin/bash /tmp/automation_images/base_images/fedora_base-setup.sh' | ||
|
||
post-processors: | ||
# Must be double-nested to guarantee execution order | ||
- - type: 'manifest' | ||
output: 'base_images/manifest.json' # Collected by Cirrus-CI | ||
strip_path: true | ||
custom_data: | ||
IMG_SFX: '{{ user `IMG_SFX` }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters