Skip to content

Commit 7f66b2a

Browse files
keichwapaususe
andauthored
Uyuni proxy upgrade keichwa (#388)
* proxy upgrade procedure * Update modules/upgrade/pages/proxy-uyuni.adoc Co-authored-by: Pau Garcia Quiles <[email protected]> * disable proxy-autoyast-uyuni.adoc which is currently untested
1 parent bb23a05 commit 7f66b2a

File tree

5 files changed

+254
-1
lines changed

5 files changed

+254
-1
lines changed

.changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
# Last packaged: 2020-07-02
88

9+
- New section Upgrade Uyuni Proxy in Upgrade Guide
910
- New section Upgrade Uyuni Server in Upgrade Guide
1011
- Add GPG information about Oracle clients to SUMA (bsc#1173520)
1112
- Add hostname admonition to public cloud sections (bsc#1173621)

modules/upgrade/nav-upgrade-guide.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ ifeval::[{uyuni-content} == true]
2323
*** xref:server-major-upgrade-uyuni.adoc[Server - Major Upgrade]
2424
endif::[]
2525
** xref:proxy-intro.adoc[Upgrade the Proxy]
26+
ifeval::[{uyuni-content} == true]
27+
// *** xref:proxy-autoyast-uyuni.adoc[Proxy - Upgrade with AutoYaST]
28+
*** xref:proxy-uyuni.adoc[Proxy - Upgrade Procedure]
29+
endif::[]
30+
ifeval::[{suma-content} == true]
2631
*** xref:proxy-x.adoc[Proxy - X Upgrade]
2732
*** xref:proxy-y-z.adoc[Proxy - Y or Z Upgrade]
33+
endif::[]
2834
** xref:client-intro.adoc[Upgrade the Clients]
2935
*** xref:client-x.adoc[Client - X Upgrade]
3036
** xref:db-intro.adoc[Upgrade the Database]
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
[[proxy-uyuni-ay]]
2+
= Proxy - Upgrade with AutoYaST
3+
4+
5+
{productname} Proxy can be upgraded from one major version to the next.
6+
The upgrade process is automated, but you will need to do some preparation steps before you can upgrade.
7+
8+
You will need to complete the {productname} Server Upgrade before you start.
9+
10+
The old system must be running {productname} Proxy with all the latest updates applied.
11+
Before you start, ensure that the system is up to date and all updates have been installed successfully.
12+
13+
14+
15+
== Prepare to Upgrade
16+
17+
Before you can update your proxy, you will need an autoinstallation distribution, and an autoinstallation profile.
18+
The distribution must be based on openSUSE Leap{nbsp}{opensuse-version}.
19+
20+
.Procedure: Preparing Installation Media
21+
. On the {productname} Server, create a local directory for the openSUSE Leap{nbsp}{opensuse-version} installation media:
22+
+
23+
----
24+
mkdir -p /srv/images/opensuse152
25+
----
26+
. Download an ISO image with the installation sources, and mount the ISO image on your server:
27+
+
28+
----
29+
mount -o loop DVD1.iso /mnt/
30+
----
31+
. Copy everything from the mounted ISO to your local file system:
32+
+
33+
----
34+
cp -r /mnt/* /srv/images/opensuse152
35+
----
36+
. When the copy is complete, unmount the ISO image:
37+
+
38+
----
39+
umount /mnt
40+
----
41+
42+
43+
.Procedure: Adding Software Channels at the Command Prompt
44+
. At the command prompt on the {productname} Server, as root, use the [command]``spacewalk-common-channels`` command to add the appropriate channels:
45+
+
46+
----
47+
spacewalk-common-channels opensuse_leap15_2 \
48+
opensuse_leap15_2-non-oss \
49+
opensuse_leap15_2-non-oss-updates \
50+
opensuse_leap15_2-updates \
51+
opensuse_leap15_2-uyuni-client \
52+
uyuni-proxy-stable-leap-152
53+
----
54+
. Fully synchronize all channels with [command]``spacewalk-repo-sync``.
55+
56+
////
57+
Add 15.2 channels to the server with spacewalk-common-channels, sync Leap 15.2 channels, change the proxy to use 15.2 channels instead of 15.1 channels, apply the change then update everything" should work
58+
////
59+
60+
61+
62+
.Procedure: Creating an Autoinstallation Distribution
63+
. In the {productname} {webui}, navigate to menu:Systems[Autoinstallation > Distributions] and click btn:[Create Distribution].
64+
. In the [guimenu]``Create Autoinstallable Distribution`` section, use these parameters:
65+
* In the [guimenu]``Distribution Label`` section, type a unique name for the distribution.
66+
Use only letters, numbers, hyphens, periods, and underscores, and ensure the name is longer than four characters.
67+
For example, ``proxy_152-x86_64``.
68+
* In the [guimenu]``Tree Path`` field, type an absolute path to the installation source.
69+
For example, [path]``/srv/images/opensuse152``.
70+
* In the [guimenu]``Base Channel`` field, select [systemitem]``openSUSE Leap 15.2 (x86_64)``.
71+
* In the [guimenu]``Installer Generation`` field, select [systemitem]``SUSE Linux``.
72+
* In the [guimenu]``Kernel Options`` field, type any options to be passed to the kernel when booting for the installation.
73+
The [option]``install=`` parameter and the [option]``self_update=0 pt.options=self_update`` parameter are added by default.
74+
* In the [guimenu]``Post Kernel Options`` section, type any options to be passed to the kernel when booting the installed system for the first time.
75+
. Click btn:[Create Autoinstallable Distribution] to save.
76+
77+
78+
When you have created an autoinstallable distribution, you can edit it by navigating to menu:Systems[Autoinstallation > Distributions] and selecting the distribution you want to edit.
79+
80+
81+
82+
== Create an Autoinstallation Profile
83+
84+
Autoinstallation profiles contain all the installation and configuration data needed to install a system.
85+
They can also contain scripts to be executed after the installation is complete.
86+
For example scripts that you can use as a starting point, see https://github.com/SUSE/manager-build-profiles/tree/master/AutoYaST.
87+
88+
89+
90+
.Procedure: Creating an Autoinstallation Profile
91+
. In the {productname} {webui}, navigate to menu:Systems[Autoinstallation > Profiles] and upload your autoinstallation profile script.
92+
For example scripts that you can use as a starting point, see https://github.com/SUSE/manager-build-profiles/tree/master/AutoYaST.
93+
. In the ``Kernel Options`` field, type ``autoupgrade=1``.
94+
Optionally, you can also include the ``Y2DEBUG=1`` option.
95+
The debug setting is not required but can help with investigating any future problems you might encounter.
96+
. Paste the autoinstallation profile or use the file upload field.
97+
. Click btn:[Create] to save.
98+
. When the uploaded profile requires variables to be set, navigate to menu:Systems[Autoinstallation > Profiles], select the profile to edit, and navigate to the [guimenu]``Variables`` tab.
99+
Specify the required variables, using this format:
100+
+
101+
----
102+
<key>=<value>
103+
----
104+
105+
[NOTE]
106+
====
107+
For proxies that were registered using Salt, use the ``spacewalk/minion_script`` snippet to register the proxy again after upgrade has completed.
108+
====
109+
110+
111+
112+
== Upgrade
113+
114+
Before you begin, check that all the channels referenced in the autoinstallation profile are available and fully synchronized.
115+
116+
117+
118+
.Procedure: Upgrading
119+
. On the {productname} Server {webui}, navigate to menu:Systems[System List], select the proxy, navigate to the [guimenu]``Provisioning`` tab, and select the autoinstallation profile you uploaded.
120+
. Click btn:[Schedule Autoinstallation and Finish].
121+
The system will download the required files, change the bootloader entries, reboot, and start the upgrade.
122+
123+
124+
125+
== Clean Up
126+
127+
When the {productname} Proxy has finished upgrading, it shows the originally assigned channels.
128+
Cleaning up after the migration ensures the correct channels are shown.
129+
130+
131+
[WARNING]
132+
====
133+
If the server reports that there are updates available for the proxy, do not apply them before completing the cleanup.
134+
====
135+
136+
137+
138+
.Procedure: Cleaning Up
139+
. On the {productname} Server {webui}, navigate to the [guimenu]``System List``, select the proxy, and navigate to the menu:Software[Software Channels] subtab.
140+
. Clear the old channels.
141+
. In the [guimenu]``Base Channel`` field, select `openSUSE Leap 15.1 (x86_64)``.
142+
. In the [guimenu]``Child Channels`` field, select all the recommended channels.

modules/upgrade/pages/proxy-intro.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
= Upgrade the Proxy
33

44
{productname} Proxies are managed in the same way as clients.
5+
ifeval::[{suma-content} == true]
56
Maintenance updates (MU) can be installed on a {productname} Proxy in the same way as other clients.
67
MU updates require a restart of the proxy service.
8+
endif::[]
79

810
Before you perform any proxy update, schedule a maintenance window.
911
The clients registered to {productname} through the proxy will not be able to connect to {productname} while the update is in progress.
1012
For more information about maintenance windows, see xref:administration:maintenance-window.adoc[].
1113

12-
14+
ifeval::[{suma-content} == true]
1315
{productname} uses an [literal]``X.Y.Z`` versioning schema.
1416
To determine which upgrade procedure you need, look at which part of the version number is changing.
1517

@@ -30,3 +32,4 @@ Upgrading within the same minor version.
3032
This is often referred to as a maintenance update.
3133
For example, upgrading from 4.0.0 to 4.0.2.
3234
See xref:upgrade:proxy-y-z.adoc[].
35+
endif::[]
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
[[proxy-uyuni-upgrade]]
2+
= Proxy - Upgrade Procedure
3+
4+
Before you perform any proxy update, schedule a maintenance window.
5+
The clients registered to {productname} through the proxy will not be able to connect to {productname} while the update is in progress.
6+
For more information about maintenance windows, see xref:administration:maintenance-window.adoc[].
7+
8+
9+
10+
== Preparation
11+
12+
As a preparation step, add the openSUSE Leap {opensuse-version} channels to the server.
13+
14+
.Procedure: Adding Software Channels at the Command Prompt
15+
. At the command prompt on the {productname} Server, as root, use the [command]``spacewalk-common-channels`` command to add the appropriate channels:
16+
+
17+
----
18+
spacewalk-common-channels opensuse_leap15_2 \
19+
opensuse_leap15_2-non-oss \
20+
opensuse_leap15_2-non-oss-updates \
21+
opensuse_leap15_2-updates \
22+
opensuse_leap15_2-uyuni-client \
23+
uyuni-proxy-stable-leap-152
24+
----
25+
. Fully synchronize all channels with [command]``spacewalk-repo-sync``.
26+
In case of already defined repository URLs, continue with <<uyuni-202007-channeldupes>>.
27+
28+
29+
30+
[[uyuni-202007-channeldupes]]
31+
== Uyuni 2020.07: Troubleshooting with Duplicated Repository URLs
32+
33+
// https://github.com/SUSE/spacewalk/issues/12008
34+
35+
If you want to add two or more repositories with the same URL (client tools for openSUSE Leap 15.0, 15.1, and 15.2) in {productname} 2020.07 with [command]``spacewalk-common-channels``, you will see an error such as:
36+
37+
----
38+
ERROR: opensuse_leap15_2-uyuni-client-x86_64:
39+
redstone.xmlrpc.XmlRpcFault: There's already a defined repository with given url, please reuse it
40+
----
41+
42+
Work around with assigning the 15.1 repository to the 15.2 channel:
43+
44+
.Procedure: Assigning 15.1 Repositories to the 15.2 Channel:
45+
46+
. In the {productname} Server {webui}, navigate to menu:Software[Manage > Channels] and click the [systemitem]`` Uyuni Client Tools for openSUSE Leap 15.2 (x86_64)`` channel name.
47+
48+
. In the upper right corner, click btn:[Manage Channel].
49+
50+
. Click the [guimenu]``Repositories`` tab, and select [systemitem]``External - Uyuni Client Tools for openSUSE Leap 15.1 (x86_64)``
51+
52+
. Click btn:[Update Repositories].
53+
54+
. Navigate to menu:Repositories[Sync] subtab, and click btn:[Sync Now].
55+
56+
. Do the same with [systemitem]``Uyuni Proxy Stable for openSUSE Leap 15.2 (x86_64)`` and [systemitem]``External - Uyuni Proxy Stable for openSUSE Leap 15.1 (x86_64)``.
57+
58+
If you unfold the [systemitem]``openSUSE Leap 15.2 (x86_64)``, you will see all child channels propulated with packages.
59+
60+
61+
62+
== Upgrade the Proxy
63+
64+
To upgrade a proxy you first stop the proxy service, then you replace the software repositories and update the software, and finally you restart the proxy service.
65+
66+
67+
68+
.Procedure: Updating the {productname} Proxy
69+
70+
. In the {productname} Server {webui}, navigate to proxy system's details page, click the [guimenu]``Reactivation`` subtab.
71+
72+
. Click btn:[Generate New Key] to generate a reactivation key.
73+
+
74+
////
75+
With a system profile specific activation key, this system can be re-registered using the 'rhnreg_ks' command-line utility. The system will be re-registered with the same id, history, groups, and channels (unless the system's base channel changes).
76+
Key: re-1-1008b9843d44dac77f0a856f207cc2c6
77+
////
78+
79+
. On the {productname} Proxy, stop the proxy service:
80+
+
81+
----
82+
spacewalk-proxy stop
83+
----
84+
85+
. In the {productname} Server {webui}, navigate to menu:Systems[Proxy] and click the name of the proxy.
86+
. Click menu:Software[Software Channels], and as the base channel select the openSUSE Leap {opensuse-version} channel that is listed in the [systemitem]``Customs Channels`` list.
87+
. In the [guimenu]``Child Channels`` pane, select the {opensuse-version} child channels.
88+
. Click btn:[Next], and [guimenu]``Confirm Software Channel Change`` with btn:[Confirm].
89+
. Click menu:Software[Packages > Upgrade], and select all the packages to be updated on the proxy, and then apply the selection.
90+
. Re-register with the reactivation key using the [command]``rhnreg_ks`` command-line utility.
91+
The system will be re-registered with the same id, history, and groups.
92+
+
93+
// and channels (unless the system's base channel changes).
94+
. On the {productname} Proxy, start the proxy service:
95+
+
96+
----
97+
spacewalk-proxy start
98+
----
99+
100+
If you need to update many proxies, you can create an action chain of this command sequence on the {productname} Server.
101+
You can use the action chain to perform updates on multiple proxies at the same time.

0 commit comments

Comments
 (0)