SUSE Manager 3

How to Deploy SUSE Linux Enterprise Products with SUSE Manager on IBM PowerVM

The document at hand provides an overview of how to deploy SUSE Linux Enterprise products with SUSE Manager on IBM Power Systems. SUSE Manager enables you to manage and maintain your enterprise Linux system deployments across physical, virtual and cloud environments via one centralized tool. Described is a base deployment of SUSE Manager 3.1 on IBM PowerVM LPARs, including Autoinstallation, AutoYaST and Netboot Integration.

Author: Olivier Van Rompuy, Senior System Engineer and Technical Consultant, IRIS
Publication Date: August 14, 2018

1 Installing SUSE Manager on IBM Power Systems

First, you need to perform several actions related to the IBM PowerVM architecture (refer also to the IBM documentation at https://www.ibm.com/support/knowledgecenter/ ):

  1. Create a new Logical Partition (LPAR) for SUSE Manager on an IBM Power System with POWER8 or higher processors.

  2. Configure the infrastructure for this LPAR: LAN, SAN, storage LUNs, zoning, etc..

  3. Create a virtual DVD drive for this LPAR on one of the VIO servers (learn more about VIO servers here: https://www.ibm.com/support/knowledgecenter/en/POWER8/p8hb1/p8hb1_vios_virtualioserveroverview.htm).

  4. Add the SUSE Linux Enterprise Server 12 ISO files to the virtual optical device (DVD) repository on this VIO server.

  5. Using the command cfgassist on the VIO server loads the first DVD in the virtual drive.

  6. Activate the LPAR, enter the System Management Services (SMS) menu and choose to boot from the DVD.

When the YaST installation tool from SUSE Linux Enterprise Server appears, subscribe with the correct SUSE Customer Center (SCC) registration code (SUSE Linux Enterprise Server for IBM POWER). Collect your registration codes from the SCC portal site at https://scc.suse.com.

Now choose to add the SUSE Manger Server extension as shown on the screen below, and enter Next:

YaST Installation - Extensions and Module Selection
Figure 1: YaST Installation - Extensions and Module Selection

Accept the SUSE End User License Agreement (EULA) and enter Next:

YaST Installation - SUSE End User License Agreement
Figure 2: YaST Installation - SUSE End User License Agreement

Provide the correct registration code delivered with your SUSE Manager subscription, and enter Next:

YaST Installation - SUSE Manager Registration Code
Figure 3: YaST Installation - SUSE Manager Registration Code

No additional Add-On Product needs to be installed. Skip this screen and enter Next:

YaST Installation - Add-On Product
Figure 4: YaST Installation - Add-On Product

The next screen provides the partitioning options:

YaST Installation - Partitioning Options
Figure 5: YaST Installation - Partitioning Options

Select Expert Partitioner:

YaST Installation - Expert Partitioner
Figure 6: YaST Installation - Expert Partitioner

Execute Rescan Devices to clear the auto-suggested partitioning:

YaST Installation - Rescan Devices
Figure 7: YaST Installation - Rescan Devices

In the particular scenario at hand, a reinstallation has been performed. In this case, follow the steps below. If partitioning and/or LVM settings are already present, choose to import these settings into the installer, and select Import Mount Points:

YaST Installation - Import Moint Points
Figure 8: YaST Installation - Import Moint Points
Note
Note: Fresh Installation

If you perform an installation from scratch, configure your partitions and LVM settings following the recommendations below:

Minimum 100 GB for root / partition
Minimum 50 GB for /var/lib/pgsql
Minimum 50 GB per SUSE product and 100 GB per Red Hat product for /var/spacewalk

When you are finished, continue with the partitioning step, and enter Next:

YaST Installation - Suggested Partitioning
Figure 9: YaST Installation - Suggested Partitioning

Provide the correct time zone settings, and confirm them with Next:

YaST Installation - Clock and Time Zone
Figure 10: YaST Installation - Clock and Time Zone

At this stage you can choose to skip the creation of an initial user. Enter Next:

YaST Installation - Local User
Figure 11: YaST Installation - Local User

Verify the settings overview and make further changes or customizations where needed. Start the installation with Install:

YaST Installation - Installation Settings
Figure 12: YaST Installation - Installation Settings

After the installation is finished, verify whether all aspects of the operating system have been installed correctly.

2 SUSE Manager Setup

Important
Important: DNS

After the installation make sure you configure your hosts DNS settings and add an entry to DNS. This ensures that the host name can be correctly resolved.

Open an SSH session to the new SUSE Manager host and start YaST:

# yast2 susemanager_setup

Choose to configure SUSE Manager from scratch:

YaST Installation - Setting up SUSE Manager
Figure 13: YaST Installation - Setting up SUSE Manager

Enter a correct administrator e-mail address:

YaST Installation - E-mail Address
Figure 14: YaST Installation - E-mail Address

Provide details for the certificate generation:

YaST Installation - Certificate Generation
Figure 15: YaST Installation - Certificate Generation

Provide database authentication settings:

YaST Installation - Database Settings
Figure 16: YaST Installation - Database Settings

Provide your SUSE Manager SCC organization user name and password:

YaST Installation - SCC Settings
Figure 17: YaST Installation - SCC Settings

Perform an authentication test toward the SUSE Customer Center:

YaST Installation - Test Details
Figure 18: YaST Installation - Test Details

Confirm to run the setup process with Yes:

YaST Installation - Setup Process Confirmation
Figure 19: YaST Installation - Setup Process Confirmation

Now the setup process is started:

YaST Installation - Write Settings
Figure 20: YaST Installation - Write Settings

Wait until the setup process is completed. Then enter Finish:

YaST Installation - Setup Completed
Figure 21: YaST Installation - Setup Completed

Verify that you can access the new SUSE Manager URL using a browser.

Important
Important:

At time of writing this document, in SUSE Linux Enterprise Server 12 SP3 a minor workaround needs to be applied to the Apache configuration file to use spacewalk:

Add the following file with the following line of content:

# vi /etc/apache2/conf.d/zipp-fix.conf
HttpProtocolOptions Unsafe

Restart Apache to activate the change:

# systemctl restart apache2.service

3 Create and Configure the Organization

After the SUSE Manager setup is finished, you must create your organization on the SUSE Manager Web user interface.

Provide all the requested details including an initial administrator user and password:

SUSE Manager Web UI - Create Organization
Figure 22: SUSE Manager Web UI - Create Organization

Confirm with Create Organization. The following message appears on the screen:

SUSE Manager Web UI - Organization Created Successfully
Figure 23: SUSE Manager Web UI - Organization Created Successfully

Navigate to the Setup Wizard in the left pane:

SUSE Manager Web UI - Setup Wizard
Figure 24: SUSE Manager Web UI - Setup Wizard

Select the Organization Credentials tab:

SUSE Manager Web UI - Organization Credentials
Figure 25: SUSE Manager Web UI - Organization Credentials

Click Add a new credential:

SUSE Manager Web UI - Add Credential
Figure 26: SUSE Manager Web UI - Add Credential

Enter your correct organization credentials from the SCC portal and save them:

SUSE Manager Web UI - Edit Credentials
Figure 27: SUSE Manager Web UI - Edit Credentials

Now navigate to the SUSE Products tab and select the SUSE products you need. In this example, SUSE Linux Enterprise Server for SAP Applications 12 SP3 has been selected:

SUSE Manager Web UI - SUSE Products
Figure 28: SUSE Manager Web UI - SUSE Products

Do not forget to also check the sub-channels you need for each product:

SUSE Manager Web UI - Sub-Channels
Figure 29: SUSE Manager Web UI - Sub-Channels

When your selection is done, confirm it with Add products:

SUSE Manager Web UI - Add Products
Figure 30: SUSE Manager Web UI - Add Products

Navigate to Manager Configuration in the left pane, and select Bare-metal systems as indicated below:

SUSE Manager Web UI - Bare-metal Systems
Figure 31: SUSE Manager Web UI - Bare-metal Systems

Now enable Bare-metal systems; click the green box Enable adding to this organization:

SUSE Manager Web UI - Enable Bare-metal Systems
Figure 32: SUSE Manager Web UI - Enable Bare-metal Systems

4 Create the Software Channel Hierarchy

The following section describes how to create the software channel hierarchy.

Log on as root using SSH. Install the spacewalk-utils package with the following command:

# zypper install spacewalk-utils

Check whether the available channels correspond with selections made before:

# spacewalk-manage-channel-lifecycle  --list-channels
Spacewalk Username: admin
Spacewalk Password:
Channel tree:

 1. sle12-sp2-sap-pool-ppc64le
      \__ ibm-dlpar-utils-sap-sp2
      \__ sle-12-sp2-sap-updates-ppc64le
      \__ sle-ha12-sp2-pool-ppc64le-sap-sp2
      \__ sle-ha12-sp2-updates-ppc64le-sap-sp2
      \__ sle-manager-tools12-pool-ppc64le-sap-sp2
      \__ sle-manager-tools12-updates-ppc64le-sap-sp2
      \__ sle-module-adv-systems-management12-pool-ppc64le-sap-sp2
      \__ sle-module-adv-systems-management12-updates-ppc64le-sap-sp2
      \__ sle-module-legacy12-pool-ppc64le-sap-sp2
      \__ sle-module-legacy12-updates-ppc64le-sap-sp2
      \__ sles12-sp2-pool-ppc64le-sap-sp2
      \__ sles12-sp2-updates-ppc64le-sap-sp2

 2. sle12-sp3-sap-pool-ppc64le
      \__ ibm-dlpar-utils-sap-sp3
      \__ sle-12-sp3-sap-updates-ppc64le
      \__ sle-ha12-sp3-pool-ppc64le-sap-sp3
      \__ sle-ha12-sp3-updates-ppc64le-sap-sp3
      \__ sle-manager-tools12-pool-ppc64le-sap-sp3
      \__ sle-manager-tools12-updates-ppc64le-sap-sp3
      \__ sle-module-adv-systems-management12-pool-ppc64le-sap-sp3
      \__ sle-module-adv-systems-management12-updates-ppc64le-sap-sp3
      \__ sle-module-legacy12-pool-ppc64le-sap-sp3
      \__ sle-module-legacy12-updates-ppc64le-sap-sp3
      \__ sles12-sp3-pool-ppc64le-sap-sp3
      \__ sles12-sp3-updates-ppc64le-sap-sp3

Synchronize the ibm-dlpar repository and import the GPG key.

# spacewalk-repo-sync --channel ibm-dlpar-utils-sap-sp2
14:38:14 ======================================
14:38:14 | Channel: ibm-dlpar-utils-sap-sp2
14:38:14 ======================================
14:38:14 Sync of channel started.
Do you want to import the GPG key 0x3E6E42BE "Linux on POWER (IBM Linux Technology Center) <poweryum@linux.vnet.ibm.com>" from http://public.dhe.ibm.com/software/server/POWER/Linux/yum/OSS/SLES/12/ppc64le//repodata/repomd.xml.key? [y/n]:
y
14:38:20 Repo URL: http://public.dhe.ibm.com/software/server/POWER/Linux/yum/OSS/SLES/12/ppc64le/
14:38:20 Packages in repo:                36
14:38:20 Packages already synced:          0
14:38:20 Packages to sync:                30
14:38:20 New packages to download:        30
14:38:20 Downloading 30 files.
14:38:22 1/30 : DynamicRM-2.0.5-1.ppc64le.rpm
14:38:22 2/30 : IBMinvscout-3.1.0-2.ppc64le.rpm
…….
14:38:29 29/30 : rsct.core-3.2.2.3-17144.ppc64le.rpm
14:38:47 30/30 : esagent.pLinux-4.2.0-9.noarch.rpm
Importing packages:     |##################################################| 100.0%
14:38:54 Linking packages to channel.
14:38:55 Transferred 100 orphaned vendor packages to the default organization
14:38:55 Repo http://public.dhe.ibm.com/software/server/POWER/Linux/yum/OSS/SLES/12/ppc64le/ has 0 patches.
14:38:55 Sync completed.
14:38:55 Total time: 0:00:40

# spacewalk-repo-sync --channel ibm-dlpar-utils-sap-sp3
…

Synchronize the base channel :
# spacewalk-repo-sync --channel sle12-sp2-sap-pool-ppc64le
...

# spacewalk-repo-sync --channel sle12-sp3-sap-pool-ppc64le
…

In the specific setup at hand, the lifecycle phases are limited to dev and prod (test has been removed).

vi ~/.spacewalk-manage-channel-lifecycle/settings.conf
phases = dev, prod
exclude channels =

This can be customized as required, which means you can add and remove phases at this stage of the procedure.

Generate the dev channels by promoting the SUSE channels. The same command is used to fully synchronize the dev channels with the online repositories:

# spacewalk-manage-channel-lifecycle -c sle12-sp2-sap-pool-ppc64le --init
INFO: Cloning dev-sle12-sp2-sap-pool-ppc64le from sle12-sp2-sap-pool-ppc64le
INFO: Cloning dev-ibm-dlpar-utils-sap-sp2 from ibm-dlpar-utils-sap-sp2
INFO: Cloning dev-sle-12-sp2-sap-updates-ppc64le from sle-12-sp2-sap-updates-ppc64le
INFO: Cloning dev-sle-ha12-sp2-pool-ppc64le-sap-sp2 from sle-ha12-sp2-pool-ppc64le-sap-sp2
INFO: Cloning dev-sle-ha12-sp2-updates-ppc64le-sap-sp2 from sle-ha12-sp2-updates-ppc64le-sap-sp2
INFO: Cloning dev-sle-manager-tools12-pool-ppc64le-sap-sp2 from sle-manager-tools12-pool-ppc64le-sap-sp2
INFO: Cloning dev-sle-manager-tools12-updates-ppc64le-sap-sp2 from sle-manager-tools12-updates-ppc64le-sap-sp2
INFO: Cloning dev-sle-module-adv-systems-management12-pool-ppc64le-sap-sp2 from sle-module-adv-systems-management12-pool-ppc64le-sap-sp2
INFO: Cloning dev-sle-module-adv-systems-management12-updates-ppc64le-sap-sp2 from sle-module-adv-systems-management12-updates-ppc64le-sap-sp2
INFO: Cloning dev-sle-module-legacy12-pool-ppc64le-sap-sp2 from sle-module-legacy12-pool-ppc64le-sap-sp2
INFO: Cloning dev-sle-module-legacy12-updates-ppc64le-sap-sp2 from sle-module-legacy12-updates-ppc64le-sap-sp2
INFO: Cloning dev-sles12-sp2-pool-ppc64le-sap-sp2 from sles12-sp2-pool-ppc64le-sap-sp2
INFO: Cloning dev-sles12-sp2-updates-ppc64le-sap-sp2 from sles12-sp2-updates-ppc64le-sap-sp2

Now the dev channel can be promoted to generate and synchronize the prod channels with dev:

# spacewalk-manage-channel-lifecycle -c dev-sle12-sp2-sap-pool-ppc64le --promote
INFO: Cloning prod-sle12-sp2-sap-pool-ppc64le from dev-sle12-sp2-sap-pool-ppc64le
INFO: Cloning prod-ibm-dlpar-utils-sap-sp2 from dev-ibm-dlpar-utils-sap-sp2
INFO: Cloning prod-sle-12-sp2-sap-updates-ppc64le from dev-sle-12-sp2-sap-updates-ppc64le
INFO: Cloning prod-sle-ha12-sp2-pool-ppc64le-sap-sp2 from dev-sle-ha12-sp2-pool-ppc64le-sap-sp2
INFO: Cloning prod-sle-ha12-sp2-updates-ppc64le-sap-sp2 from dev-sle-ha12-sp2-updates-ppc64le-sap-sp2
INFO: Cloning prod-sle-manager-tools12-pool-ppc64le-sap-sp2 from dev-sle-manager-tools12-pool-ppc64le-sap-sp2
INFO: Cloning prod-sle-manager-tools12-updates-ppc64le-sap-sp2 from dev-sle-manager-tools12-updates-ppc64le-sap-sp2
INFO: Cloning prod-sle-module-adv-systems-management12-pool-ppc64le-sap-sp2 from dev-sle-module-adv-systems-management12-pool-ppc64le-sap-sp2
INFO: Cloning prod-sle-module-adv-systems-management12-updates-ppc64le-sap-sp2 from dev-sle-module-adv-systems-management12-updates-ppc64le-sap-sp2
INFO: Cloning prod-sle-module-legacy12-pool-ppc64le-sap-sp2 from dev-sle-module-legacy12-pool-ppc64le-sap-sp2
INFO: Cloning prod-sle-module-legacy12-updates-ppc64le-sap-sp2 from dev-sle-module-legacy12-updates-ppc64le-sap-sp2
INFO: Cloning prod-sles12-sp2-pool-ppc64le-sap-sp2 from dev-sles12-sp2-pool-ppc64le-sap-sp2
INFO: Cloning prod-sles12-sp2-updates-ppc64le-sap-sp2 from dev-sles12-sp2-updates-ppc64le-sap-sp2

The same steps need to be performed for any additional product or version:

# spacewalk-manage-channel-lifecycle -c sle12-sp3-sap-pool-ppc64le –promote
…

# spacewalk-manage-channel-lifecycle -c dev-sle12-sp3-sap-pool-ppc64le –promote
…

For all of the -ibm-dlpar-utils- child channels, deactivate the GPG check as it requires an external GPG key from IBM. To do so, navigate to Software in the left pan. Then go to Manage Software Channels and choose Overview:

SUSE Manager Web UI - Manage Software Channels
Figure 33: SUSE Manager Web UI - Manage Software Channels

A list of all of the -ibm-dlpar-utils- child channels appears:

SUSE Manager Web UI - List of Child Channels
Figure 34: SUSE Manager Web UI - List of Child Channels

Make sure the check box for Enable GPG Check is not marked:

SUSE Manager Web UI - Enable GPG Check
Figure 35: SUSE Manager Web UI - Enable GPG Check

Alternatively you can download the GPG key locally and configure a local URL.

5 Creating System Groups

Optionally you can configure system groups to distinguish different types of systems. In this example the system groups development and production are configured.

Navigate to Systems on the left pane, and select System Groups:

SUSE Manager Web UI - System Groups
Figure 36: SUSE Manager Web UI - System Groups

Click Create Group:

SUSE Manager Web UI - Button Create Group
Figure 37: SUSE Manager Web UI - Button Create Group

Enter the required information and confirm by clicking Create Group:

SUSE Manager Web UI - Create System Groups
Figure 38: SUSE Manager Web UI - Create System Groups

Now you see the newly created groups:

SUSE Manager Web UI - Show System Groups
Figure 39: SUSE Manager Web UI - Show System Groups

6 Bootstrap Configuration

Navigate to Manager Configuration on the left pane, and select Bootstrap Script.

SUSE Manager Web UI - Menu Manager Configuration
Figure 40: SUSE Manager Web UI - Menu Manager Configuration

Click the Bootstrap Script tab on top. Enter the required information to create the general client bootstrap script configuration:

SUSE Manager Web UI - Tab Bootstrap Script
Figure 41: SUSE Manager Web UI - Tab Bootstrap Script

Provide the correct Fully-Qualified Domain Name (FQDN) for the SUSE Manager host name.

Now create the activation keys. Navigate to Systems on the left pane and choose Activation Keys:

SUSE Manager Web UI - Activation Keys
Figure 42: SUSE Manager Web UI - Activation Keys

Click Create Key:

SUSE Manager Web UI - Button Create Key
Figure 43: SUSE Manager Web UI - Button Create Key

Create a universal activation key first:

SUSE Manager Web UI - Universal Key
Figure 44: SUSE Manager Web UI - Universal Key

After that, create a key you will use for the autoinstall procedure. For the example at hand, the dev channel has been selected as base channel.

SUSE Manager Web UI - Create Key for “dev” Channel
Figure 45: SUSE Manager Web UI - Create Key for dev Channel

Click the Child Channels tab on top. The appropriate channels should be linked here:

SUSE Manager Web UI - Child Channels
Figure 46: SUSE Manager Web UI - Child Channels

Click the Packages tab on top, and add the following values as packages:

SUSE Manager Web UI - Packages
Figure 47: SUSE Manager Web UI - Packages

Click Update Activation Key.

Now add the development group to this key. Click the Groups tab on top and choose List / Leave:

SUSE Manager Web UI - Groups - List/Leave
Figure 48: SUSE Manager Web UI - Groups - List/Leave

Optionally you can also create and add configuration channels.

Perform the same configuration for a prod key:

SUSE Manager Web UI - Create Key for “prod” Channel
Figure 49: SUSE Manager Web UI - Create Key for prod Channel

You also need to create a bootstrap repository. Use the command:

# mgr-create-bootstrap-repo -c SLES4SAP-12-SP2-ppc64le

Bootstrap scripts are usually generated automatically, but you can manually generate them for each key using the following CLI syntax:

# mgr-bootstrap --activation-keys=1-dev-sle12-sp2-sap-pool-ppc64le --script bootstrap-dev-sle12-sp2-sap-pool-ppc64le.sh --no-up2date --allow-config-actions --allow-remote-commands
# mgr-bootstrap --activation-keys=1-prod-sle12-sp2-sap-pool-ppc64le --script bootstrap-prod-sle12-sp2-sap-pool-ppc64le.sh  --no-up2date --allow-config-actions –allow-remote-commands

The default path where the bootstrap scripts reside is /srv/www/htdocs/pub/bootstrap.

The URL to access the scripts is https://hostname.domain/pub/bootstrap/bootstrap-scriptname.sh.

An already installed SUSE Linux Enterprise Server host can be bootstrapped using the following syntax from that host:

curl -Sks https://hostname.domain/pub/bootstrap/bootstrap-scriptname.sh |  /bin/bash

You can also copy and past the script below and execute it.

Custom Bootstrap Script

The following script blueprint can be used to create a custom bootstrap script. Modify the SUSE Manager host name and the activation key according to your requirements.

#!/bin/bash
echo "SUSE Manager Server Client bootstrap script v4.0"
echo
echo
echo "MINOR MANUAL EDITING OF THIS FILE MAY BE REQUIRED!"
echo
echo "If this bootstrap script was created during the initial installation"
echo "of a SUSE Manager Server, the ACTIVATION_KEYS, and ORG_GPG_KEY values will"
echo "probably *not* be set (see below). If this is the case, please do the"
echo "following:"
echo "  - copy this file to a name specific to its use."
echo "    (e.g., to bootstrap-SOME_NAME.sh - like bootstrap-web-servers.sh.)"
echo "  - on the website create an activation key or keys for the system(s) to"
echo "    be registered."
echo "  - edit the values of the VARIABLES below (in this script) as"
echo "    appropriate:"
echo "    - ACTIVATION_KEYS needs to reflect the activation key(s) value(s)"
echo "      from the website. XKEY or XKEY,YKEY"
echo "    - ORG_GPG_KEY needs to be set to the name(s) of the corporate public"
echo "      GPG key filename(s) (residing in /srv/www/htdocs/pub) if appropriate. XKEY or XKEY,YKEY"
echo
echo "Verify that the script variable settings are correct:"
echo "    - CLIENT_OVERRIDES should be only set differently if a customized"
echo "      client-config-overrides-VER.txt file was created with a different"
echo "      name."
echo "    - ensure the value of HOSTNAME is correct."
echo "    - ensure the value of ORG_CA_CERT is correct."
echo
echo "Enable this script: comment (with #'s) this block (or, at least just"
echo "the exit below)"
echo
ACTIVATION_KEYS=1-dev-sle12-sp2-sap-pool-ppc64le
ORG_GPG_KEY=
CLIENT_OVERRIDES=client-config-overrides.txt
HOSTNAME=[SUMA FQDN]
ORG_CA_CERT=RHN-ORG-TRUSTED-SSL-CERT
ORG_CA_CERT_IS_RPM_YN=0
USING_SSL=1
USING_GPG=1
REGISTER_THIS_BOX=1
ALLOW_CONFIG_ACTIONS=1
ALLOW_REMOTE_COMMANDS=1
FULLY_UPDATE_THIS_BOX=0
PROFILENAME=""   # Empty by default to let it be set automatically.
DISABLE_LOCAL_REPOS=1
DISABLE_YAST_AUTOMATIC_ONLINE_UPDATE=1
Z_CLIENT_REPOS_ROOT=
MYNAME=`hostname -f`
LCMYNAME=`echo $MYNAME | tr '[:upper:]' '[:lower:]'`
LCHOSTNAME=`echo $HOSTNAME | tr '[:upper:]' '[:lower:]'`

if [ $LCMYNAME == $LCHOSTNAME ]; then
    echo "Name of client and of SUSE Manager server are the same."
    echo "Do not try to register a SUSE Manager server at itself!"
    echo "Aborting."
    exit 1
fi
if [ -f "/var/adm/autoinstall/cache/SUSE_Manager_keys" ]; then
    . /var/adm/autoinstall/cache/SUSE_Manager_keys
    if [ "x$redhat_management_key" != "x" ]; then
        ACTIVATION_KEYS="$ACTIVATION_KEYS,$redhat_management_key"
    fi

    if [ "x$registration_key" != "x" ]; then
        ACTIVATION_KEYS="$ACTIVATION_KEYS,$registration_key"
    fi

    ACTIVATION_KEYS=${ACTIVATION_KEYS#,}
fi
if [ -x /usr/bin/wget ] ; then
    output=`LANG=en_US /usr/bin/wget --no-check-certificate 2>&1`
    error=`echo $output | grep "unrecognized option"`
    if [ -z "$error" ] ; then
        FETCH="/usr/bin/wget -nv -r -nd --no-check-certificate"
    else
        FETCH="/usr/bin/wget -nv -r -nd"
    fi
elif [ -x /usr/bin/curl ] ; then
    output=`LANG=en_US /usr/bin/curl -k 2>&1`
    error=`echo $output | grep "is unknown"`
    if [ -z "$error" ] ; then
        FETCH="/usr/bin/curl -ksSOf"
    else
        FETCH="/usr/bin/curl -sSOf"
    fi
else
    echo "To be able to download files, please install either 'wget' or 'curl'"
    exit 1
fi

HTTP_PUB_DIRECTORY=http://${HOSTNAME}/pub
HTTPS_PUB_DIRECTORY=https://${HOSTNAME}/pub
if [ $USING_SSL -eq 0 ] ; then
    HTTPS_PUB_DIRECTORY=${HTTP_PUB_DIRECTORY}
fi

INSTALLER=up2date
if [ -x /usr/bin/zypper ] ; then
    INSTALLER=zypper
elif [ -x /usr/bin/yum ] ; then
    INSTALLER=yum
fi

if [ ! -w . ] ; then
    echo ""
    echo "*** ERROR: $(pwd):"
    echo "    No permission to write to the current directory."
    echo "    Please execute this script in a directory where downloaded files can be stored."
    echo ""
    exit 1
fi
echo
echo "UPDATING RHN_REGISTER/UP2DATE CONFIGURATION FILES"
echo "-------------------------------------------------"
echo "* downloading necessary files"
echo "  client_config_update.py..."
rm -f client_config_update.py
$FETCH ${HTTPS_PUB_DIRECTORY}/bootstrap/client_config_update.py
echo "  ${CLIENT_OVERRIDES}..."
rm -f ${CLIENT_OVERRIDES}
$FETCH ${HTTPS_PUB_DIRECTORY}/bootstrap/${CLIENT_OVERRIDES}

if [ ! -f "client_config_update.py" ] ; then
    echo "ERROR: client_config_update.py was not downloaded"
    exit 1
fi
if [ ! -f "${CLIENT_OVERRIDES}" ] ; then
    echo "ERROR: ${CLIENT_OVERRIDES} was not downloaded"
    exit 1
fi

echo
echo "PREPARE GPG KEYS AND CORPORATE PUBLIC CA CERT"
echo "-------------------------------------------------"
if [ ! -z "$ORG_GPG_KEY" ] ; then
    echo
    echo "* importing organizational GPG keys"
    for GPG_KEY in $(echo "$ORG_GPG_KEY" | tr "," " "); do
        rm -f ${GPG_KEY}
        $FETCH ${HTTPS_PUB_DIRECTORY}/${GPG_KEY}
        res=$(LC_ALL=C rpm -q --queryformat '%{version}' up2date | sed -e 's/\..*//g')
        if [ "x$res" == "x2" ] ; then
            gpg $(up2date --gpg-flags) --import $GPG_KEY
        else
            rpm --import $GPG_KEY
        fi
    done
else
    echo "* no organizational GPG keys to import"
fi

echo
if [ $USING_SSL -eq 1 ] ; then
    echo "* attempting to install corporate public CA cert"
    test -d /usr/share/rhn || mkdir -p /usr/share/rhn
    rm -f ${ORG_CA_CERT}
    $FETCH ${HTTP_PUB_DIRECTORY}/${ORG_CA_CERT}

    if [ $ORG_CA_CERT_IS_RPM_YN -eq 1 ] ; then
        rpm -Uvh --force --replacefiles --replacepkgs ${ORG_CA_CERT}
        rm -f ${ORG_CA_CERT}
    else
        mv ${ORG_CA_CERT} /usr/share/rhn/
    fi

    if [ "$INSTALLER" == zypper ] ; then
      function suseVersion() {
        rpm --eval "%{suse_version}"
      }

      function sslCertDir() {
        if [[ $(suseVersion) -ge 1315 ]]; then
          echo "/etc/pki/trust/anchors"
        else
          echo "/etc/ssl/certs"
        fi
      }

      function targetCertPath() {
        echo "$(sslCertDir)/${ORG_CA_CERT}.pem"
      }

      function updateCertificates() {
        if [[ $(suseVersion) -ge 1315 ]]; then
          test -x /usr/sbin/update-ca-certificates && /usr/sbin/update-ca-certificates
        else
          test -x /usr/bin/c_rehash && /usr/bin/c_rehash /etc/ssl/certs/ | grep "${ORG_CA_CERT}"
        fi
      }

      function symlinkCertificate() {
        if [  $ORG_CA_CERT_IS_RPM_YN -eq 1 ] ; then
          ORG_CA_CERT=$(basename $(sed -n 's/^sslCACert *= *//p' "${CLIENT_OVERRIDES}"))
        fi
        test -e "$(targetCertPath)" || {
          test -d $(sslCertDir) || mkdir -p $(sslCertDir)
          ln -s "/usr/share/rhn/${ORG_CA_CERT}" "$(targetCertPath)"
        }
      }

      symlinkCertificate
      updateCertificates
    fi
else
    echo "* configured not to use SSL: don't install corporate public CA cert"
fi

if [ "$INSTALLER" == zypper ]; then
  echo
  echo "CHECKING THE REGISTRATION STACK"
  echo "-------------------------------------------------"

  function getZ_CLIENT_CODE_BASE() {
    local BASE=""
    local VERSION=""
    local PATCHLEVEL=""
    test -r /etc/SuSE-release && {
      grep -q 'Enterprise' /etc/SuSE-release && BASE="sle"
      eval $(grep '^\(VERSION\|PATCHLEVEL\)' /etc/SuSE-release | tr -d '[:blank:]')
    }
    Z_CLIENT_CODE_BASE="${BASE:-unknown}"
    Z_CLIENT_CODE_VERSION="${VERSION:-unknown}"
    Z_CLIENT_CODE_PATCHLEVEL="${PATCHLEVEL:-0}"
  }

  function getZ_MISSING() {
    local NEEDED="spacewalk-check spacewalk-client-setup spacewalk-client-tools zypp-plugin-spacewalk"
    if [ "$Z_CLIENT_CODE_BASE" == "sle" -a "$Z_CLIENT_CODE_VERSION" == "10" ]; then
      which 'xsltproc' || NEEDED="$NEEDED libxslt"
    fi
    Z_MISSING=""
    for P in $NEEDED; do
      rpm -q "$P" || Z_MISSING="$Z_MISSING $P"
    done
  }

  function getZ_ZMD_TODEL() {
    local ZMD_STACK="zmd rug libzypp-zmd-backend yast2-registration zen-updater zmd-inventory suseRegister-jeos"
    if rpm -q suseRegister --qf '%{VERSION}' | grep -q '^\(0\.\|1\.[0-3]\)\(\..*\)\?$'; then
      # we need the new suseRegister >= 1.4, so wipe an old one too
      ZMD_STACK="$ZMD_STACK suseRegister suseRegisterInfo spacewalk-client-tools"
    fi
    Z_ZMD_TODEL=""
    for P in $ZMD_STACK; do
      rpm -q "$P" && Z_ZMD_TODEL="$Z_ZMD_TODEL $P"
    done
  }

  echo "* check for necessary packages being installed..."
  getZ_CLIENT_CODE_BASE
  echo "* client codebase is ${Z_CLIENT_CODE_BASE}-${Z_CLIENT_CODE_VERSION}-sp${Z_CLIENT_CODE_PATCHLEVEL}"

  getZ_MISSING
  if [ -z "$Z_MISSING" ]; then
    echo "  no packages missing."
  else
    echo "* going to install missing packages..."
    Z_CLIENT_REPOS_ROOT="${Z_CLIENT_REPOS_ROOT:-https://${HOSTNAME}/pub/repositories}"
    Z_CLIENT_REPO_URL="${Z_CLIENT_REPOS_ROOT}/${Z_CLIENT_CODE_BASE}/${Z_CLIENT_CODE_VERSION}/${Z_CLIENT_CODE_PATCHLEVEL}/bootstrap"
    test "${Z_CLIENT_CODE_BASE}/${Z_CLIENT_CODE_VERSION}/${Z_CLIENT_CODE_PATCHLEVEL}" = "sle/11/1" && {
      Z_CLIENT_REPO_URL="${Z_CLIENT_REPOS_ROOT}/susemanager-client-setup"
    }
    Z_CLIENT_REPO_NAME="susemanager-client-setup"
    Z_CLIENT_REPO_FILE="/etc/zypp/repos.d/$Z_CLIENT_REPO_NAME.repo"

    $FETCH $Z_CLIENT_REPO_URL/repodata/repomd.xml
    if [ ! -f "repomd.xml" ] ; then
        echo "Bootstrap repo '$Z_CLIENT_REPO_URL' does not exist."
        Z_CLIENT_REPO_URL=""
    fi
    rm -f repomd.xml
    if [ "$Z_CLIENT_CODE_BASE" == "sle" ]; then
      if [ "$Z_CLIENT_CODE_VERSION" = "10" ]; then
          echo "* check whether to remove the ZMD stack first..."
          getZ_ZMD_TODEL
          if [ -z "$Z_ZMD_TODEL" ]; then
            echo "  ZMD stack is not installed. No need to remove it."
          else
            echo "  Disable and remove the ZMD stack..."
            if [ -x /usr/sbin/rczmd ]; then
              /usr/sbin/rczmd stop
            fi
            rpm -e --nodeps $Z_ZMD_TODEL || {
              echo "ERROR: Failed remove the ZMD stack."
              exit 1
            }
          fi
      fi
    fi

    if rpm -q zypper --qf '%{VERSION}' | grep -q '^0\(\..*\)\?$'; then

      if [ -n "$Z_CLIENT_REPO_URL" ]; then
        echo "  adding client software repository at $Z_CLIENT_REPO_URL"
        zypper --non-interactive --no-gpg-checks sd $Z_CLIENT_REPO_NAME
        zypper --non-interactive --no-gpg-checks sa $Z_CLIENT_REPO_URL $Z_CLIENT_REPO_NAME
        zypper --non-interactive --no-gpg-checks refresh "$Z_CLIENT_REPO_NAME"
      fi
      zypper --non-interactive --no-gpg-checks in $Z_MISSING
      for P in $Z_MISSING; do
          rpm -q "$P" || {
            echo "ERROR: Failed to install all missing packages."
            exit 1
          }
      done
      if [ -n "$Z_CLIENT_REPO_URL" ]; then
        cat <<EOF >"$Z_CLIENT_REPO_FILE"
[$Z_CLIENT_REPO_NAME]
name=$Z_CLIENT_REPO_NAME
baseurl=$Z_CLIENT_REPO_URL
enabled=1
autorefresh=1
keeppackages=0
gpgcheck=0
EOF
      fi
    else

      if [ -n "$Z_CLIENT_REPO_URL" ]; then
        echo "  adding client software repository at $Z_CLIENT_REPO_URL"
        cat <<EOF >"$Z_CLIENT_REPO_FILE"
[$Z_CLIENT_REPO_NAME]
name=$Z_CLIENT_REPO_NAME
baseurl=$Z_CLIENT_REPO_URL
enabled=1
autorefresh=1
keeppackages=0
gpgcheck=0
EOF
        zypper --non-interactive --gpg-auto-import-keys refresh "$Z_CLIENT_REPO_NAME"
      fi
      zypper --non-interactive in $Z_MISSING || {
            echo "ERROR: Failed to install all missing packages."
            exit 1
          }

    fi
  zypper rr "$Z_CLIENT_REPO_NAME"
  fi
  if [ "$Z_CLIENT_CODE_BASE" == "sle" ]; then
    if [ "$Z_CLIENT_CODE_VERSION" = "10" ]; then
      test -e "/usr/share/zypp/migrate/10-11.migrate.products.sh" && {
          echo "* check whether we have to to migrate metadata..."
          sh /usr/share/zypp/migrate/10-11.migrate.products.sh || {
            echo "ERROR: Failed to migrate product metadata."
            exit 1
          }
      }
    fi
  fi
fi

echo "* running the update scripts"
if [ -f "/etc/sysconfig/rhn/rhn_register" ] ; then
    echo "  . rhn_register config file"
    /usr/bin/python -u client_config_update.py /etc/sysconfig/rhn/rhn_register ${CLIENT_OVERRIDES}
fi
if [ -f "/etc/sysconfig/rhn/up2date" ] ; then
  echo "  . up2date config file"
  /usr/bin/python -u client_config_update.py /etc/sysconfig/rhn/up2date ${CLIENT_OVERRIDES}
fi

echo
echo "REGISTRATION"
echo "------------"
if [ -z "$ACTIVATION_KEYS" ] ; then
    echo "*** ERROR: in order to bootstrap SUSE Manager Server clients, an activation key or keys"
    echo "           must be created in the SUSE Manager Server web user interface, and the"
    echo "           corresponding key or keys string (XKEY,YKEY,...) must be mapped to"
    echo "           the ACTIVATION_KEYS variable of this script."
    exit 1
fi

if [ $REGISTER_THIS_BOX -eq 1 ] ; then
    echo "* registering"
    files=""
    directories=""
    if [ $ALLOW_CONFIG_ACTIONS -eq 1 ] ; then
        for i in "/etc/sysconfig/rhn/allowed-actions /etc/sysconfig/rhn/allowed-actions/configfiles"; do
            [ -d "$i" ] || (mkdir -p $i && directories="$i $directories")
        done
        [ -f /etc/sysconfig/rhn/allowed-actions/configfiles/all ] || files="$files /etc/sysconfig/rhn/allowed-actions/configfiles/all"
        [ -n "$files" ] && touch  $files
    fi
    if [ -z "$PROFILENAME" ] ; then
        profilename_opt=""
    else
        profilename_opt="--profilename=$PROFILENAME"
    fi
    /usr/sbin/rhnreg_ks --force --activationkey "$ACTIVATION_KEYS" $profilename_opt
    RET="$?"
    [ -n "$files" ] && rm -f $files
    [ -n "$directories" ] && rmdir $directories
    if [ $RET -eq 0 ]; then
      echo
      echo "*** this system should now be registered, please verify ***"
      echo
    else
      echo
      echo "*** Error: Registering the system failed."
      echo
      exit 1
    fi
else
    echo "* explicitely not registering"
fi

if [ $ALLOW_CONFIG_ACTIONS -eq 1 ] ; then
    echo
    echo "* setting permissions to allow configuration management"
    echo "  NOTE: use an activation key to subscribe to the tools"
    if [ "$INSTALLER" == zypper ] ; then
        echo "        channel and zypper install/update rhncfg-actions"
    elif [ "$INSTALLER" == yum ] ; then
        echo "        channel and yum upgrade rhncfg-actions"
    else
        echo "        channel and up2date rhncfg-actions"
    fi
    if [ -x "/usr/bin/rhn-actions-control" ] ; then
        rhn-actions-control --enable-all
        rhn-actions-control --disable-run
    else
        echo "Error setting permissions for configuration management."
        echo "    Please ensure that the activation key subscribes the"
        if [ "$INSTALLER" == zypper ] ; then
            echo "    system to the tools channel and zypper install/update rhncfg-actions."
        elif [ "$INSTALLER" == yum ] ; then
            echo "    system to the tools channel and yum updates rhncfg-actions."
        else
            echo "    system to the tools channel and up2dates rhncfg-actions."
        fi
        exit
    fi
fi

if [ $ALLOW_REMOTE_COMMANDS -eq 1 ] ; then
    echo
    echo "* setting permissions to allow remote commands"
    echo "  NOTE: use an activation key to subscribe to the tools"
    if [ "$INSTALLER" == zypper ] ; then
        echo "        channel and zypper update rhncfg-actions"
    elif [ "$INSTALLER" == yum ] ; then
        echo "        channel and yum upgrade rhncfg-actions"
    else
        echo "        channel and up2date rhncfg-actions"
    fi
    if [ -x "/usr/bin/rhn-actions-control" ] ; then
        rhn-actions-control --enable-run
    else
        echo "Error setting permissions for remote commands."
        echo "    Please ensure that the activation key subscribes the"
        if [ "$INSTALLER" == zypper ] ; then
            echo "    system to the tools channel and zypper updates rhncfg-actions."
        elif [ "$INSTALLER" == yum ] ; then
            echo "    system to the tools channel and yum updates rhncfg-actions."
        else
            echo "    system to the tools channel and up2dates rhncfg-actions."
        fi
        exit
    fi
fi

echo
echo "OTHER ACTIONS"
echo "------------------------------------------------------"
if [ $DISABLE_YAST_AUTOMATIC_ONLINE_UPDATE -eq 1 ]; then
    YAOU_SYSCFGFILE="/etc/sysconfig/automatic_online_update"
    if [ -f "$YAOU_SYSCFGFILE" ]; then
      echo "* Disable YAST automatic online update."
      sed -i 's/^ *AOU_ENABLE_CRONJOB.*/AOU_ENABLE_CRONJOB="false"/' "$YAOU_SYSCFGFILE"
      for D in /etc/cron.*; do
          test -L $D/opensuse.org-online_update && rm $D/opensuse.org-online_update
      done
    fi
fi
if [ "$INSTALLER" == zypper ] ; then
  test -d /var/lib/suseRegister && touch /var/lib/suseRegister/neverRegisterOnBoot
fi
if [ $DISABLE_LOCAL_REPOS -eq 1 ]; then
    if [ "$INSTALLER" == zypper ] ; then
          echo "* Disable all repos not provided by SUSE Manager Server."
          zypper ms -d --all
          zypper ms -e --medium-type plugin
          zypper mr -d --all
          zypper mr -e --medium-type plugin
          zypper mr -e "$Z_CLIENT_REPO_NAME"
    elif [ "$INSTALLER" == yum ] ; then
        echo "* Disable all repos not provided by SUSE Manager Server.";
          for F in /etc/yum.repos.d/*.repo; do
            test -f "$F" || continue
            awk '
              BEGIN           { saw=0 }
              /^ *[[]/        { if ( saw==1 ) print "enabled=0"; else saw=1 }
              /^ *enabled *=/ { print "enabled=0"; saw=2; next }
                                  { print }
              END             { if ( saw==1 ) print "enabled=0" }
            ' "$F" > "$F.bootstrap.tmp" && mv "$F.bootstrap.tmp" "$F"
            test -f  "$F.bootstrap.tmp" && {
              echo "*** Error: Failed to process '$F'; check manually if all repos inside are disabled."
              rm "$F.bootstrap.tmp"
            }
          done
    fi
fi
if [ $FULLY_UPDATE_THIS_BOX -eq 1 ] ; then
    if [ "$INSTALLER" == zypper ] ; then
        echo "zypper --non-interactive up zypper zypp-plugin-spacewalk; rhn-profile-sync; zypper --non-interactive up (conditional)"
    elif [ "$INSTALLER" == yum ] ; then
        echo "yum -y upgrade yum yum-rhn-plugin; rhn-profile-sync; yum upgrade (conditional)"
    else
        echo "up2date up2date; up2date -p; up2date -uf (conditional)"
    fi
else
    if [ "$INSTALLER" == zypper ] ; then
        echo "zypper --non-interactive up zypper zypp-plugin-spacewalk; rhn-profile-sync"
    elif [ "$INSTALLER" == yum ] ; then
        echo "yum -y upgrade yum yum-rhn-plugin; rhn-profile-sync"
    else
        echo "up2date up2date; up2date -p"
    fi
fi
echo "but any post configuration action can be added here.  "
echo "------------------------------------------------------"
if [ $FULLY_UPDATE_THIS_BOX -eq 1 ] ; then
    echo "* completely updating the box"
else
    echo "* ensuring $INSTALLER itself is updated"
fi
if [ "$INSTALLER" == zypper ] ; then
    zypper lr -u
    zypper --non-interactive ref -s
    zypper --non-interactive up zypper zypp-plugin-spacewalk
    if [ -x /usr/sbin/rhn-profile-sync ] ; then
        /usr/sbin/rhn-profile-sync
    else
        echo "Error updating system info in SUSE Manager Server."
        echo "    Please ensure that rhn-profile-sync in installed and rerun it."
    fi
    if [ $FULLY_UPDATE_THIS_BOX -eq 1 ] ; then
        zypper --non-interactive up
    fi
elif [ "$INSTALLER" == yum ] ; then
    yum repolist
    /usr/bin/yum -y upgrade yum yum-rhn-plugin
    if [ -x /usr/sbin/rhn-profile-sync ] ; then
        /usr/sbin/rhn-profile-sync
    else
        echo "Error updating system info in SUSE Manager Server."
        echo "    Please ensure that rhn-profile-sync in installed and rerun it."
    fi
    if [ $FULLY_UPDATE_THIS_BOX -eq 1 ] ; then
        /usr/bin/yum -y upgrade
    fi
else
    /usr/sbin/up2date up2date
    /usr/sbin/up2date -p
    if [ $FULLY_UPDATE_THIS_BOX -eq 1 ] ; then
        /usr/sbin/up2date -uf
    fi
fi
echo "-bootstrap complete-"

7 Configure the DHCP Server with Bootstrap Protocol Support

Open an SSH session to the SUSE Manager server with X11 Forwarding enabled (on Microsoft Windows, use PuTTY and Xming ):

SUSE Manager Web UI - Administrator Settings
Figure 50: SUSE Manager Web UI - Administrator Settings

Click the icon for the DHCP server:

SUSE Manager Web UI - Icon DHCP Server
Figure 51: SUSE Manager Web UI - Icon DHCP Server

A window appears listing the packages that need to be installed:

SUSE Manager Web UI - Packages to Install
Figure 52: SUSE Manager Web UI - Packages to Install

Install the required packages.

Select the interface(s) for the DHCP service and click Next:

SUSE Manager Web UI - DHCP Server Wizard: Card Selection
Figure 53: SUSE Manager Web UI - DHCP Server Wizard: Card Selection

Provide the global settings and click Next:

SUSE Manager Web UI - DHCP Server Wizard: Global Settings
Figure 54: SUSE Manager Web UI - DHCP Server Wizard: Global Settings

Provide the information for Dynamic DHCP and click Next:

SUSE Manager Web UI - DHCP Server Wizard: Dynamic DHCP
Figure 55: SUSE Manager Web UI - DHCP Server Wizard: Dynamic DHCP

Now select when and how to start the service:

SUSE Manager Web UI - Start Service
Figure 56: SUSE Manager Web UI - Start Service

Finish the basic configuration. Continue by customizing the DHCP configuration file manually for bootp netboots.

The example below shows how static netboot and DHCP can be configured:

# vi /etc/dhcpd.conf
option domain-name "[Domain name]";
option domain-name-servers [DNS IP];
option routers [Gateway ip];
default-lease-time 60;
ddns-update-style none;
host [netboot client hostname] {
  hardware ethernet [MAC address lower case];
  fixed-address [client ip];
  next-server [suse manager ip];
  allow bootp;
  server-name "[susemanager FQDN]";
  filename "boot/grub2/powerpc-ieee1275/core.elf";
}
subnet [Network] netmask [Subnet] {
  range dynamic-bootp [range lowest ip] [range highest ip];
  default-lease-time 5;
  max-lease-time 3600;
  filename "boot/grub2/powerpc-ieee1275/core.elf";
  next-server [suse manager server];
  }

Restart the DHCP daemon with the following command:

# systemctl restart dhcpd.service

Add additional host entries for each new LPAR you want to be able to netboot.

Important
Important: IBM Power Systems Firmware

When performing a bootp boot through the IBM Power Systems firmware, a static IP address is used to load the initial boot image. Because of the nature of the SUSE installation tool YaST, the network configuration in the first phase of the SUSE installer will use DHCP to acquire an IP.

8 Autoinstall Configuration

To enable Autoinstallation, you first need to create a subdirectory where you copy the contents of the SUSE product installation DVDs:

# mkdir -p /srv/www/htdocs/install/SLES12SP2SAP_PPC64LE
# mount /dev/sr0 /mnt
# cd /mnt
# cp -r * /srv/www/htdocs/install/SLES12SP2SAP_PPC64LE
…

Now navigate to Systems on the left pane. Select Autoinstallation and then Distributions:

SUSE Manager Web UI - Autoinstallation
Figure 57: SUSE Manager Web UI - Autoinstallation

Add a new distribution:

SUSE Manager Web UI - Create Distribution
Figure 58: SUSE Manager Web UI - Create Distribution

Provide the following custom kernel options:

lang=en_US repo=http://[SUMA IP]/ks/dist/dev-sle12-sp2-sap-pool-ppc64le
install=http://[SUMA IP]/ks/dist/dev-sle12-sp2-sap-pool-ppc64le self_update=0
pt.options=+self_update

The Tree path is the local path where the SUSE install DVD content resides. The URLs should contain the name of the correct base channel.

Navigate to Autoinstallation Snippets:

SUSE Manager Web UI - Autoinstallation Snippets
Figure 59: SUSE Manager Web UI - Autoinstallation Snippets

Autoinstallation Snippets is used to add the bootstrap process to the autoinstallation post-install process. Click Create Snippet:

SUSE Manager Web UI - Create Snippet
Figure 60: SUSE Manager Web UI - Create Snippet

Fill in the required information as shown on the screen below:

SUSE Manager Web UI - Kickstart Snippet
Figure 61: SUSE Manager Web UI - Kickstart Snippet

In the Contents field, enter the following:

#raw
curl -Sks https://[SUMA FQDN]/pub/bootstrap/bootstrap-dev-sle12sp2-sap.sh |  /bin/bash

zypper ref -y;zypper -n patch -l -y;zypper -n patch -l -y;zypper -n up -l -y
#end raw

This script will automatically execute the bootstrap script and directly perform all patch updates.

You also created a Production snippet bootstrap-prod-sles12-sp2 which points to the production bootstrap script. This is the custom bootstrap script you created earlier.

Navigate to System on the left pane. Select Autoinstallation” and then Profiles”:

SUSE Manager Web UI - Profiles
Figure 62: SUSE Manager Web UI - Profiles

Now you can create an autoinstallation profile. Click Upload Kickstart/Autoyast File:

SUSE Manager Web UI - Button Upload Kickstart/Autoyast File
Figure 63: SUSE Manager Web UI - Button Upload Kickstart/Autoyast File

The screen below opens. Provide the required details and an AutoYaST script:

SUSE Manager Web UI - Create Autoinstallation Profile
Figure 64: SUSE Manager Web UI - Create Autoinstallation Profile

To create a baseline AutoYaST profile, perform a reference manual install on an LPAR. Configure the Linux installation to the point where you are satisfied and where it can serve as a base setup for new LPARs. Then generate the autoyast.xml file using the command yast2 clone_system.

This AutoYaST file can be used as is. However, for the document at hand, choose to add variables to it to easily customize an installation from the SUSE Manager GUI. Also, add the post install snippet.

Below find copy and paste segments of the example profile. These segments indicate where changes need to be or can be applied. Parameterization must be customized in synchronization with the needs of the environment.

<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<scripts>
<init-scripts config:type="list">
      <script>
        <filename>postinstall.sh</filename>
        <interpreter>shell</interpreter>
        <debug config:type="boolean">false</debug>
        <feedback config:type="boolean">true</feedback>
        <source><![CDATA[
#!/bin/sh
$SNIPPET('spacewalk/1/bootstrap-dev-sles12-sp2')]]>
        </source>
      </script>
</init-scripts>
</scripts>
…...

To enforce a specific LUN to be formatted and used for the operating systems file systems, use a variable $lunserial that contains the actual serial number of the LUN as indicated on the storage controller interface.

……...
  <bootloader>
    <global>
      <activate>true</activate>
      <append>splash=silent quiet showopts</append>
      <boot_boot>false</boot_boot>
      <boot_custom>/dev/disk/by-id/scsi-3$lunserial-part1</boot_custom>
      <boot_extended>false</boot_extended>
…...

Network settings are also replaced with variables:

…...

  <dns>
    <dhcp_hostname config:type="boolean">true</dhcp_hostname>
    <domain>mrbc-mbhg.intra.net</domain>
  <hostname>$hostname</hostname>
    <nameservers config:type="list">
      <nameserver>$dns1</nameserver>
  <nameserver>$dns2</nameserver>
  <nameserver>$dns3</nameserver>
    </nameservers>
    <resolv_conf_policy>auto</resolv_conf_policy>
    <searchlist config:type="list">
      <search>iriscorporate.com</search>
    </searchlist>
    <write_hostname config:type="boolean">false</write_hostname>
  </dns>
  <interfaces config:type="list">
    <interface>
      <bootproto>static</bootproto>
      <device>eth1</device>
      <ipaddr>$ipaddr1</ipaddr>
      <name>Virtual Ethernet card 1</name>
      <netmask>$subnet1</netmask>
      <startmode>auto</startmode>
      <usercontrol>no</usercontrol>
    </interface>
…...

    <net-udev config:type="list">
      <rule>
        <name>eth1</name>
        <rule>ATTR{address}</rule>
        <value>$mac1</value>
      </rule>
    </net-udev>
    <routing>
      <ipv4_forward config:type="boolean">false</ipv4_forward>
      <ipv6_forward config:type="boolean">false</ipv6_forward>
      <routes config:type="list">
        <route>
          <destination>default</destination>
          <device>-</device>
          <gateway>$gateway</gateway>
          <netmask>-</netmask>
        </route>
      </routes>
    </routing>
    </networking>
……

Replace the NTP server addresses by variables:

…...

      <peer>
      <address>$ntp1</address>
        <comment/>
        <options> iburst</options>
        <type>server</type>
      </peer>
      <peer>
      <address>$ntp2</address>
        <comment/>
        <options> iburst</options>
        <type>server</type>
      </peer>
     </peers>
…...

Partitioning is done as follows:

…...
<partitioning config:type="list">
    <drive>
    <device>/dev/mapper/3$lunserial</device>
      <disklabel>msdos</disklabel>
      <enable_snapshots config:type="boolean">true</enable_snapshots>

…...

…...
</profile>

You used variables to make ad-hoc customization of the AutoYaST profile easy through the SUSE Manager Web interface. As an overview, the following lines are affected in the above profile:

<boot_custom>/dev/disk/by-id/scsi-3$lunserial-part1</boot_custom>
<hostname>$hostname</hostname>
<nameserver>$dns1</nameserver>
<nameserver>$dns2</nameserver>
<nameserver>$dns3</nameserver>
<ipaddr>$ipaddr1</ipaddr>
<netmask>$subnet1</netmask>
<value>$mac1</value>
<gateway>$gateway</gateway>
<address>$ntp1</address>
<address>$ntp2</address>
<device>/dev/mapper/3$lunserial</device>

Now go to the Variables tab and provide the correct values:

SUSE Manager Web UI - Variables
Figure 65: SUSE Manager Web UI - Variables
mac1=[MAC address in lowercase with : separators]
hostname=[Hostname]
ipaddr1=[IP address]
subnet1=[Netmask]
gateway=[GATEWAY]
dns1=[DNS1]
dns2=[DNS2]
dns3=[DNS3]
ntp1=[NTP1]
ntp2=[NTP2]
org=1
lunserial=[Disk serial nr]

In this particular example a Fibre Channel (FC) connected storage (IBM) is used which can be identified in /dev/disk/by-id and /dev/mapper by its LUN serial number.

Verify that the syntax of the profile and variables is correct by checking the Autoinstallation File tab. It should show the final script where the variables and snippets have been replaced by their values. If this tab presents an error, you might have an issue in your syntax.

9 GRUB2 Custom Configuration for IBM PowerVM Netboot

At this point you need to access a SUSE Linux Enterprise Server 12 ppc64le host with the same SP and kernel version as the one you want to deploy through autoinstallation. A good possibility is to use the reference installation host where you based the AutoYaST template on.

Here you need to generate the GRUB2 netboot files. Connect via SSH to the host and type the following command:

# grub2-mknetdir –net-directory=/srv/tftpboot

Copy the files to the /root home:

# scp -r /srv/tftpboot/boot/grub2 root@[suse manager host]:/root/

On SUSE Manager, create a custom grub.cfg file to go with these netboot files :

# vi /root/grub2/grub.cfg
with_gfx=0

gfxmode=auto
locale_dir=$prefix/locale
lang=en_US

set default='dev-sle12-sp2-sap-pool-ppc64le:1:IRIS'

insmod gettext

if sleep --interruptible 0 ; then
  timeout=30
fi

menuentry 'dev-sle12-sp2-sap-pool-ppc64le:1:IRIS' --class opensuse --class gnu-linux --class gnu --class os {
insmod http
insmod tftp
set root=tftp,[suma ip]
echo 'Loading kernel ...'
linux /images/dev-sle12-sp2-sap-pool-ppc64le_1_IRIS/linux ksdevice=bootif lang=en_US pt.options=+self_update repo=http://[suma ip]/ks/dist/dev-sle12-sp2-sap-pool-ppc64le install=http://[suma ip]/ks/dist/dev-sle12-sp2-sap-pool-ppc64le self_update=0 textmode=1 autoyast=http://[suma ip]/cblr/svc/op/ks/profile/dev-sle12-sp2-sap-pool-ppc64le:1:IRIS
echo 'Loading initial ramdisk ...'
initrd /images/dev-sle12-sp2-sap-pool-ppc64le_1_IRIS/initrd
}

menuentry 'local' {
  exit
}

submenu 'Other options...' {
 menuentry 'Reboot' {
 reboot
 }

 menuentry 'Exit to Open Firmware' {
 exit
 }
}

You can base this configuration off the auto-generated /srv/tftpboot/grub/grub.cfg.

Cobbler is a Linux installation server that allows for rapid setup of network installation environments (see http://cobbler.github.io/. It is used to generate the content of the /srv/tftpboot path. As it wipes the path every time a synchronization is triggered, you need to put in place the workaround below. This guarantees your custom GRUB files for IBM PowerVM are recopied in the tftpboot directory each time the configuration is resynchronized:

# vi /var/lib/cobbler/triggers/sync/post/grub2.sh
#!/bin/sh
cp -r /root/grub2 /srv/tftpboot/boot/
Note
Note: Example Path

In this example /root/grub2 is only used as an example path to place your base versions of the GRUB configurations. You can choose a different location.

Next, enter the command:

# chmod u+x /var/lib/cobbler/triggers/sync/post/grub2.sh

The Cobbler post-synchronization script now copies the GRUB2 files over to the TFTP boot directory with every synchronization.

You can synchronize Cobbler with the command:

# cobbler sync

Alternatively, you can use the SUSE Manager Web interface. Navigate to Manager Configuration and select Cobbler:

SUSE Manager Web UI - Cobbler
Figure 66: SUSE Manager Web UI - Cobbler

Now run the Cobbler synchronization and click Update:

SUSE Manager Web UI - Cobbler Synchronization
Figure 67: SUSE Manager Web UI - Cobbler Synchronization

Verify after a synchronization that the following files have been generated:

  • Subdirectory structure /srv/tftpboot/images with the Linux and initrd images is available

  • /srv/tftpboot/boot/grub2 files have been copied over during synchronization

10 Netboot and Autoinstall Procedure

First collect the following details:

mac address=
hostname=
ipaddr1=
subnet1=
gateway=
dns1=
dns2=
dns3=
ntp1=
ntp2=
org=1
lunserial=

Via the SUSE Manager Web interface, customize the variables for the AutoYaST profile you created earlier using the collected values above. Go to Systems on the left pane, select Autoinstallation”, and then Profile. Choose specific profile and click the Variables tab. Here you can enter the variables.

The LPAR details needed, which you can retrieve from the Hardware Management Console (HMC), are:

LPAR id=
LPAR name =
LPAR profile =
Power system name =

Now you have all required details and you can launch the LPAR netboot via the HMC.

Via SSH connection, log in to the correct HMC host. Use the following command to execute the LPAR netboot and immediately open the serial console:

> lpar_netboot -v -f -D -m [MAC] -i -t ent -T off -s auto -d auto -S [SUMA IP] -G [GATEWAY IP] -C [LPAR IP] -K [NETMASK] "[LPAR NAME]" "[LPAR PROFILE]" "[SYSTEM NAME]"; rmvterm -m [SYSTEM NAME] --id [LPAR ID] ; mkvterm -m [SYSTEM NAME] --id [LPAR ID]
Important
Important: Values

Replace the above [...] fields in the command with the following values:

[MAC] = bootp client mac address without ‘:’ separators and in uppercase
[SUMA IP] = SUSE Manager IP
[GATEWAY IP] = default gateway ip
[LPAR IP] = client lpar ip
[NETMASK] = subnet mask
[LPAR NAME] = lpar name as seen on the HMC
[LPAR PROFILE] = default lpar profile configured on the HMC for this LPAR
[SYSTEM NAME] = system name of the power server that hosts the lpar
[LPAR ID] = the LPAR ID number (check the HMC)

If everything is correct, the GRUB menu should load:

GRUB Menu
Figure 68: GRUB Menu

When the default grub option is loaded, the installation will start automatically and perform all the installation steps.

Performing Installation
Figure 69: Performing Installation

If the bootstrap section in the AutoYaST profile was successful, the new host should appear in the Physical Systems» list. Navigate to Systems in the left pane, and select Physical Systems.

SUSE Manager Web UI - Physical Systems
Figure 70: SUSE Manager Web UI - Physical Systems

All physical systems are listed here:

SUSE Manager Web UI - List of Physical Systems
Figure 71: SUSE Manager Web UI - List of Physical Systems

Your installed host is now be available for use:

SUSE Manager Web UI - Installed Host
Figure 72: SUSE Manager Web UI - Installed Host

11 Conclusion

SUSE Manager was designed to manage Linux systems across a variety of hardware architectures, hypervisors and container and cloud platforms with a single tool. It helps your enterprise DevOps and IT Operations teams reduce complexity and regain control of your IT assets. It automates Linux server provisioning, patching and configuration for faster, consistent and repeatable server deployment. Thus you can optimize operations and reduce costs. With automated monitoring, tracking, auditing and reporting of your systems, VMs, and containers across your entire IT environment, you can ensure compliance with internal security policies and external regulations.

SUSE Manager 3 is an ideal platform to centralize package repositories and configuration management on many platforms, including IBM Power. Through auto-deployment via AutoYaST and Netboot you can reduce hands-on time needed to perform deployments of new LPARs, reinstalls or even disaster-recovery scenarios without the need of an AIX based Network Install Manager. Also, the methodology displayed in this document allows you to netboot little-endian kernels through GRUB2 which is required to support SUSE Linux Enterprise Server 12 and up on IBM Power.

When you run a production PowerVM environment with applications such as SAP HANA or other ERP or database systems, spread over several PowerVM LPARs (VMs) and physical IBM Power systems, SUSE Manager is tremendously usefull to centrally manage Linux software levels and configurations to satisfy the changing requirements posed by the application vendors.

13 Legal Notice

Copyright ©2006–2018 SUSE LLC and contributors. All rights reserved.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled GNU Free Documentation License.

SUSE, the SUSE logo and YaST are registered trademarks of SUSE LLC in the United States and other countries. For SUSE trademarks, see http://www.suse.com/company/legal/. Linux is a registered trademark of Linus Torvalds. All other names or trademarks mentioned in this document may be trademarks or registered trademarks of their respective owners.

This article is part of a series of documents called "SUSE Best Practices". The individual documents in the series were contributed voluntarily by SUSE's employees and by third parties.

All information found in this article has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy.

Therefore, we need to specifically state that neither SUSE LLC, its affiliates, the authors, nor the translators may be held liable for possible errors or the consequences thereof. Below we draw your attention to the license under which the articles are published.

Print this page