Skip to main content

Deploying SLES 12 SP3 with custom software

This scenario installs the SLES 12 SP3 operating system along with custom software (Java and Eclipse IDE). A custom profile is used that includes the custom software and post-installation scripts to install and configure the custom software. The custom software packages are copied to the host during the deployment and made available for the custom post-install script to use.

Before you begin

This scenario uses the following sample files.

Note
  • SLES installation scripts can be in one of the following formats: Bash (.sh), Perl (.pm or .pl), Python (.py)

  • Software files and installation scripts are installed from the custom data and files path that you specify during deployment. The default custom data and files path is /home/lxca.

  • For SLES 12 SP3, the Eclipse IDE requires the GCC compiler, which is included in the predefined Basic profile. This scenario creates a custom OS-image profile using the predefined Basic profile as the base. If you choose to use another profile, you must ensure that the profile includes the GCC compiler.

Procedure

To deploy SLES 12 SP3 with custom software, complete the following steps.

  1. Download the base SLES 12 SP3 operating system from the SUSE website to the local system, and import the image to the OS-images repository. For more information, see Importing operating-system images.
    1. From the XClarity Administrator menu bar, click Provisioning > Manage OS Images to display the Deploy Operating System: Manage OS Images page.

    2. Click the OS Images tab.

    3. Click Import icon (Import icon).

    4. Click Local Import.

    5. Click Browse to find and select the SLES 12 SP3 image to import (for example, SLE-12-SP3-Server-DVD-x86_64-GM-DVD1.iso).

    6. Click Import to upload the image to the OS-images repository.

    7. Wait for the import to complete. This might take a while.

  2. Download the custom software to the local system and import the files into the OS-images repository. For more information, see Importing custom software.
    1. Click the Software tab.

    2. Click the Import icon (Import icon).

    3. Click Local Import.

    4. Select SLES for the operating system.

    5. Click Browse to find and select the software file to import (for example, jre-8u151-linux-x64.tar.gz).

    6. Click Import to upload the file to the OS-images repository.

    7. Click the Import icon (Import icon) again.

    8. Click Local Import.

    9. Select SLES for the operating system.

    10. Click Browse to find and select the software- file to import (for example, eclipse-4.6.3-3.1.x86_64.tar.gz).

    11. Click Import to upload the file to the OS-images repository.

  3. Create a custom post-installation script, and import the file to the OS-images repository.
    Add commands to create a user to launch eclipse to this file, for example:
    echo "Create a user called lenovo..."
    egrep "lenovo" /etc/passwd >/dev/null
    pass=$(perl -e 'print crypt($ARGV[0], "password")' "Passw0rd")
    useradd -m -p $pass lenovo
    [ $? -eq 0 ] && echo "User has been created." || curl -X PUT
    --globoff #predefined.otherSettings.statusSettings.urlStatus# -H "Content-Type: application/json"
    -d '{"deployStatus":{"id":"46","parameters":["'"Could not create lenovo user"'"]}}'
    --cert #predefined.otherSettings.statusSettings.certLocation#/cert.pem
    --key #predefined.otherSettings.statusSettings.certLocation#/key.pem
    --cacert #predefined.otherSettings.statusSettings.certLocation#/ca-bundle.crt

    Add commands to install the software, for example:
    #Install Java for eclipse
    echo "Installing Java JRE 8...."
    rpm -ivh #predefined.otherSettings.deployDataAndSoftwareLocation#/jre-8u151-linux-x64.rpm

    #Install eclipse
    echo "Installing Eclipse IDE..."
    rpm -ivh #predefined.otherSettings.deployDataAndSoftwareLocation#/eclipse-4.6.3-3.1.x86_64.rpm

    Note that these commands use predefined macros for the HTTPS URL that XClarity Administrator uses for reporting status (predefined.otherSettings.statusSettings.urlStatus), for the Folder containing the certificates that are needed to access the urlStatus web service from the host OS on first boot (predefined.otherSettings.statusSettings.certLocation), and for the path to the extracted data and software files (predefined.otherSettings.deployDataAndSoftwareLocation).

    You can also add commands to send custom messages to the jobs log in XClarity Administrator, as shown in the sample file. For more information, see Adding custom status reporting to installation scripts.

    To import the custom installation script, complete these steps. For more information, see Importing custom installation scripts.

    1. Click the Installation Scripts tab.

    2. Click the Import icon (Import icon).

    3. Click Local Import.

    4. Select SLES for the operating system.

    5. Click Browse to find and select the post-installation script to import (for example, SLES_installSoftware_customScript.sh).

    6. Click Import to upload the file to the OS-images repository.

  4. Create a custom OS-image profile that includes the custom software and post-installation script. For more information, see Creating a custom OS-image profile.
    1. Click the OS Images tab.

    2. Select an OS-image profile to customize (for example, Basic).

    3. Click Create icon (Create icon) to display the Create Customized Profile dialog.

    4. On the General tab:

      1. Enter a name for the profile (for example, Custom SLES with software).

      2. Use the default value for the Custom data and file path field.

      3. Select None for the customization type.

      4. Click Next.

    5. On the Driver Options tab, click Next. The inbox device drivers are included by default.

    6. On the Software tab, select the software installation files (for example jre-8u151-linux-x64.tar.gz and eclipse-4.6.3-3.1.x86_64.tar.gz), and click Next.

    7. On the Installation Scripts tab, select the installation scripts (for example, SLES_installSoftware_customScript.sh), and click Next.

    8. On the Summary tab, review the settings.

    9. Click Customize to create the custom OS-image profile.

  5. Deploy the custom OS-image profile to the target servers. For more information, see Deploying an operating-system image.
    1. From the XClarity Administrator menu bar, click Provisioning > Deploy OS Images to display the Deploy Operating System: Deploy OS Images page.

    2. For each target server:

      1. Select the server.

      2. Click Change Selected > Network Settings, and specify the hostname, IP address, DNS, MTU and VLAN settings for the server.

        Tip
        VLAN settings are available only when VLAN mode is set in Global Settings > IP Assignment > Use VLANs.
      3. Select the custom OS-image profile (for example, <base_OS>|<timestamp>_Custom SLES with software) from the drop-down list in the Image to Deploy column

        Note
        Ensure that all target servers use the same custom profile.
      4. Select the preferred storage location where you want to deploy the operating system image from the Storage column.

        Note
        To ensure that operating-system deployments are successful, detach all storage from the managed server except the storage that is chosen for the operating-system deployment.
      5. Verify that the deployment status for the selected server is Ready.

    3. Select all target servers, and click the Deploy image icon (Deploy image icon) to initiate the operating-system deployment.

    4. On the Summary tab, review the settings.

    5. Click Deploy to deploy the operating system.