Skip to content

Update Upgrading and Updating Docs #3770

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions guides/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/scripts/docs-Red_Hat_Satellite_6/
/scripts/foreman-documentation/
*.diff
../foreman-documentation/
151 changes: 41 additions & 110 deletions guides/common/modules/proc_updating-disconnected-server-on-EL9.adoc
Original file line number Diff line number Diff line change
@@ -1,145 +1,76 @@
[id="Updating-Disconnected-{project-context}-on-EL9_{context}"]
= Updating a disconnected {ProjectServer} on {EL} 9

You can update your disconnected {Project} on {RHEL} 9 by synchronizing the required repositories on the connected {Project} and syncing the content to the disconnected {Project} using `reposync`.
You can update your disconnected {Project} on {RHEL} 9 by synchronizing the required repositories on the connected {Project} and syncing the content to the disconnected {Project} using `syncable` exports.

.Procedure on the connected {ProjectServer}
. Ensure that you have synchronized the following repositories in your connected {ProjectServer}:
. Ensure that the following repositories are synchronized on your connected {ProjectServer}:
+
* {RepoRHEL9BaseOS}
* {RepoRHEL9AppStream}
* {RepoRHEL9ServerSatelliteServerProjectVersion}
* {RepoRHEL9ServerSatelliteMaintenanceProjectVersion}
. Download the debug certificate of the organization and store it locally at `/etc/pki/katello/certs/org-debug-cert.pem` or a location of your choosing.
For more information, see {AdministeringDocURL}Creating_an_Organization_Debug_Certificate_admin[Creating an Organization Debug Certificate] in _{AdministeringDocTitle}_.
. Create a Yum configuration file under `/etc/yum.repos.d`, such as `_{project-context}-disconnected_.repo`, with the following contents:
. Export the repositories in a syncable format:
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
[{RepoRHEL9BaseOS}]
name=Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs)
baseurl=_https://{foreman-example-com}_/pulp/content/_My_Organization_/Library/content/dist/rhel9/9/x86_64/baseos/os
enabled = 1
sslclientcert = /etc/pki/katello/certs/org-debug-cert.pem
sslclientkey = /etc/pki/katello/certs/org-debug-cert.pem
sslcacert = /etc/pki/katello/certs/katello-server-ca.crt
sslverify = 1

[{RepoRHEL9AppStream}]
name=Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs)
baseurl=_https://{foreman-example-com}_/pulp/content/_My_Organization_/Library/content/dist/rhel9/9/x86_64/appstream/os
enabled = 1
sslclientcert = /etc/pki/katello/certs/org-debug-cert.pem
sslclientkey = /etc/pki/katello/certs/org-debug-cert.pem
sslcacert = /etc/pki/katello/certs/katello-server-ca.crt
sslverify = 1

[{RepoRHEL9ServerSatelliteServerProjectVersion}]
name={ProjectName} {ProjectVersion} for RHEL 9 RPMs x86_64
baseurl=_https://{foreman-example-com}_/pulp/content/_My_Organization_/Library/content/dist/layered/rhel9/x86_64/satellite/{ProjectVersion}/os
enabled = 1
sslclientcert = /etc/pki/katello/certs/org-debug-cert.pem
sslclientkey = /etc/pki/katello/certs/org-debug-cert.pem
sslcacert = /etc/pki/katello/certs/katello-server-ca.crt
sslverify = 1

[{RepoRHEL9ServerSatelliteMaintenanceProjectVersion}]
name={ProjectName} Maintenance {ProjectVersion} for RHEL 9 RPMs x86_64
baseurl=_https://{foreman-example-com}_/pulp/content/_My_Organization_/Library/content/dist/layered/rhel9/x86_64/sat-maintenance/{ProjectVersion}/os
enabled = 1
sslclientcert = /etc/pki/katello/certs/org-debug-cert.pem
sslclientkey = /etc/pki/katello/certs/org-debug-cert.pem
sslcacert = /etc/pki/katello/certs/katello-server-ca.crt
sslverify = 1
----
. In the configuration file, complete the following steps:
* For the `sslclientcert` and `sslclientkey` options, replace `/etc/pki/katello/certs/org-debug-cert.pem` with the location of the downloaded organization debug certificate.
* For the `baseurl` option, replace `{foreman-example-com}` with the correct FQDN of your connected {ProjectServer}.
* For the `baseurl` option, replace `My_Organization` with your organization label.
. Obtain the organization label:
+
----
$ hammer organization list
----
. Enter the `reposync` command:
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
# dnf reposync \
--delete \
--disableplugin=foreman-protector \
--download-metadata \
--repoid {RepoRHEL9AppStream} \
--repoid {RepoRHEL9BaseOS} \
--repoid {RepoRHEL9ServerSatelliteMaintenanceProjectVersion} \
--repoid {RepoRHEL9ServerSatelliteServerProjectVersion} \
-n \
-p ~/{Project}-repos
$ hammer content-export complete repository \
--id=_Repo_ID_ --format=syncable
----
+
This downloads the contents of the repositories from the connected {ProjectServer} and stores them in the directory `~/{Project}-repos`.
. Verify that the RPMs have been downloaded and the repository data directory is generated in each of the sub-directories of `~/{Project}-repos`.
. Archive the contents of the directory:
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
# tar czf {Project}-repos.tgz -C ~ {Project}-repos
----
. Use the generated `{Project}-repos.tgz` file to update in the disconnected {ProjectServer}.
. Copy the exported directories to the disconnected {ProjectServer}.

