7
Unattended Upgrade Feature in SUSE ® Linux Enterprise Server Use the Unattended Upgrade feature to automatically upgrade from version 11 to 12. SUSE has supported major version upgrades for more than 10 years, across all architectures. Solution Guide Guide www.suse.com Server

Unattended Upgrade Feature in SUSE Linux …...Unattended Upgrade Feature in SUSE ® Linux Enterprise Server Use the Unattended Upgrade feature to automatically upgrade from version

  • Upload
    others

  • View
    34

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Unattended Upgrade Feature in SUSE Linux …...Unattended Upgrade Feature in SUSE ® Linux Enterprise Server Use the Unattended Upgrade feature to automatically upgrade from version

Unattended Upgrade Feature in SUSE® Linux Enterprise ServerUse the Unattended Upgrade feature to automatically upgrade from version 11 to 12. SUSE has supported major version upgrades for more than 10 years, across all architectures.

Solution Guide

Guidewww.suse.com

Server

Page 2: Unattended Upgrade Feature in SUSE Linux …...Unattended Upgrade Feature in SUSE ® Linux Enterprise Server Use the Unattended Upgrade feature to automatically upgrade from version

2

Server Solution GuideUnattended Upgrade Feature in SUSE Linux Enterprise Server

Depending on the operating system you are using, different tools are available to help you patch, update and even upgrade your operating system versions. SUSE provides the capability to help system administrators to upgrade operating system versions, e.g., from SUSE® Linux Enterprise Server 11 to SUSE Linux Enterprise Server 12, through innovative open source technologies like ZYpp.

SUSE Linux Enterprise Server also comes with innovative capa-bilities that deliver added convenience to IT professionals who administer large server farms. One such feature is Unattended Upgrade, which allows groups of servers to be automatically upgraded, in addition to manually upgrading individual servers. Using Unattended Upgrade, system administrators can quickly and easily upgrade their SUSE Linux Enterprise server operating systems, reducing downtime, lowering administrative costs and improving quality.

The decision to upgrade automatically or manually, in an un-attended or attended fashion, depends on several factors. Enterprises with many servers, good server configuration man-agement control and staff who are comfortable using automated procedures will find the Unattended Upgrade feature in SUSE Linux Enterprise Server useful.

Using the Unattended Upgrade feature in SUSE Linux Enterprise Server is easy. The following guide describes four easy steps for automatically upgrading servers from SUSE Linux Enterprise 11 Service Pack 3 to SUSE Linux Enterprise Server12. Several of the steps involve preparing a suitable AutoYaST profile. AutoYaST will be used to execute the upgrade process.

IntroductionOne way to ensure that you are getting the most from your IT resources is to keep your infrastructure software maintained and up to date. Just like proper maintenance is required to keep your automobile running at peak performance, your operating system software needs to be patched and updated at periodic intervals to ensure maximum security, performance and reliability.

Page 3: Unattended Upgrade Feature in SUSE Linux …...Unattended Upgrade Feature in SUSE ® Linux Enterprise Server Use the Unattended Upgrade feature to automatically upgrade from version

3www.suse.com

1.  GRUB Menu Section for Booting into the Upgrade One way to boot the system is to create an additional section in the GRUB menu (similar for all architectures), which starts the installation. The following example assumes that there is a separate /boot partition, which is referred to in GRUB as (hd0,0): 

title Upgrade root (hd0,0) kernel /upgrade/vmlinuz install=<inst_source_url> initrd /upgrade/initrdautoupgrade=1

The above example assumes that the installation kernel and the initrd are located in the /boot/upgrade directory.

2. Preparing the AutoYaST ProfileThe AutoYaST profile for the automated upgrade uses the same file format as the AutoYaST installation. For more information about AutoYaST, see the Deployment Guide and the external AutoYaST documentation at: www.suse.com/documentation/sles11/book_sle_deployment/data/book_sle_deployment.html

For obvious reasons, there are some parts of the system (e.g., partitioning) that it does not make sense to configure during the upgrade. In other cases, it is useful to set upgrade-specific options by means of the AutoYaST profile.  

