Sun Management Center Change Manager 1.0 Administration Guide

- Previous: Chapter 3 Installing, Configuring, and Accessing the Change Manager Server (Tasks)
- Next: Chapter 5 Installing Solaris Flash Archives on Managed Hosts (Tasks)

# Chapter 4 Creating a Deployable Solaris Flash Archive (Tasks)

This chapter describes how to create customizable Solaris Flash archives. Such archives are suitable for deployment by Change Manager.

The following topics are covered in this chapter:

- Creating Software Stacks

- Installing the Sun Management Center and Change Manager Agents on a Master System (Task Map)

- Installing the Sun Management Center and Change Manager Agents on a Master System

- Unconfiguring Software Applications

- Creating the Solaris Flash Archive From the Master System

- Creating a Customizable Solaris Flash Archive

# Creating Software Stacks

The term hardware and software integration encompasses the combined tasks of installing and configuring a system. Integration means several things:

- Installing and configuring a software product correctly

- Binding the software product to a hardware platform

- Ensuring that several software products correctly function and interoperate with each other

The result of integrating several software products is referred to as an integrated software stack or simply a software stack.

Change Manager imports, manages, and deploys software stacks that are stored as Solaris Flash archives. Change Manager deploys these archives to managed hosts. The per-client customization is achieved through the use of archive parameters and custom JumpStart finish scripts that are included in the Solaris Flash archive.

The system that is used as the prototype from which the software stack is created is called the master system or reference system.

The following sections describe how to create software stacks on master systems.

Note -

Do not create a Solaris Flash archive on a master system that is a Sun Management Center server or a Change Manager server. Sun Management Center cannot be deployed by using the Solaris Flash technology.

## Choosing the Master System

Before you begin the installation of Change Manager software, see Master System Requirements to understand the hardware and software requirements for the master system.

A master system is the prototype for other systems that will run the software staged on this master. Therefore, choose a master system that closely matches the hardware configurations of the managed hosts it represents. Ideally, you stage the software on an identical system to avoid software discrepancies caused by hardware differences (such as missing device drivers). However, choosing a master system that is similar to the managed hosts is sufficient.

You can create a Solaris Flash archive on one platform that is deployable to a range of other similar platforms. For version 1.0 of Change Manager, this range is restricted to platforms that use the same Sun Management Center agent module. These agents can only be installed on the platform type for which they are intended. For instance, you cannot install a Netra agent module on a Sun EnterpriseTM 4500 system. Therefore, an archive created on the Sun Enterprise 4500 system cannot provide full functionality on a Netra system.

Current Sun Management Center agent modules are:

- Desktop (Sun BladeTM 100, Sun Blade 1000, Ultra 1, Ultra 10, Ultra 2, Ultra 30, Ultra 450, Ultra 5, Ultra 60, Ultra 80)

- Netra (T1, T4, T/112x, X1)

- Workgroup Enterprise Server (220, 250, 420, 450, 280, 480, 880, 10, 150, 2)

- Sun Enterprise 3000-6500 Servers

- Sun Fire (3800, 4800, 4810, 6800)

- Sun Fire 15000

You must also consider hardware architecture when choosing a master system. Hardware independence is restricted by both instruction set and platform architecture. The master system and the managed hosts must have the same instruction set (namely, SPARC®) and platform architecture (namely, `sun4u`). Note that SPARC is the only processor type that Change Manager currently supports. Also note that all current SPARC products are `sun4u`.

If you plan to deploy the Solaris Flash archive to a range of platforms, or if the identical hardware is unavailable, ensure that all software that is required to support the various hardware configurations is installed on the master system. This software must be installed on the master system before you create the Solaris Flash archive. For more information, see Addressing Hardware Differences Between a Master System and Managed Hosts.

## Installing Software on the Master System

Begin to create the software stack by installing software on the master system. First, install the Solaris operating environment and Solaris patches on the master system. Then, install the other software applications you want.

Note -

Not all software applications can be deployed by using Solaris Flash technology. For example, Sun Management Center software retains instance-specific configuration information that cannot be unconfigured for redeployment. See the Solaris 9 Installation Guide for information about the limitations of this technology with respect to add-on software applications.

## Addressing Hardware Differences Between a Master System and Managed Hosts

