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

fix(installer): remove centos 7 and 8 repo due to eol #648

Merged
merged 3 commits into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions install_scripts/templates/common/docker-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,28 +217,6 @@ _installDocker() {
fi
fi

# docker-ce 20.10+ includes docker-ce-rootless-extras, which has some depenendencies not
# Found in any of the yum repos available on RHEL on Azure.
# Also seen on Oracle Enterprise Linux.
compareDockerVersions "20.10.0" "${1}"
if { [ "$LSB_DIST" = "rhel" ] || [ "$LSB_DIST" = "ol" ] ; } && [ "$COMPARE_DOCKER_VERSIONS_RESULT" -le "0" ]; then
if ! yum list installed "yum-utils" >/dev/null 2>&1; then
logStep "Installing yum-utils"
yum install -y yum-utils
logSuccess "Installed yum-utils"
fi
getUrlCmd
Copy link
Member

Choose a reason for hiding this comment

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

I think you can remove this entire block from line 220 as you do not need yum-utils if you are not going to use yum-config-manager.

One thing to note is that this assumes that appstream repo is enabled on rhel. I think it is best that the script fail if it is not but it may end in a support case and we need to instruct the customer to enable.

Installing:
 container-selinux                               noarch                               2:2.229.0-2.module+el8.10.0+21196+3f0abbca                                 rhui-rhel-8-for-x86_64-appstream-rhui-rpms                                71 k

I tested this on gcp with image rhel-8-v20240515 and it seemed to work.

Copy link
Member

Choose a reason for hiding this comment

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

I also tested on azure since it is in the comment and that worked as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you @emosbaugh! I have removed the yum-utils install part

if [ "$DIST_VERSION_MAJOR" -eq 7 ]; then
yum-config-manager --add-repo=http://mirror.centos.org/centos/7/extras/x86_64 || true
$URLGET_CMD "https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7" > EXTRAS_KEY
else
yum-config-manager --add-repo=http://mirror.centos.org/centos/8/extras/x86_64/os || true
$URLGET_CMD "https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official" > EXTRAS_KEY
fi
rpm --import EXTRAS_KEY
rm EXTRAS_KEY
fi

_docker_install_url="{{ replicated_install_url }}/docker-install.sh"
printf "${GREEN}Installing docker version ${1} from ${_docker_install_url}${NC}\n"
getUrlCmd
Expand Down