Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PE-38404) Update script for AL2 (again) #25

Merged
merged 1 commit into from
Jun 27, 2024
Merged

Conversation

joshcooper
Copy link
Contributor

@joshcooper joshcooper commented Jun 27, 2024

AL2 x86_64 was broken when AL2 aarch64 support was added. Pull in latest puppet_agent module and regenerate script. Note AL2 x86_64 installs el7 packages, while AL2 aarch64 installs amazon2 packages.

AL2 x86_64

[root@ip-10-227-3-64 ~]# ./test_install.sh 
20:29:55 +0000 INFO: Version parameter not defined and no agent detected. Assuming latest.
20:29:55 +0000 INFO: Downloading Puppet latest for Amzn...
20:29:55 +0000 INFO: Amazon platform! Lets get you an RPM...
20:29:55 +0000 INFO: Downloading http://yum.puppet.com/puppet-release-el-7.noarch.rpm
20:29:55 +0000 INFO:   to file /tmp/install.sh.21758.18502/puppet-release-el-7.noarch.rpm
20:29:55 +0000 INFO: Trying wget...
20:29:55 +0000 INFO: installing puppetlabs yum repo with rpm...
Preparing...                          ################################# [100%]
Updating / installing...
   1:puppet-release-1.0.0-33.el7      ################################# [100%]
Loaded plugins: langpacks, priorities, update-motd
puppet                                                                                                           | 2.6 kB  00:00:00     
puppet/x86_64/primary_db                                                                                         | 279 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package puppet-agent.x86_64 0:7.31.0-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================
 Package                            Arch                         Version                             Repository                    Size
========================================================================================================================================
Installing:
 puppet-agent                       x86_64                       7.31.0-1.el7                        puppet                        22 M

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

Total download size: 22 M
Installed size: 99 M
Downloading packages:
Public key for puppet-agent-7.31.0-1.el7.x86_64.rpm is not installed
puppet-agent-7.31.0-1.el7.x86_64.rpm                                                                             |  22 MB  00:00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-2025-04-06-puppet-release
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : puppet-agent-7.31.0-1.el7.x86_64                                                                                     1/1 
  Verifying  : puppet-agent-7.31.0-1.el7.x86_64                                                                                     1/1 

Installed:
  puppet-agent.x86_64 0:7.31.0-1.el7                                                                                                    

Complete!
Loaded plugins: langpacks, priorities, update-motd
No packages marked for update
[root@ip-10-227-3-64 ~]# rpm -q puppet-agent
puppet-agent-7.31.0-1.el7.x86_64

AL2 aarch64

[root@ip-10-227-6-176 ~]# ./test_install.sh 
20:31:30 +0000 INFO: Version parameter not defined and no agent detected. Assuming latest.
20:31:30 +0000 INFO: Downloading Puppet latest for Amzn...
20:31:30 +0000 INFO: Amazon platform! Lets get you an RPM...
20:31:30 +0000 INFO: Downloading http://yum.puppet.com/puppet-release-amazon-2.noarch.rpm
20:31:30 +0000 INFO:   to file /tmp/install.sh.1446.3179/puppet-release-amazon-2.noarch.rpm
20:31:30 +0000 INFO: Trying curl...
20:31:30 +0000 INFO: installing puppetlabs yum repo with rpm...
Preparing...                          ################################# [100%]
Updating / installing...
   1:puppet-release-1.0.0-33.amazon2  ################################# [100%]
Loaded plugins: priorities, update-motd, upgrade-helper
puppet                                                                                                           | 2.6 kB  00:00:00     
puppet/aarch64/primary_db                                                                                        | 6.3 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package puppet-agent.aarch64 0:7.31.0-1.amazon2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================
 Package                           Arch                         Version                               Repository                   Size
========================================================================================================================================
Installing:
 puppet-agent                      aarch64                      7.31.0-1.amazon2                      puppet                       22 M

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

Total download size: 22 M
Installed size: 107 M
Downloading packages:
Public key for puppet-agent-7.31.0-1.amazon2.aarch64.rpm is not installed=========================-   ] 6.4 MB/s |  20 MB  00:00:00 ETA 
puppet-agent-7.31.0-1.amazon2.aarch64.rpm                                                                        |  22 MB  00:00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-2025-04-06-puppet-release
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : puppet-agent-7.31.0-1.amazon2.aarch64                                                                                1/1 
  Verifying  : puppet-agent-7.31.0-1.amazon2.aarch64                                                                                1/1 

Installed:
  puppet-agent.aarch64 0:7.31.0-1.amazon2                                                                                               

Complete!
Loaded plugins: priorities, update-motd, upgrade-helper
No packages marked for update
[root@ip-10-227-6-176 ~]# rpm -q puppet-agent
puppet-agent-7.31.0-1.amazon2.aarch64

AL2023 x86_64