The master system might not match the hardware configuration of the other systems on which the Solaris Flash archive might be deployed. In such cases, ensure that the master system includes software to support all hardware. To support all hardware, install the Entire Distribution plus OEM Support package cluster (`SUNWCXall`) on the master system. You must also install any third-party drivers or specialized device drivers on the master system.

For example, you select a PCI-based master system to create software stacks. Driver software for other buses, such as SBUS, are not installed by default if a package cluster other than `SUNWCXall` is installed. Consequently, software stacks you build on this master system will not have the SBUS drivers available. As a result, managed hosts that have SBUS hardware will not have the appropriate software available to support the hardware.

To avoid this situation, do one or more of the following:

- Choose a master system that is identical or almost identical to the managed hosts.

- Include all possible Solaris driver software on the master system by installing all of the Solaris software.

- Select the required hardware support while installing Solaris software. Use either the custom JumpStart `package add` keywords or use the interactive installer's package customization feature.

- Add any missing software to the master system by using a custom JumpStart finish script after Solaris software is installed.

# Installing the Sun Management Center and Change Manager Agents on a Master System (Task Map)

The next step in creating a deployable and manageable Solaris Flash archive is to install the Sun Management Center and Change Manager agents on the master system. These agents enable communication between the Change Manager server and the managed hosts running the software stack you are now building. The agents are installed on the master system and incorporated into the Solaris Flash archive.

Note -

These procedures assume that you already have a Change Manager server installed and configured. See Chapter 3, Installing, Configuring, and Accessing the Change Manager Server (Tasks).

The following table identifies the tasks for installing the Sun Management Center and Change Manager agents on the master system. Perform the tasks in the order shown.

Task | Description | For Instructions
--- | --- | ---
1. Install the Sun Management Center 3.0 agent software on a master system. | Install the Sun Management Center 3.0 Update 4, Patch 6 agent software on the master system you use to create a Solaris Flash archive. | See How to Install Sun Management Center 3.0 Update 4 Agent Software. If Sun Management Center is already installed, ensure that the appropriate packages are installed. See Change Manager Server Requirements. Also see the Sun Management Center 3.0 Software Installation Guide.
2. Install the Change Manager 1.0 agent software on a master system. | Install the Sun Management Center Change Manager 1.0 agent software on the master system you use to create a Solaris Flash archive. | See How to Install Change Manager Agent Software.

# Installing the Sun Management Center and Change Manager Agents on a Master System

Prior to creating a Solaris Flash archive on the master system, you must first install Sun Management Center 3.0 Update 4 agent software. Then, you must install the Change Manager 1.0 agent software.

## How to Install Sun Management Center 3.0 Update 4 Agent Software

Before you begin the installation of Change Manager software, see Master System Requirements to understand the hardware and software requirements for the master system.

Caution -

The Sun Management Center platform add-ons you install on the master system become part of the Solaris Flash archive. However, only the Advanced Monitoring, Advanced Services, System Management, and Change Manager add-ons are configured on managed hosts you install using this archive.

This procedure is very similar to the one used to install Sun Management Center on the Change Manager server. This procedure describes the different steps that result in the installation of only the Sun Management Center agent.

1. Become superuser.

2. Run the `/cdrom/cdrom0/sbin/es-inst` command.

3. Specify which of the three layers to install.

   1. Type `n` at the Server Layer prompt and at the Console Layer prompt.

   2. Type `y` at the Agent Layer prompt to install it.

   3. Type `n` for all other add-on modules, including the Premier Management Applications add-on, except for the add-on for the platform type of the master system (Desktop, Netra, WGS, and so on).

      You are only given the opportunity to install agent platform support for the platform type of the master system.

4. Specify the agent seed to use.

       Please enter the seed to generate keys:

   At this prompt, specify the same seed you used to install the Change Manager server.

   Note that this step is important only if you want the master system to be managed by the Change Manager server. When the Solaris Flash archive created from this master system is deployed, the seed is discarded in favor of the seed that was used to install the Change Manager server deploying the archive.

5. Specify the host name of the Sun Management Center server.

       Please enter the Sun Management Center Server Hostname:

   This step is only important if you want the master system to be managed by the Change Manager server. When the Solaris Flash archive created from this master system is deployed, the host name is discarded in favor of the actual host name of the Change Manager server deploying the archive.

