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

Remove repeated installer code #161

Closed
wants to merge 11 commits into from
Closed

Conversation

grdumas
Copy link
Contributor

@grdumas grdumas commented Feb 4, 2025

Description

Removes duplicate code from installer script.

Before/After Comparison

Before: Installer repeats operations

root@localhost:~# ./zathras/bin/install.sh
For most use cases, running this script as root is NOT recommended. Are you sure? Y/N y
You answered yes, continuing install as root.
Installing ansible-core...
...
[output truncated]
...
Total 4.9 MB/s | 3.2 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : python3-pip-23.3.2-7.el10.noarch 1/1
Running scriptlet: python3-pip-23.3.2-7.el10.noarch 1/1
Installed products updated.

Installed:
python3-pip-23.3.2-7.el10.noarch

Complete!
For most use cases, running this script as root is NOT recommended. Are you sure? Y/N
You answered yes, continuing install as root.
ansible-core is installed.
git is installed.
jq is installed.
Installing python...
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: 1:05:53 ago on Tue 04 Feb 2025 05:58:51 AM EST.
Package python-unversioned-command-3.12.8-2.el10.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
python3-pip is installed.

After

root@localhost:~# ./zathras/bin/install.sh
For most use cases, running this script as root is NOT recommended. Are you sure? Y/N y
You answered yes, continuing install as root.
Installing ansible-core...
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: 1:09:09 ago on Tue 04 Feb 2025 05:58:51 AM EST.
Dependencies resolved.

Package Architecture Version Repository Size

Installing:
ansible-core noarch 1:2.16.14-1.el10 appstream 2.9 M
Installing dependencies:
python3-cffi x86_64 1.16.0-7.el10 baseos 308 k
python3-cryptography x86_64 43.0.0-4.el10 baseos 1.4 M
python3-jinja2 noarch 3.1.5-1.el10 appstream 327 k
python3-markupsafe x86_64 2.1.3-6.el10 appstream 32 k
python3-ply noarch 3.11-25.el10 baseos 134 k
python3-pycparser noarch 2.20-16.el10 baseos 158 k
python3-resolvelib noarch 1.0.1-6.el10 appstream 45 k

Transaction Summary

Install 8 Packages

Total download size: 5.3 M
Installed size: 20 M
Downloading Packages:
(1/8): python3-ply-3.11-25.el10.noarch.rpm 678 kB/s | 134 kB 00:00
(2/8): python3-cffi-1.16.0-7.el10.x86_64.rpm 1.4 MB/s | 308 kB 00:00
(3/8): python3-pycparser-2.20-16.el10.noarch.rpm 1.7 MB/s | 158 kB 00:00
(4/8): python3-cryptography-43.0.0-4.el10.x86_64.rpm 4.1 MB/s | 1.4 MB 00:00
(5/8): python3-markupsafe-2.1.3-6.el10.x86_64.rpm 342 kB/s | 32 kB 00:00
(6/8): python3-resolvelib-1.0.1-6.el10.noarch.rpm 925 kB/s | 45 kB 00:00
(7/8): python3-jinja2-3.1.5-1.el10.noarch.rpm 1.4 MB/s | 327 kB 00:00
(8/8): ansible-core-2.16.14-1.el10.noarch.rpm 3.0 MB/s | 2.9 MB 00:00
Total 4.1 MB/s | 5.3 MB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : python3-resolvelib-1.0.1-6.el10.noarch 1/8
Installing : python3-markupsafe-2.1.3-6.el10.x86_64 2/8
Installing : python3-jinja2-3.1.5-1.el10.noarch 3/8
Installing : python3-ply-3.11-25.el10.noarch 4/8
Installing : python3-pycparser-2.20-16.el10.noarch 5/8
Installing : python3-cffi-1.16.0-7.el10.x86_64 6/8
Installing : python3-cryptography-43.0.0-4.el10.x86_64 7/8
Installing : ansible-core-1:2.16.14-1.el10.noarch 8/8
Running scriptlet: ansible-core-1:2.16.14-1.el10.noarch 8/8
Installed products updated.

Installed:
ansible-core-1:2.16.14-1.el10.noarch python3-cffi-1.16.0-7.el10.x86_64 python3-cryptography-43.0.0-4.el10.x86_64 python3-jinja2-3.1.5-1.el10.noarch
python3-markupsafe-2.1.3-6.el10.x86_64 python3-ply-3.11-25.el10.noarch python3-pycparser-2.20-16.el10.noarch python3-resolvelib-1.0.1-6.el10.noarch

Complete!
git is installed.
jq is installed.
Installing python...
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: 1:09:14 ago on Tue 04 Feb 2025 05:58:51 AM EST.
Package python-unversioned-command-3.12.8-2.el10.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Installing python3-pip...
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: 1:09:15 ago on Tue 04 Feb 2025 05:58:51 AM EST.
Dependencies resolved.
Package Architecture Version Repository Size
Installing:
python3-pip noarch 23.3.2-7.el10 appstream 3.2 M

Transaction Summary
Install 1 Package

Total download size: 3.2 M
Installed size: 14 M
Downloading Packages:
python3-pip-23.3.2-7.el10.noarch.rpm 7.8 MB/s | 3.2 MB 00:00
Total 4.8 MB/s | 3.2 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : python3-pip-23.3.2-7.el10.noarch 1/1
Running scriptlet: python3-pip-23.3.2-7.el10.noarch 1/1
Installed products updated.

Installed:
python3-pip-23.3.2-7.el10.noarch

Complete!

Clerical Stuff

Fixes #160.

I cannot find a JIRA ticket for the issue. Creating one is not a problem, but I'd like to figure out if I did not trigger the CI correctly when opening the issue on github.

Relates to JIRA: RPOPC-<TICKET_NUMBER>

@grdumas grdumas added the bug Something isn't working label Feb 4, 2025
@grdumas grdumas self-assigned this Feb 4, 2025
@grdumas grdumas requested a review from a team February 4, 2025 13:05
@kdvalin
Copy link
Member

kdvalin commented Feb 4, 2025

Open new PR with only installer changes (or clobber with force push :) )

Fix issue with difference in ansible yum output.
@grdumas grdumas closed this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants