The first step to migrating from RHEL 7 to RHEL 8/9 is to create new RHEL 8/9 systems.
When creating these new systems, configure them according to your organization's requirements, based on your previous Salt infrastructure systems. If the choice allows, it is preferred to install RHEL 9 otherwise use RHEL 8.
Once created, install the Salt Minion agent on each system and connect it to a RHEL 7 Salt Master.
Perform these steps using Salt.
Note: The minionIDs used in the following examples are different than the minionIDs used in your environment.
Prerequisites
Before migrating to RHEL 8/9, you must be on RHEL 7.4 -7.9.
Procedure
- Update the OS to ensure the most recent patches are applied to the new systems by running this command:
salt \*rhel9 cmd.run ‘yum update -y’
- Ensure dependencies are installed on all RHEL 9 servers:
- Openssl
- Epel-release
- Python3-cryptography (Python36-cryptography is not present in RHEL8)
- Python3-pyOpenSSL (Python36-pyOpenSSL is not present in RHEL8)
- Disable the firewalld service or ensure ports 443, 4505, and 4506 are open for communiation between services. To disable the firewalld service, open a command, navigate to the new RHEL8/9 system, and run thse commands
Systemctl stop firewalld
Systemctl disable firewalld
- To install dependencies:
- Create this state file and store it on the RHEL7 Salt Master system (where your RHEL 8/9 systems report) in the /srv/salt directory.
# Install the dependencies for Salt install
# file: /srv/salt/install_dependencies.sls
# to apply this state run:
# salt <minion_id> state.sls install_dependencies
install_openssl:
pkg.installed:
- name: openssl
install_codeready_repo:
cmd.run:
- name: subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
- require:
- install_openssl
install_epel:
cmd.run:
- name: dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
- require:
- install_codeready_repo
install_pycrypto:
pkg.installed:
- name: python3-cryptography
- require:
- install_epel
install_pyopenssl:
pkg.installed:
- name: python3-pyOpenSSL
- require:
- install_pycrypto
- Run the install_dependencies.sls state command in test mode:
Salt ‘*rhel9-*’ state.sls install_dependencies test=True
- If the state completed successfully without errors, run the command without test=true:
Salt ‘*rhel9-*’ state.sls install_dependencies