2.1 UpgradeThe upgrade options define the behavior of the dependency solver during the upgrade process: 

<upgrade> <only_installed_packages config:type=“boolean”>false </only_installed_packages> <stop_on_solver_conflict config:type=“boolean”>true </stop_on_solver_conflict></upgrade>

only_installed_packages: Set to true for package-based up-grades (recommended for upgrading to the next service pack of the same product) or false for pattern-based upgrades (rec-ommended for an upgrade between versions of a product, for example, from SUSE Linux Enterprise Server 11 to 12).

stop_on_solver_conflict: Defines whether to show the pro-posal in case of failure to resolve package dependencies interac-tively. It is recommended that this be set to true, but this could result in an interactive process, during which the user must in-tervene to resolve conflicts manually. 

When to Use the Unattended Upgrade Feature

Environment Use Interactive Manual Upgrade Use Unattended Automatic Upgrade

Over 20 servers — X

Less than 20 servers X —

Fewer standard server configurations — X

Many different server configurations X —

Using automated processes today — X

Not using automated processes X —

Page 4: Unattended Upgrade Feature in SUSE Linux …...Unattended Upgrade Feature in SUSE ® Linux Enterprise Server Use the Unattended Upgrade feature to automatically upgrade from version

4

Server Solution GuideUnattended Upgrade Feature in SUSE Linux Enterprise Server

2.2 Software SelectionThe software selection options define which components to se-lect or exclude in addition to the results of the resolver: 

<software> <packages config:type=“list”> <package>autoyast2-installation </package> <package>apparmor-profile-editor </package> </packages> <patterns config:type=“list”> <pattern>base</pattern> </patterns> <remove-packages config:type= “list”/> <remove-patterns config:type= “list”/></software>

It is especially important to set packages or patterns for being se-lected or excluded in order to resolve package conflicts and thus avoid the need for interactive intervention. Once the upgrade is done, the newly created autoupg_updated.xml file contains these packages and patterns plus those that were selected or deselected for any other reason.

2.3 Backup before UpgradeThe backup before upgrade options match these features in the upgrade proposal. 

<backup> <sysconfig config:type=“boolean”> true</sysconfig> <modified config:type=“boolean”> true</modified> <remove_old config:type=“boolean”> false</remove_old></backup>

sysconfig: defines whether to back up sysconfig before upgrading

modified: defines whether to back up the modified configuration files before upgrading

remove_old: defines whether to remove old backups from pre-vious upgrades 

2.4 NetworkingTo ensure that your network configuration is preserved dur-ing upgrade, the following needs to be added to the AutoYaST profile: 

<networking> <keep_install_network config:type=“boolean”>true</keep_install_network> <start_immediately config:type=“boolean”>true</start_immediately></networking>

If your system contains an add-on which also needs to be up-graded, always include the add-on information as in this example. After the upgrade, your system will need to be registered in or-der to activate your update repositories. See an example of the registra tion in autoupg.xml.

3. Running the Automated UpgradeTo start the automated upgrade, you must boot the installation media and pass the AutoYaST profile to it. There are two ways to pass the profile to the system:

Pass the profile to the kernel command line the same way as for the AutoYaST installation. (Use the autoyast=url parameter. For System z, this is the only option.)

Before you start the upgrade, copy the profile to /root/autoupg.xml. Then there is no need for any additional kernel parameter.

The latter approach allows you to have a single installation kernel command line for different machines. Simply copy the appropri-ate profile into its file system.

As long as you have only one SUSE Linux Enterprise Server in-stance installed on your machine, there are no package conflicts, and you did not set the profile to stop during the upgrade. The complete process will be automated and non-interactive. In the event you chose to manually interact during the upgrade pro-cess, you will be able to modify settings for the upgrade.

Page 5: Unattended Upgrade Feature in SUSE Linux …...Unattended Upgrade Feature in SUSE ® Linux Enterprise Server Use the Unattended Upgrade feature to automatically upgrade from version

