Unsupported content

   

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Creating a system package in BMC Server Automation

In order to perform an unattended installation of an operating system, you must create a system package in BMC Server Automation for each server configuration you want to install.

Creating and defining a system package

In order to perform an unattended installation of an operating system, create a system package (or modify an existing package) in BMC Server Automation for each server configuration you want to install.

A system package not only contains all the instructions needed to install an operating system over the network, it can also run jobs that install software and configure a machine for a particular purpose. Consequently, you may want to create a different system package for each type of server you want to provision rather than just creating one system package for each type of operating system you want to install. For example, you might want to create a system package for a web server running Microsoft Windows 2008 and IIS. You could create another system package for a database server running Linux 8.0 and Oracle.

A system package uses installation files for a specific operating system. Consequently, system packages for the various types of Windows, Linux, ESX, Solaris, AIX, and HP-UX operating systems are not interchangeable. Create separate system packages for servers running different operating systems.

Tip

When you define a system package, you must provide many categories of information. If you are creating multiple system packages with similar settings, you may want to create one system package and copy and paste that package to create another system package, adjusting settings as necessary.

To enable successful publishing of system packages for BMC Cloud Lifecycle Management, store the packages in the CSM_OS_Packages subfolder of the Depot folder in the navigation tree of the BMC Server Automation Console (Depot > CSM_OS_Packages): 

To create and define a system package

  1. Using BMC Server Automation, perform these initial steps necessary to create a system package.
    The system package is created and opens in the content editor.
  2. Define the system package by specifying all of its settings.
    1. See System package panels (OS specific) for detailed instructions about supported operating systems.
    2. Review special considerations when defining system packages to determine if these instructions apply to your system package.

      Note

      When defining a system package, note the presence of the Select Property icon next to various input fields. Whenever you see this icon next to an input field, it indicates that you can insert a parameter that refers to a local property that supplies the value for the field.

  3. When entering or modifying parameters for the system packages, keep in mind these guidelines for BMC Cloud Lifecycle Management (Windows or Linux operating system):
    • Under the Basic Config tab, enter ??NAME?? in the Computer name field. When the system package is selected at provisioning time, BMC Cloud Lifecycle Management supplies the hostname of the server to be provisioned or the IP address (if configured to do so).
    • In the Local Properties tab, specify the name of the PXE datastore instance for the DATASTORE variable. Use the same format convention: CSM Datastore - <name of pod>.
  4. When you finish defining the system package, select File > Save.


Special considerations when defining system packages

