NOTE: This guide exists for Upgrading from v3.1 to v3.2 as well --> here
When updating your foreman installation manually, I find that the official documentation is a bit lacking. So here's how I update my foreman-server from v3.2 to v3.3 and katello from v4.4 to v4.5.
I would recommend executing all of these commands in a tmux session so that your session will remain on the server in case anything happens to your workstation.
Start by checking for running tasks that would prohibit an update:
[root@katello01 ~]# foreman-rake katello:upgrade_check
Next, update the katello host and reboot it if yum tells you to:
[root@katello01 ~]# yum -d 2 -y update
[root@katello01 ~]# needs-restarting -r
When the katello services have started again, upgrade the repository:
[root@katello01 ~]# yum -d 2 -y install https://yum.theforeman.org/releases/3.3/el7/x86_64/foreman-release.rpm
[root@katello01 ~]# yum -d 2 -y install https://yum.theforeman.org/katello/4.5/katello/el7/x86_64/katello-repos-latest.rpm
[root@katello01 ~]# yum -d 2 -y install centos-release-scl-rh
Clear the yum cache before proceeding with the upgrade
[root@katello01 ~]# yum -d 2 clean all
[root@katello01 ~]# rm -rf /var/cache/yum
Update the system:
[root@katello01 ~]# yum -d 2 -y update
When the update is done, stop the foreman-services:
[root@katello01 ~]# foreman-maintain service stop
Check your katello-answers.yml file for the value of 'pulpcore_cache_enabled':
[root@katello01 ~]# egrep -i 'pulpcore_cache_enabled' /etc/foreman-installer/scenarios.d/katello-answers.yaml
pulpcore_cache_enabled: false
If it's set to 'false', make sure to set it to true before running the installer to start the services as this will cause pulp connections to fail:
[root@katello01 ~]# sed -i 's/\ \ pulpcore_cache_enabled\:\ false/\ \ pulpcore_cache_enabled\:\ true/g' /etc/foreman-installer/scenarios.d/katello-answers.yaml
As a final step you can run the installer again to ensure a consistent state with the foreman-server:
[root@katello01 ~]# foreman-install --scenario katello
Once that is done, foreman / katello should be updated to the latest version of foreman-3.3 and katello-4.5.
Feel free to comment and / or suggest a topic.
Comments
Post a Comment