5www.suse.com

After the upgrade finishes, YaST® will write the /root/autoupg- updated.xml file, which contains the profile with applied soft-ware selection changes done during the setup. This file is espe-cially useful if you want to perform upgrades of machines with the same package selections. In this way, conflict resolutions from one machine can easily be applied on other machines, which, consequently, will get these conflicts resolved automati-cally, and the upgrade itself will be non-interactive.

If there are more than one SUSE Linux Enterprise Server systems installed on a single machine, you will always be asked which one to upgrade. There is no way to select it in advance.

4. Final Configuration ChangesBy default, this automated upgrade does not perform configura-tion changes during the second stage of the upgrade process. The only exception to this is the network configuration, which needs to be set in order to be preserved in the AutoYaST up-grade profile.

If configuration adjustments of some system areas are needed after the upgrade (e.g., configuring a new service), add the rel-evant sections to the AutoYaST profile for the upgrade, and the configuration of the selected system areas will be saved during the upgrade.

WARNING: AutoYaST supplied configuration replaces existing configurations.

Please remember that existing configuration settings of a sys-tem area will be replaced and thus removed by the AutoYaST configuration.

Normally, the only configuration adjustment that should be pres-ent in the AutoYaST profile is included with the registration of the system through the Subscription Management Tool (SMT) or SUSE Customer Center (SCC). If this is missing, the system will not get access to update repositories, and updates will not be possible—unless configured later again.

5. Limitations and Hints

5.1 NetworkManager and RegistrationWhen you use NetworkManager for managing network devices and network connections, network connections will not be avail-able during final configuration changes after the upgrade has taken place. This prevents the system from performing a dupli-cate registration.

5.2 Cleaning Up Upgrade SettingsIf you make any changes in your system in order to trigger the upgrade process (e.g., adding a new section to the bootloader menu), you’ll probably want to remove it after the upgrade is done. 

You can do this automatically with a post-installation script. You can find examples in the  AutoYaST documentation at: www.suse.com/documentation/sles11/book_sle_deployment/data/book_sle_deployment.html. A sample script that cleans up GRUB’s menu.lst is included in the autoupg.xml file. Make sure that the script matches your particular setup and that it does not remove more than you actually want! 

For more information, consult Linuxrc Documentation: http://en.opensuse.org/SDB:Linuxrc

Page 6: Unattended Upgrade Feature in SUSE Linux …...Unattended Upgrade Feature in SUSE ® Linux Enterprise Server Use the Unattended Upgrade feature to automatically upgrade from version

6

Server Solution GuideUnattended Upgrade Feature in SUSE Linux Enterprise Server

6. ConclusionCommercial Linux server operating systems continue to add features and extend their enterprise capabilities. SUSE Linux Enterprise Server comes with innovative capabilities that de-liver added convenience to IT professionals—like Unattended Upgrade. Using Unattended Upgrade, system administrators can quickly and easily upgrade their Linux server operating systems, reducing downtime, lowering administrative costs and improving quality, especially when upgrading large numbers of identical systems.

We invite you to explore this Unattended Upgrade feature in SUSE Linux Enterprise Server.

To get a free 60 day trial, please visit: www.suse.com/products/server/download/

For more information about SUSE Linux Enterprise Server, please visit: www.suse.com/products/server/

Page 7: Unattended Upgrade Feature in SUSE Linux …...Unattended Upgrade Feature in SUSE ® Linux Enterprise Server Use the Unattended Upgrade feature to automatically upgrade from version

www.suse.com

Contact your local SUSE Solutions Provider, or call SUSE at:

1 800 796 3700 U.S./Canada1 801 861 4500 Worldwide

SUSEMaxfeldstrasse 590409 NurembergGermany

264-000011-001 | 12/14 | © 2014 SUSE LLC. All rights reserved. SUSE, the SUSE logo and YaST are registered trademarks of SUSE LLC in the

United States and other countries. All third-party trademarks are the property of their respective owners.