packer: use 8.6 as a base for RHEL images
Let's stay updated! Also, let's remove 8.4 and 8.5 from Schutzfile, I strongly believe that it's not used anywhere. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
e52bd38ccf
commit
767283b2d9
3 changed files with 5 additions and 19 deletions
14
Schutzfile
14
Schutzfile
|
|
@ -153,20 +153,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rhel-8.4": {
|
|
||||||
"dependencies": {
|
|
||||||
"osbuild": {
|
|
||||||
"commit": "86123da599efa117c0a8c079212becb54b304724"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rhel-8.5": {
|
|
||||||
"dependencies": {
|
|
||||||
"osbuild": {
|
|
||||||
"commit": "86123da599efa117c0a8c079212becb54b304724"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rhel-8.6": {
|
"rhel-8.6": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"osbuild": {
|
"osbuild": {
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ build {
|
||||||
source "amazon-ebs.image_builder" {
|
source "amazon-ebs.image_builder" {
|
||||||
name = "rhel-8-x86_64"
|
name = "rhel-8-x86_64"
|
||||||
|
|
||||||
# Use a static RHEL 8.5 Cloud Access Image.
|
# Use a static RHEL 8.6 Cloud Access Image.
|
||||||
source_ami = "ami-06f1e6f8b3457ae7c"
|
source_ami = "ami-03debf3ebf61b20cd"
|
||||||
ssh_username = "ec2-user"
|
ssh_username = "ec2-user"
|
||||||
instance_type = "c6a.large"
|
instance_type = "c6a.large"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ mkdir -p "$RPMBUILD_DIR"
|
||||||
aws ec2 create-key-pair --key-name "$KEY_NAME" --query 'KeyMaterial' --output text > /osbuild-composer/keypair.pem
|
aws ec2 create-key-pair --key-name "$KEY_NAME" --query 'KeyMaterial' --output text > /osbuild-composer/keypair.pem
|
||||||
chmod 600 /osbuild-composer/keypair.pem
|
chmod 600 /osbuild-composer/keypair.pem
|
||||||
# rhel 8.5 AMI
|
# rhel 8.5 AMI
|
||||||
aws ec2 run-instances --image-id ami-06f1e6f8b3457ae7c --instance-type c5.large --key-name "$KEY_NAME" \
|
aws ec2 run-instances --image-id ami-03debf3ebf61b20cd --instance-type c5.large --key-name "$KEY_NAME" \
|
||||||
--tag-specifications "ResourceType=instance,Tags=[{Key=commit,Value=$COMMIT_SHA},{Key=name,Value=rpm-builder-$COMMIT_SHA}]" \
|
--tag-specifications "ResourceType=instance,Tags=[{Key=commit,Value=$COMMIT_SHA},{Key=name,Value=rpm-builder-$COMMIT_SHA}]" \
|
||||||
> ./rpminstance.json
|
> ./rpminstance.json
|
||||||
AWS_INSTANCE_ID=$(jq -r '.Instances[].InstanceId' "rpminstance.json")
|
AWS_INSTANCE_ID=$(jq -r '.Instances[].InstanceId' "rpminstance.json")
|
||||||
|
|
@ -104,7 +104,7 @@ ansible-playbook \
|
||||||
-i /osbuild-composer/tools/appsre-ansible/inventory \
|
-i /osbuild-composer/tools/appsre-ansible/inventory \
|
||||||
/osbuild-composer/tools/appsre-ansible/rpmbuild.yml \
|
/osbuild-composer/tools/appsre-ansible/rpmbuild.yml \
|
||||||
-e "COMPOSER_COMMIT=$COMMIT_SHA" \
|
-e "COMPOSER_COMMIT=$COMMIT_SHA" \
|
||||||
-e "OSBUILD_COMMIT=$(jq -r '.["rhel-8.5"].dependencies.osbuild.commit' /osbuild-composer/Schutzfile)" \
|
-e "OSBUILD_COMMIT=$(jq -r '.["rhel-8.6"].dependencies.osbuild.commit' /osbuild-composer/Schutzfile)" \
|
||||||
-e "RH_ACTIVATION_KEY=$RH_ACTIVATION_KEY" \
|
-e "RH_ACTIVATION_KEY=$RH_ACTIVATION_KEY" \
|
||||||
-e "RH_ORG_ID=$RH_ORG_ID"
|
-e "RH_ORG_ID=$RH_ORG_ID"
|
||||||
EOF
|
EOF
|
||||||
|
|
@ -165,7 +165,7 @@ EOF
|
||||||
# get distro name for schutzfile
|
# get distro name for schutzfile
|
||||||
local schutzfile_distro="$distro"
|
local schutzfile_distro="$distro"
|
||||||
if [[ $schutzfile_distro == rhel-8 ]]; then
|
if [[ $schutzfile_distro == rhel-8 ]]; then
|
||||||
schutzfile_distro=rhel-8.5
|
schutzfile_distro=rhel-8.6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# get osbuild_commit from schutzfile
|
# get osbuild_commit from schutzfile
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue