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

Drop OS RHEL 7 based support #4430

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \
export PATH="$HOME/.pyenv/bin:$PATH" && eval "$(pyenv init -)"

# Install pythons
RUN ~/.pyenv/bin/pyenv install 3.10.12 3.6.15 2.7 && \
~/.pyenv/bin/pyenv global 3.10.12 3.6.15 2.7
RUN ~/.pyenv/bin/pyenv install 3.10.12 3.6.15 && \
~/.pyenv/bin/pyenv global 3.10.12 3.6.15

# Install python libs
RUN ~/.pyenv/bin/pyenv exec pip install "tox~=4.4.12" "pre-commit~=3.3.3" "virtualenv<20.22.0" "esbonio>=0.12.0"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ jobs:
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install --no-install-recommends -y shellcheck python2.7-minimal
sudo apt-get install --no-install-recommends -y shellcheck
python3.10 -m pip install tox~=4.0.11
- name: Install Helm
env:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ jobs:
fail-fast: false
matrix:
os:
- centos-7
- rhel-8
# NOTE: We add rocky-8 here even if it's already tested in pre-merge since
# we also test solution install + upgrade there
Expand Down
16 changes: 1 addition & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,7 @@ repos:
files: ^packages/common/metalk8s-sosreport/.*\.py$
additional_dependencies:
- requests
args:
- --rcfile=packages/common/metalk8s-sosreport/.pylintrc

# Python 2.7 specific
- repo: https://github.com/pre-commit/mirrors-pylint
# NOTE: Newer version does no longer support python2.7
rev: v1.9.1
hooks:
- id: pylint
name: Lint sos report plugin (python2.7)
language_version: python2.7
# Linting for sos report plugin files only
files: ^packages/common/metalk8s-sosreport/.*\.py$
additional_dependencies:
- requests
- git+https://github.com/sosreport/[email protected]
args:
- --rcfile=packages/common/metalk8s-sosreport/.pylintrc

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Release 129.0.0 (in development)

### Removals

- Drop RHEL 7 based OS support
(PR[#4430](https://github.com/scality/metalk8s/pull/4430))

### Enhancements

- Implement super-admin user and bind admin to built-in cluster-admins role
Expand Down
14 changes: 0 additions & 14 deletions buildchain/buildchain/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ def _builder_image(name: str, dockerfile: Path, **kwargs: Any) -> LocalImage:
REDHAT_REPOS_ROOT: Path = constants.ROOT / "packages/redhat/common/yum_repositories"

RPM_BUILDER: Dict[str, LocalImage] = {
"7": _builder_image(
name="redhat-7-rpm",
dockerfile=constants.ROOT / "packages/redhat/7/Dockerfile",
build_context=constants.ROOT / "packages/redhat",
file_dep=[
REDHAT_REPOS_ROOT / "kubernetes.repo",
REDHAT_REPOS_ROOT / "saltstack.repo",
],
build_args={
# Used to template the repository definition
"SALT_VERSION": versions.SALT_VERSION,
"K8S_SHORT_VERSION": versions.K8S_SHORT_VERSION,
},
),
"8": _builder_image(
name="redhat-8-rpm",
dockerfile=constants.ROOT / "packages/redhat/8/Dockerfile",
Expand Down
51 changes: 2 additions & 49 deletions buildchain/buildchain/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- building local packages from sources
- building local repositories from local packages

Note that for now, it only works for CentOS/RedHat 7 and 8 x86_64.
Note that for now, it only works for CentOS/RedHat 8 x86_64.

Overview;

Expand Down Expand Up @@ -89,7 +89,6 @@ def task__build_packages() -> types.TaskDict:
return {
"actions": None,
"task_dep": [
"_build_redhat_7_packages",
"_build_redhat_8_packages",
],
}
Expand All @@ -100,7 +99,6 @@ def task__download_packages() -> types.TaskDict:
return {
"actions": None,
"task_dep": [
"_download_redhat_7_packages",
"_download_redhat_8_packages",
],
}
Expand All @@ -111,7 +109,6 @@ def task__build_repositories() -> types.TaskDict:
return {
"actions": None,
"task_dep": [
"_build_redhat_7_repositories",
"_build_redhat_8_repositories",
],
}
Expand All @@ -138,11 +135,6 @@ def _package_mkdir_redhat_release_root(releasever: str) -> types.TaskDict:
).task


def task__package_mkdir_redhat_7_root() -> types.TaskDict:
"""Create the RedHat 7 packages root directory."""
return _package_mkdir_redhat_release_root("7")


def task__package_mkdir_redhat_8_root() -> types.TaskDict:
"""Create the RedHat 8 packages root directory."""
return _package_mkdir_redhat_release_root("8")
Expand Down Expand Up @@ -173,11 +165,6 @@ def _package_mkdir_redhat_release_iso_root(releasever: str) -> types.TaskDict:
).task


def task__package_mkdir_redhat_7_iso_root() -> types.TaskDict:
"""Create the RedHat 7 packages root directory on the ISO."""
return _package_mkdir_redhat_release_iso_root("7")


def task__package_mkdir_redhat_8_iso_root() -> types.TaskDict:
"""Create the RedHat 8 packages root directory on the ISO."""
return _package_mkdir_redhat_release_iso_root("8")
Expand Down Expand Up @@ -245,11 +232,6 @@ def _dl_packages_callable() -> None:
}


def task__download_redhat_7_packages() -> types.TaskDict:
"""Download RedHat 7 packages locally."""
return _download_rpm_packages("7")


def task__download_redhat_8_packages() -> types.TaskDict:
"""Download RedHat 8 packages locally."""
return _download_rpm_packages("8")
Expand All @@ -262,11 +244,6 @@ def _build_rpm_packages(releasever: str) -> Iterator[types.TaskDict]:
yield from package.execution_plan


def task__build_redhat_7_packages() -> Iterator[types.TaskDict]:
"""Build RPM packages for RedHat 7."""
return _build_rpm_packages("7")


def task__build_redhat_8_packages() -> Iterator[types.TaskDict]:
"""Build RPM packages for RedHat 8."""
return _build_rpm_packages("8")
Expand All @@ -278,11 +255,6 @@ def _build_redhat_repositories(releasever: str) -> Iterator[types.TaskDict]:
yield from repository.execution_plan


def task__build_redhat_7_repositories() -> Iterator[types.TaskDict]:
"""Build RedHat 7 repositories."""
return _build_redhat_repositories("7")


def task__build_redhat_8_repositories() -> Iterator[types.TaskDict]:
"""Build RedHat 8 repositories."""
return _build_redhat_repositories("8")
Expand Down Expand Up @@ -341,11 +313,6 @@ def _rpm_repository(

def _rpm_package_containerd(releasever: str) -> targets.RPMPackage:
"""Containerd RPM package."""
extra_sources = []

if releasever == "7":
extra_sources.append(Path("60-containerd.conf"))

return _rpm_package(
name="containerd",
releasever=releasever,
Expand All @@ -354,8 +321,7 @@ def _rpm_package_containerd(releasever: str) -> targets.RPMPackage:
Path("containerd.service"),
Path("containerd.toml"),
Path(f"v{versions.CONTAINERD_VERSION}.tar.gz"),
]
+ extra_sources,
],
)


Expand All @@ -373,10 +339,6 @@ def _rpm_package_metalk8s_sosreport(releasever: str) -> targets.RPMPackage:

RPM_TO_BUILD: Dict[str, Dict[str, Tuple[targets.RPMPackage, ...]]] = {
"scality": {
"7": (
_rpm_package_containerd("7"),
_rpm_package_metalk8s_sosreport("7"),
),
"8": (
_rpm_package_containerd("8"),
_rpm_package_metalk8s_sosreport("8"),
Expand Down Expand Up @@ -408,21 +370,12 @@ def _rpm_package_metalk8s_sosreport(releasever: str) -> targets.RPMPackage:
)


SCALITY_REDHAT_7_REPOSITORY: targets.RPMRepository = _rpm_repository(
name="scality", packages=RPM_TO_BUILD["scality"]["7"], releasever="7"
)
SCALITY_REDHAT_8_REPOSITORY: targets.RPMRepository = _rpm_repository(
name="scality", packages=RPM_TO_BUILD["scality"]["8"], releasever="8"
)


REDHAT_REPOSITORIES: Dict[str, Tuple[targets.RPMRepository, ...]] = {
"7": (
SCALITY_REDHAT_7_REPOSITORY,
_rpm_repository(name="epel", releasever="7"),
_rpm_repository(name="kubernetes", releasever="7"),
_rpm_repository(name="saltstack", releasever="7"),
),
"8": (
SCALITY_REDHAT_8_REPOSITORY,
_rpm_repository(name="epel", releasever="8"),
Expand Down
16 changes: 1 addition & 15 deletions buildchain/buildchain/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
SALT_VERSION: str = "3002.9"
CONTAINERD_VERSION: str = "1.6.35"

CONTAINERD_RELEASE: str = "1"
CONTAINERD_RELEASE: str = "2"
SOSREPORT_RELEASE: str = "2"


Expand Down Expand Up @@ -380,20 +380,6 @@ def rpm_full_name(self) -> str:
PackageVersion(name="xfsprogs"),
),
"redhat": {
"7": (
PackageVersion(
name="containerd",
version=CONTAINERD_VERSION,
release=f"{CONTAINERD_RELEASE}.el7",
),
PackageVersion(name="container-selinux"), # TODO #1710
PackageVersion(
name="metalk8s-sosreport",
version=NONSUFFIXED_VERSION,
release=f"{SOSREPORT_RELEASE}.el7",
),
PackageVersion(name="yum-plugin-versionlock"),
),
"8": (
PackageVersion(
name="containerd",
Expand Down
44 changes: 8 additions & 36 deletions docs/installation/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ Prerequisites
.. _MetalK8s: https://github.com/scality/metalk8s
.. _CentOS: https://www.centos.org
.. _RHEL: https://access.redhat.com/products/red-hat-enterprise-linux
.. _Rocky: https://rockylinux.org
.. _RHSM register: https://access.redhat.com/solutions/253273
.. _Enable Optional repositories with RHSM: https://access.redhat.com/solutions/392003
.. _Configure repositories with YUM: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sec-configuring_yum_and_yum_repositories#sec-Managing_Yum_Repositories
.. _Advanced repositories configuration: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sec-configuring_yum_and_yum_repositories#sec-Setting_repository_Options
.. _SaltStack: https://www.saltstack.com
.. _Puppet: https://puppet.com

MetalK8s_ clusters require machines running CentOS_\/RHEL_ 7.6 or higher as
MetalK8s_ clusters require machines running CentOS_\/RHEL_/Rocky_ 8 as
their operating system. These machines may be virtual or physical, with no
difference in setup procedure. The number of machines to set up depends on the
architecture you chose in :ref:`installation-intro-architecture`.
Expand All @@ -28,29 +29,6 @@ Proxies

For nodes operating behind a proxy, see :ref:`Bootstrap Configuration`.

Linux Kernel Version
--------------------

Linux kernels shipped with CentOS/RHEL 7 and earlier are affected by a
cgroups memory leak bug.

This bug was fixed in kernel 3.10.0-1062.4.1. Use this kernel version or later.

The version can be retrieved using:

.. code-block:: shell

$ uname -r

If the installed version is lower than the one above, upgrade it with:

.. code-block:: shell

$ yum upgrade -y kernel-3.10.0-1062.4.1.el7
$ reboot

These commands may require sudo or root access.

Provisioning
------------

Expand Down Expand Up @@ -79,17 +57,11 @@ Repositories
Each machine must have properly configured repositories with access to basic
repository packages (depending on the operating system).

CentOS:
CentOS/Rocky:

- base
- appstream
- baseos
- extras
- updates

RHEL 7:

- rhel-7-server-rpms
- rhel-7-server-extras-rpms
- rhel-7-server-optional-rpms

RHEL 8:

Expand All @@ -107,11 +79,11 @@ RHEL 8:

To enable an existing repository:

CentOS:
CentOS/Rocky:

.. code-block:: shell

yum-config-manager --enable <repo_name>
dnf config-manager --enable <repo_name>

RHEL:

Expand All @@ -123,7 +95,7 @@ To add a new repository:

.. code-block:: shell

yum-config-manager --add-repo <repo_url>
dnf config-manager --add-repo <repo_url>

.. note::

Expand Down
10 changes: 1 addition & 9 deletions packages/common/metalk8s-sosreport/.pylintrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
[MESSAGES CONTROL]

disable=duplicate-code,
too-few-public-methods,
bad-continuation,
consider-using-f-string,
unspecified-encoding

[3RD-PARTY-IMPORTS]

allowed-3rd-party-modules=sos
disable=duplicate-code
Loading
Loading