I previously wrote an article about installing RHEL10,
but this time I'll be leaving it here as an article about verifying an upgrade from RHEL9 to RHEL10 on an AWS EC2 instance.
Table of Contents
- Purpose of this Article
- Target Audience
- Prerequisites
- Upgrade
- Preliminary Verification
- Workflow
- Postmortem Verification
- Impressions
Purpose of this article
This article aims to help solve the following problems:
- Verifying the upgrade from RHEL9 to RHEL10 in an AWS environment (EC2 instance)
- Verifying behavior before and after the upgrade in an environment simulating a real user environment
- Identifying current anticipated issues during the upgrade
Target audience
I would appreciate it if this article could be of use to people facing the following challenges:
- Those verifying an upgrade from RHEL9 to RHEL10
- Those who want to understand the points that need to be considered when conducting the verification
These are the results of testing in a personal environment.
If you are upgrading in a production environment, please test and confirm that there are no issues before proceeding. Please note that the procedure performed here is not recommended by Red Hat, so please use it at your own risk.Upgrading from RHEL9 to RHEL10 is not supported in an EC2 instance environment.
(This is because in-place upgrades in the RHUI environment are not supported.)
Implementation flow
The process will be "Pre-verification" ⇒ "Upgrade support" ⇒ "Post-verification". After that, we will set up the EC2 instance for the actual environment.
Part 0: Setup
The configuration of the EC2 instance we created is as follows:
Before setting up, please Downloads the materials from the following GitHub:
https://github.com/MASAKIOKUDA-eng/RHEL10_aws_upgrade
- First, log in to your EC2 instance.
- Transfer the materials downloaded from GitHub using SCP.
- Run the command [ls -la /tmp]
- Verify that [check.sh] and [setup.sh] exist
ls -la /tmp
Currently, the file does not have execution permissions, so you need to grant it permission.
- Run the command [chmod +x /tmp/*.sh]
chmod +x /tmp/*.sh
- Run the command [ls -la /tmp] again.
- Make sure that [check.sh] and [setup.sh] are displayed in green.
ls -la /tmp
Currently when I run the script I get a line break error.
- Run [sed -i 's/\r$//' /tmp/*.sh] to fix the line breaks in the script.
sed -i 's/\r$//' /tmp/*.sh
- After execution, run setup.sh with sudo privileges
If you do not run it with sudo privileges, the following error will occur:
- After a certain amount of time has passed, the package installation will be completed.
Preliminary verification
There is no problem if you run check.sh for preliminary verification.
sudo /tmp/check.sh
- You can perform post-mortem verification by downloading the file created using SCP.
Work details
Since this cannot be handled using normal upgrade methods, we will use the Blue-Green deployment method (creating a new RHEL10 instance and deleting the old instance) to handle the upgrade.
This procedure is not recommended by Red Hat or AWS.
If you are performing this in a production environment, please verify that there are no issues before proceeding.
- Click the checkbox to the left of the instance you want to upgrade.
- Click Actions > Images and Templates > Launch Similar at the top of the screen.
- The EC2 instance launch screen will be displayed.
- Click the Quick Start tab
- The following pop-up will appear, so click [Confirm changes].
Since custom volumes will be deleted or changed, you must back up your data beforehand.
- Click the Red Hat icon
- Make sure the Amazon Machine Image is set to Red Hat Enterprise Linux 10.
- Click the [Launch Instance] button
- Now you can build a RHEL10 instance with the same settings.
Post-mortem verification
As with the pre-verification, check the settings using check.sh.
After executing, check using a Diff tool or similar.
Impressions
As a premise, upgrade procedures specialized for RHEL used in AWS services (EC2 instances, etc.) have not been officially announced, so when implementing, it is necessary to conduct verification using support, etc.
Furthermore, since upgrade operations can only be performed using a Blue-Green deployment method (building multiple instances ⇒ deleting method), it is recommended to store data in services such as EFS in advance before performing upgrade operations for data stored in EBS.
Additionally, when creating verification scripts this time, I used Claude for creation, and since it can generate the desired output, I think there are scenes where it can be utilized in script creation for infrastructure verification as well.
I think upgrade procedures for AWS environments will also be officially published in the future, so if you want to proceed with migration, it would be better to put it on hold.
I hope this article will be helpful for upgrade operations.
Reference Sites
https://qiita.com/duelist2020jp/items/90df38bfdad62591423f
https://openstandia.jp/oss_info/redhatenterpriselinux/version/