Sun Update Connection - Enterprise 1.0 User's Guide

Understanding Inventories

Sun Update Connection – Enterprise provides access to the inventory of certified components (COs) in the universal server. Each supported distribution has its own knowledge base inventory.

You also have access to the inventory of every managed host, both COs and Non-Certified Components (NCOs). The agent on a host scans the machine and brings you an inventory of all installed components.

You can view the inventory of a managed host within the inventory of the universal server, quickly seeing what can be upgraded, installed, replaced, or uninstalled.

The inventory is displayed in the Components list layout. The levels are:

An inventory can contain different types of packages. The types are:

Table 8–1 Inventory Component Settings on Packages (RPM, PKG, NCO, Local File)

Setting 

Result if Package Installed 

Result if Package Not Installed 

Required 

Nothing is done. 

DR finds solution to install it. 

Not Allowed 

DR finds solution to uninstall it. 

Nothing is done. 

Upgrade 

If there is a newer version for an installed package, the package is upgraded. 

If there is more than one version newer than this package, the most cost-effective version is chosen. 

Nothing is done. 

Table 8–2 Inventory Component Settings on Categories and Package Groups

Setting 

Result if Packages Installed 

Result if Packages Not Installed 

Required 

If at least one package is installed, nothing is done. 

If no package in category/group is installed, the one that is most cost-effective is installed. 

Not Allowed 

All packages within category/group are uninstalled. 

If no package in category/group is installed, nothing is done. 

Upgrade 

All installed packages within category/group are upgraded if newer versions exist. 

Nothing is done. 

For example, you want to install the cURL utility on your FTP servers. You select the FTP group in the Hosts list. In the Components list, you select curl and apply the Required setting to it. You right-click the action and choose Run on Selected Hosts. The job installs curl on the FTP hosts that do not have it yet. It also makes sure that a list of dependent components is installed.

You can see the list of dependencies. Open the Inventory window, right-click the curl version you want to install and choose Details. The Dependencies tab of the Component Information window lists the components that are required by curl.

Viewing Inventories

ProcedureTo View the Inventory of the universal server

Each agent discovers the installed inventory on its managed host and sends it to the dependency manager (DM), which updates the console. This procedure describes the Inventory panel of the console’s main window.

  1. From the View menu, make sure Inventory is selected.

    The screen capture shows the Main window with inventory panel.
  2. From the drop-down list on the tool bar, select a distribution-architecture.

    The Components list shows the components of the selected distribution.

  3. Make sure no host is selected in the Hosts list, and that the Show Installed Components button is deselected.

    The Components list shows all components in the knowledge base of the selected distribution.

  4. To see more information about a selected component, do one of the following:

    • From the tool bar, click the Details button.

    • Right-click the selection and choose Details.

    • From the Components menu, choose Details.

    The Component Information window opens.

ProcedureTo View the Installed Inventory of Selected Hosts

  1. From the View menu, make sure Inventory is selected.

  2. In the Hosts list, select a managed host, group, or multiple hosts and groups (use Shift or Control to select multiple items).

  3. From the drop-down list in the tool bar, select a distribution-architecture.

    The Components list shows the components of the selected distribution.

  4. Choose the type of list you want to view:

    • Filtered – Click the Show Installed Components button, if you want to see only those components which are installed on the selected managed hosts.

    • Complete – Leave this button deselected, if you want to see all components available for download.

Further Understanding

Viewing an Inventory with the CLI

The CLI command to view an inventory is for one specific host at a time. It outputs package names only, not categories or package-groups. See List Host Inventory (-lhi) Command.


#! /bin/bash

echo -n “Enter your user name:” 
read user 
echo -n “Enter your password:” 
read password 

echo “The list of hosts is:” 
uce_cli -lah -u “$user” -p “$password” 
echo -n “Copy the name of the host whose inventory you want to see:” 
read hostname 

uce_cli -lhi -h “$hostname” -u “$user” -p “$password”

Saving Inventories

ProcedureTo Save an Inventory

In this procedure, you save an inventory of a host or of a group. Saving an inventory allows you to restore a host to a previous state if needed, or to clone the inventory of a host or a group onto another host (see Restoring Managed Hosts). Sun Update Connection – Enterprise automatically saves inventories before deploying a job on a host. Automatic inventories have this naming convention:

Use this procedure to save an inventory record with a meaningful name.

Before You Begin

Before saving an inventory, you should run the Check System predefined profile on the host or group. This will ensure that the saved inventory does not have dependency issues. If you will be managing Solaris hosts, you should run the Check Withdrawn Patches profile. This will replace withdrawn Solaris patches with appropriate operating software. See Chapter 7, System Management Profiles.

  1. From the Hosts list, select a single host or a group.

  2. Do one of the following:

    • From the tool bar, click the Save Inventory to File button

    • Right-click the selected host or group and choose Save Inventory ->To File.

    • From the Hosts menu, choose Save Inventory ->To File.

      A dialog box opens with the date entered in the text-entry box.

  3. Type a name for this inventory and then click OK.


Example 8–1 Saving a Host Inventory with the CLI

The CLI command to save host inventory saves a record of the inventory of a single host. See Save Host Inventory (-shi) Command.


#! /bin/bash

echo -n “Enter your user name:” 
read user 
echo -n “Enter your password:” 
read password 

echo “The list of hosts is:” 
uce_cli -lah -u “$user” -p “$password” 
echo -n “Copy the name of the host whose inventory you want to save:” 
read hostname 
echo -n “Type a name for the inventory record:” 
read savedInven 

uce_cli -shi -h “$hostname” -s “$savedInven” -u “$user” -p “$password”


Example 8–2 Saving a Group Inventory with the CLI

The CLI command to save group inventory saves a record of the inventory for each host of the group. This does not create a composite record. It creates a separate file for each host.The files are named according to this convention hostname_suffix_mmddyyyytime. You create the suffix, a name or number to identify this as a group inventory save. See Save Group Inventory (-sgi) Command.


#! /bin/bash

echo -n “Enter your user name:” 
read user 
echo -n “Enter your password:” 
read password 

echo “The list of groups is:” 
uce_cli -lg -u “$user” -p “$password” 
echo -n “Copy the name of the group whose hosts inventories you want to save:” 
read groupname 
echo -n “Type a group suffix for the inventory saves:” 
read suffix 

uce_cli -sgi -g “$groupname” -sn “$suffix” -u “$user” -p “$password”