aws/aws-codedeploy-agent

CodeDeploy agent support for RHEL 9

sanjeevgopal opened this issue · 1 comments

Need CodeDeploy agent to run on RHEL 9.

RHEL 9 was released Sep-2022, and my customer is using it for a key project. Unavailability of the agent is a blocker.

@sanjeevgopal release v1.7.0 supports RHEL 9.
The GitHub pre-release is mentioned here: https://github.com/aws/aws-codedeploy-agent/releases/tag/1.7.0-1
Announcement of the release: #388
Also mentioned in the official AWS documentation: https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent.html#codedeploy-agent-supported-operating-systems-ec2

I just did a successful manual test installation on RHEL 9.3 following this guide: https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-cli.html

prep

sudo yum update

# installs  ruby, x86_64, 3.0.4-160.el9_0 on a fresh test vm
sudo yum install ruby wget

wget https://aws-codedeploy-us-east-1.s3.us-east-1.amazonaws.com/latest/install

chmod +x ./install

sudo ./install auto

I, [2024-03-16T12:12:28.038289 #25837]  INFO -- : Starting Ruby version check.
I, [2024-03-16T12:12:28.038388 #25837]  INFO -- : Starting update check.
I, [2024-03-16T12:12:28.038424 #25837]  INFO -- : Attempting to automatically detect supported package manager type for system...
I, [2024-03-16T12:12:28.056455 #25837]  INFO -- : Checking AWS_REGION environment variable for region information...
I, [2024-03-16T12:12:28.056517 #25837]  INFO -- : Checking EC2 metadata service for region information...
I, [2024-03-16T12:12:28.067512 #25837]  INFO -- : Checking AWS_DOMAIN environment variable for domain information...
I, [2024-03-16T12:12:28.067557 #25837]  INFO -- : Checking EC2 metadata service for domain information...
I, [2024-03-16T12:12:28.072779 #25837]  INFO -- : Downloading version file from bucket aws-codedeploy-us-east-1 and key latest/LATEST_VERSION...
I, [2024-03-16T12:12:28.072943 #25837]  INFO -- : Endpoint: https://aws-codedeploy-us-east-1.s3.us-east-1.amazonaws.com/latest/LATEST_VERSION
I, [2024-03-16T12:12:28.204270 #25837]  INFO -- : Downloading package from bucket aws-codedeploy-us-east-1 and key releases/codedeploy-agent-1.7.0-92.noarch.rpm...
I, [2024-03-16T12:12:28.204457 #25837]  INFO -- : Endpoint: https://aws-codedeploy-us-east-1.s3.us-east-1.amazonaws.com/releases/codedeploy-agent-1.7.0-92.noarch.rpm
I, [2024-03-16T12:12:28.315048 #25837]  INFO -- : Executing `/usr/bin/yum -y localinstall /tmp/codedeploy-agent-1.7.0-92.noarch.tmp-20240316-25837-xulltr.rpm`...
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:03:35 ago on Sat 16 Mar 2024 12:08:54 PM UTC.
Dependencies resolved.
========================================================================================================================================================================================================
 Package                                              Architecture                               Version                                         Repository                                        Size
========================================================================================================================================================================================================
Installing:
 codedeploy-agent                                     noarch                                     1.7.0-92                                        @commandline                                     2.8 M

Transaction Summary
========================================================================================================================================================================================================
Install  1 Package

Total size: 2.8 M
Installed size: 13 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                1/1 
  Running scriptlet: codedeploy-agent-1.7.0-92.noarch                                                                                                                                               1/1 
 
pre hook : 1
Checking if there is already a process named codedeploy-agent running.

  Installing       : codedeploy-agent-1.7.0-92.noarch                                                                                                                                               1/1 
  Running scriptlet: codedeploy-agent-1.7.0-92.noarch                                                                                                                                               1/1 
 
post hook : 1
Check if there is a codedeployagent config file.
Start codedeploy-agent in post hook if this is a first install.

  Verifying        : codedeploy-agent-1.7.0-92.noarch                                                                                                                                               1/1 
Installed products updated.

Installed:
  codedeploy-agent-1.7.0-92.noarch                                                                                                                                                                      

Complete!
I, [2024-03-16T12:12:33.361132 #25837]  INFO -- : Update check complete.
I, [2024-03-16T12:12:33.361197 #25837]  INFO -- : Stopping updater.

systemctl status codedeploy-agent

● codedeploy-agent.service - AWS CodeDeploy Host Agent
     Loaded: loaded (/usr/lib/systemd/system/codedeploy-agent.service; enabled; preset: disabled)
     Active: active (running) since Sat 2024-03-16 12:12:31 UTC; 1min 37s ago
   Main PID: 25920 (ruby)
      Tasks: 2 (limit: 10422)
     Memory: 58.3M
        CPU: 1.486s
     CGroup: /system.slice/codedeploy-agent.service
             ├─25920 "codedeploy-agent: master 25920"
             └─25922 "codedeploy-agent: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller of master 25920"

Agent is up and running.

Test OS, RHEL 9.3
cat /etc/os-release

NAME="Red Hat Enterprise Linux"
VERSION="9.3 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.3 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"