SUSE Manager/Migration of SUSE Manager Proxies from 3.2 to 4

From MicroFocusInternationalWiki
Jump to: navigation, search

SUSE Manager Main Page

The recommended order for migrations is to first migrate the SUSE Manager server and then the proxies. Note: A SUSE Manager proxy 3.2 cooperates just fine with a new SUSE Manager 4. After the server has been migrated to version 4, proxies can be autoupgraded from the SUSE Manager server via means of YaST autoinstallation.

NOTE: Right now, this only works for proxies that have been registered as traditional clients. Proxies that are salt minions cannot be migrated to the new version this way.

Upgrading SUSE Manager Proxy In-place

First you need to create an autoinstallable distribution based on SLES 15 SP1 because SUSE Manager Proxy 4 is based on this version. Refer to the SUSE Manager documentation on how to create an autoinstallable distribution.

Please note: Because SUSE Manager Proxy 4 is a base product, make sure to choose SLE-Product-SUSE-Manager-Proxy-4.0-Pool for x86_64 as base channel!

After that you need to create an autoinstallation profile. In this example the label "proxy4" is being used both for the autoinstallable distribution as well as for the autoinstall profile. Use the following autoinstallation as template and create the autoinstallation profile by uploading the edited file:

<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
  <add-on>
    <add_on_products config:type="list">
      <listentry>
        <ask_on_error config:type="boolean">true</ask_on_error>
        <media_url>http://$redhat_management_server/ks/dist/child/sle-product-suse-manager-proxy-4.0-updates-x86_64/proxy4</media_url>
        <name>sle-product-suse-manager-proxy-4.0-updates-x86_64</name>
        <product>SUSE Manager Proxy 4.0</product>
        <product_dir>/</product_dir>
      </listentry>
      <listentry>
        <ask_on_error config:type="boolean">true</ask_on_error>
        <media_url>http://$redhat_management_server/ks/dist/child/sle-module-basesystem15-sp1-pool-x86_64-proxy-4.0/proxy4</media_url>
        <name>sle-module-basesystem15-sp1-pool-x86_64-proxy-4.0</name>
        <product>SUSE Manager Proxy 4.0</product>
        <product_dir>/</product_dir>
      </listentry>
      <listentry>
        <ask_on_error config:type="boolean">true</ask_on_error>
        <media_url>http://$redhat_management_server/ks/dist/child/sle-module-basesystem15-sp1-updates-x86_64-proxy-4.0/proxy4</media_url>
        <name>sle-module-basesystem15-sp1-updates-x86_64-proxy-4.0</name>
        <product>SUSE Manager Proxy 4.0</product>
        <product_dir>/</product_dir>
      </listentry>
      <listentry>
        <ask_on_error config:type="boolean">true</ask_on_error>
        <media_url>http://$redhat_management_server/ks/dist/child/sle-module-server-applications15-sp1-pool-x86_64-proxy-4.0/proxy4</media_url>
        <name>sle-module-server-applications15-sp1-pool-x86_64-proxy-4.0</name>
        <product>SUSE Manager Proxy 4.0</product>
        <product_dir>/</product_dir>
      </listentry>
      <listentry>
        <ask_on_error config:type="boolean">true</ask_on_error>
        <media_url>http://$redhat_management_server/ks/dist/child/sle-module-server-applications15-sp1-updates-x86_64-proxy-4.0/proxy4</media_url>
        <name>sle-module-server-applications15-sp1-updates-x86_64-proxy-4.0</name>
        <product>SUSE Manager Proxy 4.0</product>
        <product_dir>/</product_dir>
      </listentry>
      <listentry>
        <ask_on_error config:type="boolean">true</ask_on_error>
        <media_url>http://$redhat_management_server/ks/dist/child/sle-module-suse-manager-proxy-4.0-pool-x86_64/proxy4</media_url>
        <name>sle-module-suse-manager-proxy-4.0-pool-x86_64</name>
        <product>SUSE Manager Proxy 4.0</product>
        <product_dir>/</product_dir>
      </listentry>
      <listentry>
        <ask_on_error config:type="boolean">true</ask_on_error>
        <media_url>http://$redhat_management_server/ks/dist/child/sle-module-suse-manager-proxy-4.0-updates-x86_64/proxy4</media_url>
        <name>sle-module-suse-manager-proxy-4.0-updates-x86_64</name>
        <product>SUSE Manager Proxy 4.0</product>
        <product_dir>/</product_dir>
      </listentry>
     </add_on_products>
  </add-on>
  <general>
      $SNIPPET('spacewalk/sles_no_signature_checks')
    <mode><confirm config:type="boolean">false</confirm></mode>
  </general>
  <upgrade>
    <only_installed_packages config:type="boolean">false</only_installed_packages>
    <stop_on_solver_conflict config:type="boolean">true</stop_on_solver_conflict>
  </upgrade>
  <backup>
    <sysconfig config:type="boolean">true</sysconfig>
    <modified config:type="boolean">true</modified>
    <remove_old config:type="boolean">false</remove_old>
  </backup>
  <networking>
    <keep_install_network config:type="boolean">true</keep_install_network>
    <start_immediately config:type="boolean">true</start_immediately>
  </networking>
  <software>
    <image/>
    <install_recommended config:type="boolean">true</install_recommended>
    <instsource/>
    <patterns config:type="list">
      <pattern>suma_proxy</pattern>
    </patterns>
    <products config:type="list">
      <listentry>SUSE-Manager-Proxy</listentry>
    </products>
  </software>
  <scripts>
    <chroot-scripts config:type="list">
      <script>
        <filename>cleanup.sh</filename>
        <chrooted config:type="boolean">true</chrooted>
        <interpreter>shell</interpreter>
        <source>
        <![CDATA[
#!/bin/sh
         sysconf_addword /etc/sysconfig/apache2 APACHE_MODULES wsgi
         if [ -e /etc/rhn/rhn.conf.rpmsave ]; then
             cp /etc/rhn/rhn.conf.rpmsave /etc/rhn/rhn.conf
         fi
         zypper rr --all
         ]]>
        </source>
      </script>
    </chroot-scripts>
  </scripts>
</profile>

Make sure all the channels referenced in this file are available and fully synced. Replace the label "proxy4" by the one you chose for your autoinstallation distribution.

In "Kernel Options" enter the following value:

autoupgrade=1 Y2DEBUG=1

The debug setting is not required but can help investigating problems in case something goes wrong. The "autoupgrade" parameter however is vital!

Now select the proxy from the system list in SUSE Manager, click on Provisioning and select the profile just created. Then click on start autoinstallation. The system will download the needed files, change the bootloader entries, reboot and will start the automatic upgrade.

Cleanup

After the proxy has completed the automatic upgrade process, it still will have the old channels from SUSE Manager assigned. So in case updates are reported for the proxy, do not apply them, but select the proxy from the system list, click on change channel assignment and deselect the old channels and assign the new ones that have also been used for the upgrade itself.

Now all clients behind the previous SUSE Manager Proxy can access the SUSE Manager Server again and the proxy itself can be managed by SUSE Manager server like before.