The first step to migrating from RHEL 7 to RHEL 8/9 is to create new RHEL 8/9 systems.
Before migrating to RHEL 8/9, you must be on RHEL 7.4 -7.9.
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.
Note:
The minionIDs used in the following examples are different than the minionIDs used in your environment.
Before migrating to RHEL 8/9, you must be on RHEL 7.4 -7.9.
Perform these steps using Salt:
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:
Disable the firewalld
service or ensure ports 443, 4505, and 4506 are open for communication between services. To disable the firewalld
service, open a command, navigate to the new RHEL8/9 system, and run these 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