Click any of the following tabs to review OS-specific considerations when defining system packages.

    BMC Cloud Lifecycle Management cannot use Linux system packages with customized kickstart entries, which are defined under the Kickstart Entries tab. Instead, you can use the 'Additional entries for the kickstart file' section of the Kickstart Entries tab to append new entries for the system package.

    When provisioning multiple network interface cards/addresses on Linux systems, add local properties to the system package using the following formats.

    Note

    Exclude the first address on the first network interface card. The first network interface card is assumed to be used for network booting.

    Address

    Format

    Primary address on a network interface card,
    where <x> is the NIC number, beginning with 0

    ETH<x>_MAC_ADDRESS
    ETH<x>_MAC_ADDRESS_CD
    ETH<x>_BOOTPROTO
    ETH<x>_IPADDR
    ETH<x>_NETMASK
    ETH<x>_GATEWAY

    For supplemental IP addresses on a network interface card,
    where <y> is the IP address, beginning with 1

    ETH<x>_<Y>_IPADDR
    ETH<x>_<Y>_NETMASK
    ETH<x>_<Y>_GATEWAY

    The following example is for kickstart purposes and is added to the Additional entries for the kickstart file section. It assumes that you are provisioning for a Linux system package with more than one network interface and that the first network interface card has just one address and does not need to be covered. It also assumes that the second network interface card has two addresses on it.

    echo "DEVICE=eth1" > /etc/sysconfig/network-scripts/ifcfg-eth1
    echo "HWADDR=??ETH1_MAC_ADDRESS_CD??" >> /etc/sysconfig/network-scripts/ifcfg-eth1
    echo "BOOTPROTO=??ETH1_BOOTPROTO??" >> /etc/sysconfig/network-scripts/ifcfg-eth1
    echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/ifcfg-eth1
    echo "IPADDR=??ETH1_IPADDR??" >> /etc/sysconfig/network-scripts/ifcfg-eth1
    echo "NETMASK=??ETH1_NETMASK??" >> /etc/sysconfig/network-scripts/ifcfg-eth1
    echo "GATEWAY=??ETH1_GATEWAY??" >> /etc/sysconfig/network-scripts/ifcfg-eth1
    
    echo "DEVICE=eth1:0" > /etc/sysconfig/network-scripts/ifcfg-eth1:0
    echo "HWADDR=??ETH1_1_MAC_ADDRESS??" >> /etc/sysconfig/network-scripts/ifcfg-eth1:0
    echo "BOOTPROTO=??ETH1_BOOTPROTO??" >> /etc/sysconfig/network-scripts/ifcfg-eth1:0
    echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/ifcfg-eth1:0
    echo "IPADDR=??ETH1_1_IPADDR??" >> /etc/sysconfig/network-scripts/ifcfg-eth1:0
    echo "NETMASK=??ETH1_1_NETMASK??" >> /etc/sysconfig/network-scripts/ifcfg-eth1:0
    echo "GATEWAY=??ETH1_1_GATEWAY??" >> /etc/sysconfig/network-scripts/ifcfg-eth1:0

    BMC Cloud Lifecycle Management cannot use Windows system packages with customized unattended entries, which are defined under the Unattended Entries tab. Instead, use the Additional Unattend Entries section of the Unattended Entries to replace existing or add new entries for the system package.

    Follow these steps to add the XML entries to the system package:

    1. Under Additional Unattend Entries, click the Plus sign.
    2. In the top-left panel, expand the Specialize listing, and select the Microsoft-Windows-TCPIP node.
    3. Display the node by specifying a static IP address (which the system ignores).
    4. In the Add/Replace XML Component section, paste the following XML code:

      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="neutral" name="Microsoft-Windows-TCPIP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS">WINDOWS_UNATTEND </component>

    For SUSE Linux Enterprise System (SLES) 11, 64-bit, with a DHCP IP configuration: Create a Red Hat Linux system package by defining settings for the package as described here. In addition, make the following modifications:

    • Basic Config tab — Set AutoYaST network device to eth0.
    • Post-Install Configuration tab — Add the following script:

      echo "127.0.0.1 ??HOST_NAME?? localhost.localdomain" >> /etc/hosts
      echo " * rw,user=root" > /usr/lib/rsc/exports
      /etc/init.d/rscd stop
      /etc/init.d/rscd start
      echo "DEVICE=eth1" > /etc/sysconfig/network/ifcfg-eth1
      echo "HWADDR=??ETH1_MAC_ADDRESS_CD??" >> /etc/sysconfig/network/ifcfg-eth1
      echo "BOOTPROTO=??ETH1_BOOTPROTO??" >> /etc/sysconfig/network/ifcfg-eth1
      echo "ONBOOT=yes" >> /etc/sysconfig/network/ifcfg-eth1
      echo "STARTMODE=auto" >> /etc/sysconfig/network/ifcfg-eth1
      
    • Local Properties tab — Add the following local properties with a property type of String:
      • ETH1_BOOTPROTO
      • ETH1_MAC_ADDRESS_CD

    For SLES 11, 64-bit, with a static IP configuration: Create a Red Hat Linux system package by defining settings for the package as described here. In addition, make the following modifications:

    • Post-Install Configuration tab — Add the following script:

      echo "127.0.0.1 ??HOST_NAME?? localhost.localdomain" >> /etc/hosts
      echo " * rw,user=root" > /usr/lib/rsc/exports
      /etc/init.d/rscd stop
      /etc/init.d/rscd start
      echo "DEVICE=eth1" > /etc/sysconfig/network/ifcfg-eth1
      echo "HWADDR=??ETH1_MAC_ADDRESS_CD??" >> /etc/sysconfig/network/ifcfg-eth1
      echo "BOOTPROTO=??ETH1_BOOTPROTO??" >> /etc/sysconfig/network/ifcfg-eth1
      echo "ONBOOT=yes" >> /etc/sysconfig/network/ifcfg-eth1
      echo "STARTMODE=auto" >> /etc/sysconfig/network/ifcfg-eth1
      echo "IPADDR=ETH1_IPADDR" >> /etc/sysconfig/network/ifcfg-eth1
      echo "NETMASK=ETH1_NETMASK" >> /etc/sysconfig/network/ifcfg-eth1
      echo "GATEWAY=ETH1_GATEWAY" >> /etc/sysconfig/network/ifcfg-eth1
      
    • Local Properties tab — Add the following local properties with a property type of String:
      • ETH1_BOOTPROTO
      • ETH1_GATEWAY
      • ETH1_IPADDR
      • ETH1_MAC_ADDRESS_CD
      • ETH1_NETMASK

    For Oracle Enterprise Linux (OEL) 6.0, 64-bit, create a Red Hat Linux system package by defining settings as described here. In addition, make the following modifications:

    • Disk Partition tab — Specify the following partitions:

      Mount Point

      Type

      Size (MB)

      Fill Unused Space

      N/A

      swap

      1024

      false

      /

      ext4

      5000

      false

      /boot

      ext2

      2048

      false

    • Basic Config tab — For Kickstart network device, enter em1. Without this value, server provisioning fails.
    • Computer Settings tab — Select the following values:
      • Keyboard — us
      • Locale — English (USA english-support)
    • OS Components tab — Select Base System.
    • Network tab — Select Obtain an IP address automatically.
    • Kickstart Entries tab — Add the following additional entries for the kickstart file:

      echo "DEVICE=eth1" > /etc/sysconfig/network-scripts/ifcfg-eth1
      echo "HWADDR=??ETH1_MAC_ADDRESS_CD??" >> /etc/sysconfig/network-scripts/ifcfg-eth1
      echo "BOOTPROTO=??ETH1_BOOTPROTO??" >> /etc/sysconfig/network-scripts/ifcfg-eth1
      echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/ifcfg-eth1
      echo "STARTMODE=auto" >> /etc/sysconfig/network-scripts/ifcfg-eth1
      echo "IPADDR=ETH1_IPADDR" >> /etc/sysconfig/network-scripts/ifcfg-eth1
      echo "NETMASK=ETH1_NETMASK" >> /etc/sysconfig/network-scripts/ifcfg-eth1
      echo "GATEWAY=ETH1_GATEWAY" >> /etc/sysconfig/network-scripts/ifcfg-eth1
      
    • Post-Install Configuration tab — Enter the following values:
      • IP address??APP_SERVER_IP??
      • Port — 9131
      • Post-Install Scriptecho "* rw,user=root" > /usr/lib/rsc/exports
    • Local Properties tab — Add the following local properties with a property type of String:
      • ETH1_BOOTPROTO
      • ETH1_GATEWAY
      • ETH1_IPADDR
      • ETH1_MAC_ADDRESS_CD
      • ETH1_NETMASK

    After you create the system package

    After creating a system package, add a Network Shell (NSH) script called CSM_Delayed_Reboot to the Depot subfolder CSM_Scripts.

    The script should look similar to the following example:

    Type 1 (Execute the script separately against each target host.)

    Script:
    {{sleep 60))
    ((nexec $1 reboot}}

    Parameter: hostname, default value TARGET.NAME

    Where to go from here

    Creating a BMC Server Automation Deploy Job or an application component template

    Related topics

    Walkthrough: Build a simple BLPackage to distribute content (in the BMC Server Automation documentation)

    Walkthrough: Packaging applications with BLpackages (in the BMC Server Automation documentation)

    Building service blueprints (contains a video about creating an Apache application package)

    This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

    Comments