.Procedure on the disconnected {ProjectServer}
. Copy the generated `{Project}-repos.tgz` file to your disconnected {ProjectServer}.
. Extract the archive to anywhere accessible by the `root` user.
In the following example `/root` is the extraction location.
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
# tar zxf {Project}-repos.tgz -C /root
----
. Create a Yum configuration file under `/etc/yum.repos.d` with the following repository information:
. Identify the location of the copied exported directories.
. Create the `/etc/yum.repos.d/upgrade.repo` and update the `baseurl` directive accordingly:
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
[options="nowrap" subs="+quotes,attributes"]
----
[{RepoRHEL9BaseOS}]
name=Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs)
baseurl=file:///root/{Project}-repos/{RepoRHEL9BaseOS}
enabled = 1

metadata_expire=-1
gpgcheck=0
cost=500
baseurl=file:///<export baseos location>/content/dist/rhel9/9/x86_64/baseos/os
[{RepoRHEL9AppStream}]
name=Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs)
baseurl=file:///root/{Project}-repos/{RepoRHEL9AppStream}
enabled = 1

[{RepoRHEL9ServerSatelliteServerProjectVersion}]
name={ProjectNameX} for RHEL 9 Server RPMs x86_64
baseurl=file:///root/{Project}-repos/{RepoRHEL9ServerSatelliteServerProjectVersion}
enabled = 1

[{RepoRHEL9ServerSatelliteMaintenanceProjectVersion}]
name={ProjectName} Maintenance 6 for RHEL 9 Server RPMs x86_64
baseurl=file:///root/{Project}-repos/{RepoRHEL9ServerSatelliteMaintenanceProjectVersion}
enabled = 1
mediaid=None
metadata_expire=-1
gpgcheck=0
cost=500
baseurl=file:///<export appstream location>/content/dist/rhel9/9/x86_64/appstream/os
[{Project}]
name={Project}
mediaid=None
metadata_expire=-1
gpgcheck=0
cost=500
baseurl=file:///<export location>/content/dist/layered/rhel8/x86_64/{project-context}/{ProjectVersion}/os/
----
+
. Upgrade {foreman-maintain} to the next version:
+
[options="nowrap" subs="attributes"]
----
# {foreman-maintain} self-upgrade --maintenance-repo-label={Project}
----
. In the configuration file, replace the `/root/{Project}-repos` with the extracted location.
. Use the health check option to determine if the system is ready for update.
On first use of this command, `{foreman-maintain}` prompts you to enter the hammer admin user credentials and saves them in the `/etc/foreman-maintain/foreman-maintain-hammer.yml` file.
The first time you run this command, `{foreman-maintain}` prompts you to enter the hammer admin user credentials and saves them in `/etc/foreman-maintain/foreman-maintain-hammer.yml`.
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
# {foreman-maintain} update check \
--whitelist="check-upstream-repository,repositories-validate"
# {foreman-maintain} upgrade check --whitelist="repositories-validate,repositories-setup" \
--target-version={ProjectVersion}
----
. Review the results and address any highlighted error conditions before performing the update.
. Due to the lengthy update time, use a utility such as `tmux` to suspend and reattach a communication session.
You can then check the update progress without staying connected to the command shell continuously.
. Review the results and resolve any errors before proceeding with the update.
. Due to the lengthy update time, use a utility such as `tmux` to suspend and resume the session as needed.
This allows you to monitor progress without maintaining a continuous connection to the command shell.
+
If you lose connection to the command shell where the update command is running, you can see the logged messages in the `{installer-log-file}` file to check if the process completed successfully.
If you lose connection to the command shell running the update command, you can see the logged messages in `{installer-log-file}` to confirm whether the process completed successfully.
. Perform the update:
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
# {foreman-maintain} update run \
--whitelist="check-upstream-repository,repositories-setup,repositories-validate"
# {foreman-maintain} upgrade run --whitelist="repositories-validate,repositories-setup" \
--target-version={ProjectVersion}
----

include::snip_steps-needs-reboot.adoc[]
Expand Down
Loading
Loading