Skip to main content

Deploying SLES 12 SP3 with a configurable locale and NTP servers

This scenario installs the SLES 12 SP3 operating system with either English, Brazilian, or Japanese enabled for the keyboard and operating-system locales. It also configures the IP address for up to three NTP servers. A custom OS-image profile is used that includes an unattend file (with predefined and custom macros) and a configuration-settings file for selecting the locales and NTP-server settings. This custom profile can be selected on the Deploy OS Images page. Then, the locales and NTP-server settings can be selected on the Custom Settings tab. The specified values are substituted for the custom macros contain in the custom unattend file, and the SLES autoyast installer uses those values in the unattend file to configure the operating system.

Before you begin

This scenario uses the following sample files.

Procedure

To deploy SLES 12 SP3 using custom OS-image profile, complete the following steps.

  1. Download the base SLES 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.

  2. Create a custom configuration-settings file, and import the file to the OS-images repository.

    The configuration-settings file is a JSON file that describe the data that needs to be gathered dynamically during the OS deployment process. For this scenario, we want to specify the operating-system locale (en_US, ja_JP, pt_BR), the keyboard locale (english-us, Japanese, or portugese-br), and up to three NTP server IP addresses to use for each OS deployment. For more information about creating a configuration-settings file, see Custom macros.

    To import the configuration-settings file, complete these steps. For more information, see Importing custom configuration settings.

    1. Click the Configuration Files 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 configuration-settings file to import (for example, SLES_locale_customConfig.json).

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

      Note
      When you import a custom configuration-settings file, XClarity Administrator generates custom macros for each setting in the file. You can add those macros to the unattend file. During OS deployment, the macros are replaced with actual values.
  3. Modify the SLES unattend file to specify dynamic values for the operating-system locale, keyboard locale, and NTP server IP addresses, and then import the custom file to the OS-images repository. For more information, see Importing custom unattend files.
    Just after the <profile> tag, add the NTP server and networking information. The following example includes tags for two NTP servers. The IP addresses will be added as macros in a later step.
    <ntp-client>
    <configure_dhcp config:type="boolean">false</configure_dhcp>
    <peers config:type="list">
    <peer>
    <address></address>
    <initial_sync config:type="boolean">true</initial_sync>
    <options></options>
    <type>server</type>
    </peer>
    <peer>
    <address></address>
    <initial_sync config:type="boolean">true</initial_sync>
    <options></options>
    <type>server</type>
    </peer>
    </peers>
    <start_at_boot config:type="boolean">true</start_at_boot>
    <start_in_chroot config:type="boolean">true</start_in_chroot>
    </ntp-client>
    In the <general> section, add the OS and keyboard locale info, as shown in the following example. The keyboard and operating system locale settings will be added as macros in a later step.
    <keyboard>
    <keymap></keymap>
    </keyboard>
    <language></language>
    Note
    When you use a custom unattend file, XClarity Administrator does not provide many of the normal convenience features that you get when you use a predefined unattend file. For example, the targets <DiskConfiguration>, <ImageInstall>, <ProductKey>, and <UserAccounts> for Administrator, <Interfaces> for networking, and <package> list for installation features must be specified in the custom unattend file that is being uploaded.

    To import the custom unattend file, complete these steps.

    1. Click the Unattend Files 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 unattend file to import (for example, SLES_locale_customUnattend.xml).

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

  4. Associate the custom unattend file with the custom configuration-settings file, and add the required predefined and custom macros (settings) from the configuration-settings file to the unattend file. For more information, see Associating an unattend file with a configuration settings file and Injecting predefined and custom macros to an unattend file
    Tip
    You can optionally the custom unattend file with the custom configuration-settings file and add macros when importing the unattend file.
    1. From the Unattend Files tab, select the custom attend file (for example, SLES_locale_customUnattend.xml).

    2. Click the Associate a Configuration File icon (Associate a configuration file icon) to display the Associate an Unattend File dialog.

    3. Select the configuration-settings file to associate with the unattend file (for example, SLES_locale_customConfig).

    4. Add the required predefined macros to the unattend file.

      1. Select Predefined from the Available Macros drop-down list.

      2. Place the cursor in the unattend file anywhere after line 1 (after the <xml> tag).

      3. Expand the predefined > unattendSettings list in the list of available predefined macros.

      4. Click the preinstallConfig and postinstallConfig macros to add the macros.

      For example:

      <?xml version="1.0"?>
      <!DOCTYPE profile SYSTEM "/usr/share/YaST2/include/autoinstall/profile.dtd">
      <strong className="ph b">#predefined.unattendSettings.preinstallConfig#
      #predefined.unattendSettings.postinstallConfig#</strong>
      <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
    5. Add the custom macro for specifying the operating-system locale.

      1. Select Custom from the Available Macros drop-down list

      2. Place the cursor after the <language> tag.

      3. Expand server-settings > node in the list of available custom macros, and then click locale to add the OS-locale macro.

      For example:

      <language>#server-settings.node.locale#</language>
    6. Add the custom macro for specifying the keyboard locale.

      1. Place the cursor after the <keymap> tag.

      2. Expand server-settings > node in the list of available custom macros, and then click keyboardLocale to add the keyboard-locale macro.

      For example:

      <keyboard>
      <keymap>#server-settings.node.keyboardLocale#</keymap>
      </keyboard>
    7. Add the custom macro for specifying the NTP server IP addresses.

      In this scenario, the custom configuration-settings file uses a template to specify zero to three NTP servers. When using templates in the configuration-settings file, macros that are associated with template are not displayed in the Associate an Unattend File dialog. Instead, you must manually edit the unattend file and add the macros and appropriate tags.

      For example, to include three NTP servers, you would add the following tags and macros to the unattend file. These tags and macros already exist in the example unattend file for this scenario.

      <ntp-client>
      <configure_dhcp config:type="boolean">false</configure_dhcp>
      <peers config:type="list">
      <peer>
      <address>#server-settings.ntpserver1#</address>
      <initial_sync config:type="boolean">true</initial_sync>
      <options></options>
      <type>server</type>
      </peer>
      <peer>
      <address>#server-settings.ntpserver2#</address>
      <initial_sync config:type="boolean">true</initial_sync>
      <options></options>
      <type>server</type>
      </peer>
      <peer>
      <address>#server-settings.ntpserver3#</address>
      <initial_sync config:type="boolean">true</initial_sync>
      <options></options>
      <type>server</type>
      </peer>
      </peers>
      <start_at_boot config:type="boolean">true</start_at_boot>
      <start_in_chroot config:type="boolean">true</start_in_chroot>
      </ntp-client>
    8. Click Associate to bind the files together and save the changes to the unattend file.

  5. Create a custom OS-image profile that includes the custom configuration-settings and unattend files. 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 for OS and keyboard locale and NTP server).

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

      3. Select Associated unattend and configuration-settings files 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, click Next.

    7. On the Unattend Files tab, select the unattend file (for example, SLES_locale_customUnattend.xml), and click Next.

      The associated configuration-settings file is automatically selected.

    8. On the Installation Scripts tab, click Next.

    9. On the Summary tab, review the settings.

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

  6. Deploy the custom OS-image profile to the target server. 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 for OS and keyboard locale and NTP server) 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 Custom Settings tab, click the Unattend and Configuration Settings subtab, and select the custom configuration-settings file (for example, SLES_locale_customConfig).

      Note
      The associated custom unattend file is selected automatically.

      Illustrates the Deploy OS Images dialog for selecting the custom configuration file.
    5. On the Server-Specific Settings subtab, select the target server, OS locale, and keyboard locale.

    6. On the Common Settings subtab, click Add to specify the IP address of up to three NTP servers.

    7. On the Summary tab, review the settings.

    8. Click Deploy to deploy the operating system.