Sun Update Connection - Enterprise 1.0 User's Guide

Inventory Jobs with Local Scripts and Files

Efficient system and network administrators often maintain a repository of scripts that they use to run typical host management tasks. They might also keep a repository of configuration files that they have changed for various situations, allowing them to quickly manage peripherals and do other frequent environment modifications.

Sun Update Connection – Enterprise allows you to store your scripts and files in your local Sun Update Connection – Enterprise knowledge base, as explained in Managing Local Files. The following tasks show how you can easily create Inventory jobs to execute your scripts or install your file versions on multiple hosts. Using such techniques, you could manage complex, time-consuming tasks with one-click and be done within minutes: route fifty computers to a new printer, add nodes to a cluster, change the dynamics of on-demand services, and so on.

Executing Scripts on Hosts

ProcedureTo Execute a Local File on Multiple Hosts

In this procedure you will run Probes, Pre-actions, and Post-actions on managed hosts, using Inventory jobs. You could include these files in jobs that include installation components (RPMs, PKGs); this procedure shows the difference between Sun Update Connection – Enterprise install of installations and Sun Update Connection – Enterprise install of executions. The local file you want must already be in the Components list, under Local.

  1. Make sure the Inventory panel is open in the main window by choosing Inventory from the View menu.

  2. From the drop-down list on the tool bar, select a distribution-architecture.

    The Components list changes to display components of the selected distribution.

  3. In the Hosts list, select the hosts upon which you want to execute the script.

  4. In the Components list, expand Local and then expand the relevant category: Probes, Pre-actions, or Post-actions.

  5. Select the probe or action that you want.

  6. Do one of the following:

    • From the tool bar, click the Required button.

    • Right-click the selected file and choose Required.

    • From the Components, choose Required.

      The action setting appears in the Actions list.

  7. Add as many Probes, Pre-actions, or Post-actions as you want.

  8. To execute the files on hosts of different distributions:

    • To select specific files from different distributions, change the selection of the drop-down list of distributions in the tool bar. Find the relevant files and add the action settings to the Actions list.

    • To let Sun Update Connection – Enterprise automatically add the same files that you uploaded to multiple distributions, click the Multi Distribution button. See To Align Component Settings for Multiple Distributions.

  9. Do one of the following:

    • From the tool bar, click the Run Job button.

    • Right-click in the Actions list and choose Run on Selected Hosts.

    • From the Actions menu, choose Run on Selected Hosts.

    The Run Job window opens.

  10. Type a name and description for the job.

  11. Check the bottom panel of the Run Job window and make sure it will execute the actions or probes you want. Although the action says Install, the actions and probes are not installed, but are executed on the remote hosts.

  12. Select Deploy mode. As this job will execute scripts, a simulation will not do anything on the hosts.

  13. Click OK.

    The job begins.

    Probes are executed first.

    If they succeed, Pre-actions are executed next.

    If the Pre-actions succeed, Post-actions are executed.

Distributing Local Files

ProcedureTo Install Configuration Files on Multiple Remote Hosts

In this procedure you will install local Configuration files on managed hosts with an inventory job. The version you want must already be on the Components list, under Local/Configuration files. If the file has a macro sign in its contents, make sure the appropriate macro is also uploaded to the knowledge base. You do not need to add the macros to the inventory job; macros are called and executed automatically by Sun Update Connection – Enterprise.

  1. Make sure the Inventory panel is open in the main window by choosing Inventory from the View menu.

  2. From the drop-down list on the tool bar, select a distribution-architecture.

    The Components list changes to display components of the selected distribution.

  3. In the Hosts list, select hosts on which the files will be installed.

  4. In the Components list, under Local/Configuration files select the file version that you want.

  5. Do one of the following:

    • From the tool bar, click the Required button.

    • Right-click the selected file and choose Required.

    • From the Components menu, choose Required.

      The action setting appears in the Actions list.

  6. To install the files on hosts of different distributions:

    • To select specific files from different distributions, change the selection of the drop-down list of distributions in the tool bar. Find the relevant files and set them to Required.

    • To let Sun Update Connection – Enterprise automatically add to the Actions list the same files that you uploaded to multiple distributions, click the Multi Distribution button. See To Align Component Settings for Multiple Distributions.

  7. Do one of the following:

    • From the tool bar, click the Run Job button.

    • Right-click in the Actions list and choose Run on Selected Hosts.

    • From the Actions menu, choose Run on Selected Hosts.

    The Run Job window opens.

  8. Type a name and description for the job.

  9. Select Deploy mode.

  10. Click OK.

    The job begins.

    The files that were uploaded to the knowledge base are installed on the remote hosts in the path names provided by the File Declaration of each Configuration file version.

    If a Configuration file has a macro sign, the macro is called after file installation. The macro executes, and its output replaces the macro sign in the Configuration file.


Example 8–7 Distributing Local Files

Your File Declaration is /etc/printcap and the local File is printcap_01. Use this job to install printcap_01 on ten hosts. On the hosts, it installs a file named /etc/printcap that has the contents of printcap_01. The contents of each existing printcap file are overwritten with the contents of printcap_01.