app-sre: Update AMIs to rhel-9.0

This commit is contained in:
Diaa Sami 2022-09-23 15:17:23 +02:00 committed by Diaa Sami
parent 49cf427e6a
commit 06fbd926ae
7 changed files with 22 additions and 22 deletions

View file

@ -16,8 +16,8 @@
- name: Add EPEL
dnf:
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
state: present
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
disable_gpg_check: yes
- name: Subscribe
@ -81,7 +81,7 @@
- name: Mockbuild osbuild
shell: >-
mock
-r "rhel-8-{{ ansible_architecture }}"
-r "rhel-9-{{ ansible_architecture }}"
--rebuild
--define "commit {{ OSBUILD_COMMIT }}"
--define "_rpmfilename %%{NAME}.rpm"
@ -100,7 +100,7 @@
- name: Mockbuild osbuild-composer
shell: >-
mock
-r "rhel-8-{{ ansible_architecture }}"
-r "rhel-9-{{ ansible_architecture }}"
--rebuild
--define "commit {{ COMPOSER_COMMIT }}"
--define "_rpmfilename %%{NAME}.rpm"

View file

@ -60,10 +60,10 @@ fi
if [ "$ON_JENKINS" = true ]; then
# jenkins on main: build rhel only
PACKER_ONLY_EXCEPT=--only=amazon-ebs.rhel-8-x86_64,amazon-ebs.rhel-8-aarch64
PACKER_ONLY_EXCEPT=--only=amazon-ebs.rhel-9-x86_64,amazon-ebs.rhel-9-aarch64
elif [ -n "$CI_COMMIT_BRANCH" ] && [ "$CI_COMMIT_BRANCH" == "main" ]; then
# Schutzbot on main: build all except rhel
PACKER_ONLY_EXCEPT=--except=amazon-ebs.rhel-8-x86_64,amazon-ebs.rhel-8-aarch64
PACKER_ONLY_EXCEPT=--except=amazon-ebs.rhel-9-x86_64,amazon-ebs.rhel-9-aarch64
elif [ -n "$CI_COMMIT_BRANCH" ]; then
# Schutzbot but not main, build everything (use dummy except)
PACKER_ONLY_EXCEPT=--except=amazon-ebs.dummy
@ -84,8 +84,8 @@ function write_inventories {
# write rpmrepo_distribution variable
local rpmrepo_distribution="$distro"
if [[ $rpmrepo_distribution == rhel-8 ]]; then
rpmrepo_distribution=rhel-8-cdn
if [[ $rpmrepo_distribution == rhel-9 ]]; then
rpmrepo_distribution=rhel-9-cdn
fi
cat >"$item/group_vars/all.yml" <<EOF
---
@ -94,8 +94,8 @@ EOF
# get distro name for schutzfile
local schutzfile_distro="$distro"
if [[ $schutzfile_distro == rhel-8 ]]; then
schutzfile_distro=rhel-8.6
if [[ $schutzfile_distro == rhel-9 ]]; then
schutzfile_distro=rhel-9.0
fi
# get osbuild_commit from schutzfile

View file

@ -14,11 +14,11 @@ import boto3
arch_info = {}
arch_info["x86_64"] = {
"ImageId": "ami-03debf3ebf61b20cd",
"ImageId": "ami-0f7c7d22de9e097ea",
"InstanceType": "c5.large"
}
arch_info["aarch64"] = {
"ImageId": "ami-0c84d76d81209a0e2",
"ImageId": "ami-019ece25c0f135889",
"InstanceType": "c6g.large"
}