6. Install Sun Management Center 3.0 Update 4 Patch 6 on the Change Manager server by typing `n` at the following prompt:

       Sun Management Center setup complete.
       Do you want to start Sun Management Center agent now [y|n|q]

   When the installation procedure completes, you must ensure that patch 110938-06, or later, is installed on the master system. See How to Install the Sun Management Center 3.0 Jumbo Patch for Solaris 8 and Solaris 9 on the Change Manager Server.

## How to Install Change Manager Agent Software

1. Become superuser.

2. Run the `/cdrom/cdrom0/sbin/cminst` command.

   The `cminst` command determines whether the Sun Management Center server or agent software has been installed. If only the Sun Management Center agents have been installed, `cminst` installs only the Change Manager agent package. No prompts appear.

# Unconfiguring Software Applications

Just as some applications are configured using specific information and procedures, some applications are uninstalled and unconfigured using specific procedures. For example, you might remove host-specific information, such as host names, from configuration files to unconfigure an application.

Be sure to unconfigure software applications before you create the Solaris Flash archive. Then, the software stack is generalized and does not contain, for example, host-specific information about the master system.

Note -

You might not be able to unconfigure or remove the host-specific information created by an application. In such cases, you cannot use Solaris Flash technology to deploy the application. Some software stores configuration information outside of UNIX file systems. Such software does not always configure correctly on managed hosts that are installed with Solaris Flash archives. An example is Sun Management Center, which stores host-specific information in an Oracle database. Because its host-specific information cannot be removed, Sun Management Center cannot be deployed using the Solaris Flash feature.

Configuration information that is host-specific and instance-specific can be provided at deployment time by using archive parameters and custom JumpStart finish scripts. This is described in Creating a Customizable Solaris Flash Archive.

Note -

After you install the Solaris Flash archive on a managed host, some host-specific files are deleted and re-created for the managed host. The installation program uses the sys-unconfig(1M) command and the sysidtool(1M) command to delete and re-create the host-specific network configuration files. The files that are re-created include such files as `/etc/hosts`, `/etc/defaultrouter`, and `/etc/defaultdomain`.

## Other Considerations

Caution -

Do not configure boot environments on the master system by manually using the Solaris Live Upgrade commands lu(1M) and lucreate(1M)). Change Manager uses Solaris Live Upgrade tools to manage boot environments if they are specified in shared profiles and in host properties for managed hosts.

Do not provide runtime data for applications after installation on the master system. For example, do not create user data for a database server or an LDAP server after installing the database management software.

Note -

Depending on the application, you might need to provide mechanisms for initializing this data when the managed host first boots.

# Creating the Solaris Flash Archive From the Master System

Create the Solaris Flash archive of the integrated software stack after installing and configuring the software on the master system.

Use the flarcreate(1M) command to create the Solaris Flash archive.

For example, to create a Solaris Flash archive named `Netra082202.apache.flar`, type the following:

    # /usr/sbin/flar create -n apacheServer -u ic_cfgparams \
      -c /flarchive/Netra082202.apache.flar

The `-n` option assigns its value, `apacheServer`, to the `content_name` keyword in the Solaris Flash archive. You can view archive keywords by using the browser interface or the command-line interface. See How to View or Modify File Properties (Web Browser) or How to View File or Folder Properties (Command Line).

`/flarchive` is the target directory name in which the Solaris Flash archive is created. The example command line creates an archive named `Netra082202.apache.flar` in the target directory.

Archive parameters must be described in a text file called `ic_cfgparams`. The file must be located in the directory from which the `flar create` command is invoked. This file must also be specified as a "user-defined section" of the Solaris Flash archive by using the `-u` option to the `flar create` command.

Note -

Ensure that the target directory has sufficient disk space to accommodate the Solaris Flash archive.

Import this archive to the Change Manager repository for deployment to managed hosts.

# Creating a Customizable Solaris Flash Archive

An archive might require that the user deploying it supply the information required to customize the archive for its production environment. To accomplish this, when you create the archive, include a special section that describes the required parameters, archive parameters. Also include custom JumpStart finish scripts to process the supplied values and modify the system accordingly.

Archive parameters are `name=value` pairs that are associated with the integrated software stack. These parameters provide the data to be processed by the finish scripts that are invoked to customize the software stack for the managed host. Custom JumpStart finish scripts are written by the stack creator. These scripts perform host-specific customizations on the managed host as part of the deployment process. Archive parameters obtain host-specific values through the Change Manager interface.

## Creating the Archive Parameters File

An archive parameters file specifies application-specific parameters and default values. The archive parameters file contains entries in the following format:

- Parameter name (`name`)

- Label to be used by the browser interface (`label`)

- Optional default value (`default`)

The archive parameters file can be created by any text editor capable of saving files as plain ASCII text.

Following is a simple example of an archive parameter file:

    name=telnet label="Do you want to enable telnet?" default=yes
    name=ftp label="Do you want to enable ftp?" default=yes
    name=finger label="Do you want to enable finger?" default=yes

Archive parameters must be described in a text file called `ic_cfgparams`. The file must be located in the directory from which the `flar create` command is invoked. This file must also be specified as a "user-defined section" of the Solaris Flash archive by using the `-u` option to the `flar create` command.

## Processing the Archive Parameters File With Finish Scripts

As the final step in software stack deployment, Change Manager runs the finish scripts contained in the Solaris Flash archive. Change Manager provides a driver script that executes all user-supplied finish scripts that it finds in the `/etc/ichange.d` directory of the newly deployed software stack. This driver script provides access to the values specified in the archive parameters file, as supplied by the user.

Following is an example of a finish script that processes the archive parameters file created in the previous section:

    #! /bin/sh

    case `cmgetprop telnet` in
    [Nn]*)  telnet='#'      ;;
    *)      telnet=         ;;
    esac

    case `cmgetprop ftp` in
    [Nn]*)  ftp='#'         ;;
    *)      ftp=            ;;
    esac

    case `cmgetprop finger` in
    [Nn]*)  finger='#'      ;;
    *)      finger=         ;;
    esac

    ed $SI_ROOT/etc/inetd.conf <</
    /^#*telnet/s/^#*/$telnet/
    /^#*ftp/s/^#*/$ftp/
    /^#*finger/s/^#*/$finger/
    w
    q
    /

    exit 0

When two or more finish scripts are included in the `/etc/install.d` directory, ensure that the `ic_cfgparams` file contains all of the parameters that the scripts process.

Store the finish scripts in the `/etc/ichange.d` directory prior to creating the Solaris Flash archive of the master system. The finish scripts must be part of the archive. If you have more than one finish script, they are processed in lexical order by file name.

Note -

The finish scripts must have permissions set to 755. If the scripts are not executable, then the Solaris Flash archive is not customizable.

Finish scripts use an environment variable called `$SI_ROOT` and a `$PATH` that includes the `cmgetprop` command.

- `SI_ROOT` - This environment variable specifies the mount point of the file system being installed or updated.

  For example, `$SI_ROOT/etc/passwd` points to the password file on the boot environment currently being installed.

- `cmgetprop` - This tool is used by finish scripts to determine the current value of an archive parameter. See cmgetprop(1MCM).

  The following example is based on the `ic_cfgparams` file described in Creating the Archive Parameters File. You might use `cmgetprop` as follows:

      enable_telnet=`cmgetprop telnet`

  This command line assigns the value associated with the `telnet` parameter to the shell variable `enable_telnet`.

  The value of a parameter might be the default specified in the archive parameters description in `ic_cfgparams`, might come from a shared profile associated with the managed host, or might come from the host properties of the managed host. You can supply parameter values by using the browser interface. Modify values on the shared profile property page or the managed host property page. You can also supply parameter values by using the `changemgr fileset` and `changemgr hostset` commands of the command-line interface.

## Using `flar create` to Create a Customizable Solaris Flash Archive

Use the flarcreate(1M) command to create the Solaris Flash archive. The `-u` option includes the archive parameter file in the user section of the Solaris Flash archive.

For example, to create a customizable Solaris Flash archive named `082202.apache.flar`, type the following:

    # /usr/sbin/flar create -n apacheServer -u ic_cfgparams \
    -c /flarchive/082202.apache.flar

`/flarchive` is the target directory name in which the Solaris Flash archive is created. The example command line creates an archive named `082202.apache.flar` in the target directory.

- Previous: Chapter 3 Installing, Configuring, and Accessing the Change Manager Server (Tasks)
- Next: Chapter 5 Installing Solaris Flash Archives on Managed Hosts (Tasks)

- © 2010, Oracle Corporation and/or its affiliates