[root@ip-10-227-7-16 ~]# ./test_install.sh 
20:38:43 +0000 INFO: Version parameter not defined and no agent detected. Assuming latest.
20:38:43 +0000 INFO: Downloading Puppet latest for Amzn...
20:38:43 +0000 INFO: Amazon platform! Lets get you an RPM...
20:38:43 +0000 INFO: Downloading http://yum.puppet.com/puppet-release-amazon-2023.noarch.rpm
20:38:43 +0000 INFO:   to file /tmp/install.sh.2550.35740/puppet-release-amazon-2023.noarch.rpm
20:38:43 +0000 INFO: Trying wget...
20:38:43 +0000 INFO: installing puppetlabs yum repo with rpm...
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:puppet-release-1.0.0-33.amazon202################################# [100%]
Puppet Repository amazon 2023 - x86_64                                                                  1.5 MB/s | 355 kB     00:00    
Dependencies resolved.
========================================================================================================================================
 Package                          Architecture               Version                                   Repository                  Size
========================================================================================================================================
Installing:
 puppet-agent                     x86_64                     7.31.0-1.amazon2023                       puppet                      21 M

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

Total download size: 21 M
Installed size: 99 M
Downloading Packages:
puppet-agent-7.31.0-1.amazon2023.x86_64.rpm                                                              20 MB/s |  21 MB     00:01    
----------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                    20 MB/s |  21 MB     00:01     
Puppet Repository amazon 2023 - x86_64                                                                  1.6 MB/s | 1.7 kB     00:00    
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                1/1 
  Running scriptlet: puppet-agent-7.31.0-1.amazon2023.x86_64                                                                        1/1 
  Installing       : puppet-agent-7.31.0-1.amazon2023.x86_64                                                                        1/1 
  Running scriptlet: puppet-agent-7.31.0-1.amazon2023.x86_64                                                                        1/1 
  Verifying        : puppet-agent-7.31.0-1.amazon2023.x86_64                                                                        1/1 

Installed:
  puppet-agent-7.31.0-1.amazon2023.x86_64                                                                                               

Complete!
Last metadata expiration check: 0:00:12 ago on Thu Jun 27 20:38:44 2024.
Dependencies resolved.
Nothing to do.
Complete!
[root@ip-10-227-7-16 ~]# rpm -q puppet-agent
puppet-agent-7.31.0-1.amazon2023.x86_64

AL2023 aarch64

[root@ip-10-227-7-250 ~]# ./test_install.sh 
20:37:36 +0000 INFO: Version parameter not defined and no agent detected. Assuming latest.
20:37:36 +0000 INFO: Downloading Puppet latest for Amzn...
20:37:36 +0000 INFO: Amazon platform! Lets get you an RPM...
20:37:36 +0000 INFO: Downloading http://yum.puppet.com/puppet-release-amazon-2023.noarch.rpm
20:37:36 +0000 INFO:   to file /tmp/install.sh.1993.33271/puppet-release-amazon-2023.noarch.rpm
20:37:36 +0000 INFO: Trying wget...
20:37:36 +0000 INFO: installing puppetlabs yum repo with rpm...
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:puppet-release-1.0.0-33.amazon202################################# [100%]
Puppet Repository amazon 2023 - aarch64                                                                 995 kB/s | 353 kB     00:00    
Dependencies resolved.
========================================================================================================================================
 Package                          Architecture                Version                                  Repository                  Size
========================================================================================================================================
Installing:
 puppet-agent                     aarch64                     7.31.0-1.amazon2023                      puppet                      21 M

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

Total download size: 21 M
Installed size: 122 M
Downloading Packages:
puppet-agent-7.31.0-1.amazon2023.aarch64.rpm                                                             20 MB/s |  21 MB     00:01    
----------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                    20 MB/s |  21 MB     00:01     
Puppet Repository amazon 2023 - aarch64                                                                 1.6 MB/s | 1.7 kB     00:00    
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                1/1 
  Running scriptlet: puppet-agent-7.31.0-1.amazon2023.aarch64                                                                       1/1 
  Installing       : puppet-agent-7.31.0-1.amazon2023.aarch64                                                                       1/1 
  Running scriptlet: puppet-agent-7.31.0-1.amazon2023.aarch64                                                                       1/1 
  Verifying        : puppet-agent-7.31.0-1.amazon2023.aarch64                                                                       1/1 

Installed:
  puppet-agent-7.31.0-1.amazon2023.aarch64                                                                                              

Complete!
Last metadata expiration check: 0:00:08 ago on Thu Jun 27 20:37:37 2024.
Dependencies resolved.
Nothing to do.
Complete!
[root@ip-10-227-7-250 ~]# rpm -q puppet-agent
puppet-agent-7.31.0-1.amazon2023.aarch64

@joshcooper joshcooper requested review from a team as code owners June 27, 2024 20:36
install.sh Outdated
# For Amazon Linux 2023 and onwards we can use the 'amazon' packages created instead of 'el' packages
if (( $platform_version >= 2 )); then
arch="$(uname -p)"
# Install amazon packages on AL2 (only aarch64) and 2003 and up (all arch)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not blocking for me but we should update this comment to 2023 in the puppet_agent module at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doh! Tim pointed that out and I fixed one place, but not the other. Let me fix that in the module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged your module PR, can you regenerate this PR? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thanks for catching it!

AL2 x86_64 was broken when AL2 aarch64 support was added. Pull in latest
puppet_agent module and regenerate script.
@mhashizume mhashizume merged commit c7968cf into main Jun 27, 2024
16 checks passed
@mhashizume mhashizume deleted the amazon-2-aarch64 branch June 27, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants