-
Notifications
You must be signed in to change notification settings - Fork 43
Fixes #615 - Add documentation for upgrade procedure #621
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
base: master
Are you sure you want to change the base?
Changes from all commits
8c464e3
cae3f9b
93ffb11
bdd2ec7
0c2ad4f
c96ba8c
f1ee6dc
f1157f0
510e93e
fa970e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,6 +141,23 @@ After deployment, the environment includes: | |
| - `smart-proxy` and its plugins | ||
| - the development smart proxy registered into Foreman | ||
|
|
||
| ### Upgrading from source | ||
|
|
||
| In a source install, git branches control versioning instead of RPM packages. Stable branches (e.g. `2.y-stable`) track a specific Foreman Y-stream, while the `master` branch tracks nightly changes (most recent). | ||
|
|
||
| All steps must be run as the root user. These steps assume that foremanctl is being ran from the same machine that Foreman was deployed on. | ||
|
|
||
| 1. Please take a moment to determine your preferred Foreman version / git branch, we only support sequential updates. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't support anything on development environments, so people can |
||
| 2. We recommend a full foremanctl backup before all upgrade operations. Run `foremanctl backup <filepath for backup>`. Please see [Backup](backup.md) for more information on this process. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While it's a good practice, I'm not sure how many people will be taking backups of their development environment. Actually, it makes me wonder if they're somehow incompatible with backup/restore. |
||
| 3. Begin the upgrade by stopping all Foreman processes with `systemctl stop foreman.target`. | ||
| 4. Switch to the preferred target branch: | ||
| - Switch to a stable Y-stream: `git fetch origin && git checkout origin/X.y-stable` | ||
| - Switch to nightly: `git fetch origin && git checkout origin/master` | ||
| 5. Run upgrade tasks by re-deploying foremanctl with your customized deploy command: `foremanctl deploy [...]`. Please see [Parameters](parameters.md) for available deploy options. | ||
|
|
||
| This final deploy command will pull new images and run all upgrade jobs required by Foreman, its dependencies, and your configured plugins. Expect this deploy to take longer than typical deploys. | ||
|
|
||
|
|
||
| ## Architecture | ||
|
|
||
| ### Service Integration | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Upgrading foremanctl | ||
|
|
||
| Foremanctl releases bundle specific versions of Foreman with version-compatible dependencies and plugins. | ||
|
aidenfine marked this conversation as resolved.
|
||
|
|
||
| For nearly all install situations, upgrading your Foreman server should be approached through upgrading foremanctl. Scroll to the correct procedure below which matches your installation environment type (RPM, disconnected RPM, source). | ||
|
|
||
| ## Upgrading foremanctl from RPM install | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This procedure doesn't explain to the user where to get the new version of
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aidenfine it might help to run through the upgrading and updating guides in the existing documentation to understand how we handle defining repositories. I think the general strategy for how we manage the repo will stay the same. |
||
|
|
||
| All steps must be run as root user. We also recommend that a `foremanctl health` check is run before these steps. | ||
|
|
||
| 1. Update the Foreman repository to the next X or Y release: | ||
| - `dnf upgrade https://yum.theforeman.org/releases/<next-version>/el9/x86_64/foreman-release.rpm` | ||
| 2. Upgrade the foremanctl package: | ||
| - `dnf upgrade foremanctl` | ||
| 3. Run upgrade tasks by re-deploying: `foremanctl deploy`. Please see [Parameters](parameters.md) for additional deploy options. | ||
|
|
||
| This final deploy command will pull new images and run all upgrade jobs required by Foreman, its dependencies, and your configured plugins. Expect this deploy to take longer than typical deploys. | ||
|
|
||
| ## Upgrading foremanctl from disconnected RPM install | ||
|
aidenfine marked this conversation as resolved.
|
||
|
|
||
| All below steps must be run as root user. We also recommend that a `foremanctl health` check is run before these steps. | ||
|
|
||
| Disconnected users should also create a local repository mirror of foreman, an example of this from Red Hat is linked here https://access.redhat.com/solutions/7019225. | ||
|
|
||
| 1. Stage the foremanctl RPM package | ||
| - The Foreman repository is needed for dependencies related to the foremanctl RPM. | ||
| - The foremanctl RPM must be available in a repository accessible to your disconnected Foreman server. Please transfer the RPM to your disconnected system via an available transport mechanism (USB drive, rsync over a bastion, etc.). | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the RPM enough? Or will they need the Foreman repository for dependencies?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I recall you should also need the repo for the deps, let me test right now.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ehelms Take a look I added an extra bullet point what do you think?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would recommend telling users to stage the entire repository locally. |
||
| - The foremanctl RPM can be downloaded from `https://yum.theforeman.org` | ||
| - Once staged, `dnf info foremanctl` will resolve as in a connected environment. | ||
| 2. Stage the required container images | ||
| - On a connected machine, pull all required images with `foremanctl pull-images`. | ||
| - Confirm the correct images were downloaded by running `podman images` on both the connected and disconnected machines. All images from your previous-version disconnected environment should be present on the connected environment. If images are missing, ensure parameters are identical between machines. | ||
| - On the connected environment, run `podman save $(podman images --format "{{.Repository}}:{{.Tag}}" | tr '\n' ' ') -o <filename>.tar` to export all downloaded images as a tarball. | ||
| - Transfer the tar file to your disconnected environment via an available transport mechanism. | ||
| - Run `podman load -i <filename>.tar` to stage the required images. | ||
| 3. Complete the [Upgrading foremanctl from RPM install](#upgrading-foremanctl-from-rpm-install) section above starting from step 3 to install from locally staged packages and images. | ||
|
|
||
| ## Recovering from a failed upgrade | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The troubleshooting section should probably have a section about varying Ansible errors, after which a user should probably open up an issue on GitHub or a post at community.theforeman.org.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any link to common Ansible errors that may occur? |
||
|
|
||
| In the event of a failed upgrade, don't panic! A failed deploy will typically reveal the details of what went wrong and can give hints regarding the nature of your issue. Here are some troubleshooting steps: | ||
|
|
||
| #### (RPM install) `dnf upgrade foremanctl` had "Nothing to do" | ||
| Run `dnf versionlock list` to see if your system is configured to allow X or Y version upgrades. Update the versionlock using the steps above. | ||
|
|
||
| #### `foremanctl deploy` could not pull images from remote | ||
| Ensure that https://quay.io is unblocked on your network. You can manually open https://quay.io/foreman/foreman in a browser to view available images. | ||
Uh oh!
There was an error while loading. Please reload this page.