N1 Grid Service Provisioning System User's Guide and Release Notes for the Solaris Plug-In 2.0

Chapter 5 Using the Solaris Plug-In to Deploy Packages

This chapter explains how to use the Solaris package specific components, containers, and system services that are provided with the Solaris Plug-In. The chapter contains the following information:

Introduction to Solaris Packages

Sun and its third-party vendors deliver software products in a form that is called a package. The term packaging generically refers to the method for distributing and installing software products to systems where the products will be used. A package is a collection of files and directories in a defined format. This format conforms to the application binary interface (ABI), which is a supplement to the System V Interface Definition. The Solaris OS provides a set of utilities that interpret this format and provide the means to install a package, to remove a package, or to verify a package installation.

Solaris packages are created in a file system format. The package is a directory or series of directories that contain the files and scripts necessary to install the package. You can convert the file system into a single datastream by using the pkgtrans(1) command.

Some Solaris packages contain a request script that asks you questions prior to installation. If you want to use the N1 Grid Service Provisioning System to install a package that has a request script, you must create a response file that contains the responses to the questions asked by the request script. Use the pkgask(1M) command to create the response file. For more information about creating and using response files, see Avoiding User Interaction When Adding Packages (pkgadd) in System Administration Guide: Basic Administration.

Deploying Solaris Packages

The N1 Grid Service Provisioning System uses the pkgadd(1M) command to install Solaris packages and the pkgrm(1M) command to remove Solaris packages.

Some Solaris packages contain a request script that asks you questions prior to installation. If you want to use the N1 Grid Service Provisioning System to install a package that has a request script, you must create a response file that contains the responses to the questions asked by the request script. Use one of the following procedures to install a Solaris package:

ProcedureHow to Deploy a Solaris Package or Datastream Package Without a Response File

If the package you want to install does not include a request script that requires responses, follow the steps below to use the N1 Grid Service Provisioning System to install the package.

Before You Begin

Obtain the package that you want to install.


Caution – Caution –

The N1 Grid Service Provisioning System does not check for package dependencies. Be sure to install packages in the proper sequence to account for package dependencies.


Steps
  1. In the left control panel, under Common Tasks, click the Sun Solaris icon.

    The Common Tasks for the Solaris Plug-In appear in the right panel of the browser interface.

  2. Create a Package component.

    • If you want to deploy a Solaris file system package, click the Solaris Package: Create Package Component link.

    • If you want to deploy a Solaris datastream package, click the Solaris Datastream Package: Create Datastream Package Component link.

  3. In the left control panel, under Application Deployment, click Components.

  4. From the list of components, click the component that you created.

  5. (Optional) Edit the component variables by clicking the Edit button.


    Note –

    If you are deploying a datastream package, you might need to edit the pkgName component variable for the package to deploy successfully.


    For more information, see Component Variables.

  6. In the Component Procedures section, click the Run link associated with the component procedure that you want to run.

    For more information, see Component Procedures.

ProcedureHow to Deploy a Solaris Package or DataStream Packages With a Response File

If the package that you want to install includes a request script that asks you questions prior to installation, follow the steps below to install the package.

Before You Begin

Obtain the package that you want to install.

Use the pkgask(1M) command to create the response file. For more information about creating and using response files, see Avoiding User Interaction When Adding Packages (pkgadd) in System Administration Guide: Basic Administration


Caution – Caution –

The N1 Grid Service Provisioning System does not check for package dependencies. Be sure to install packages in the proper sequence to account for package dependencies.


Steps
  1. In the left control panel, under Common Tasks, click the Sun Solaris icon.

    The Common Tasks for the Solaris Plug-In appear in the right panel of the browser interface.

  2. Create a Package component.

    • If you want to deploy a Solaris file system package, click the Solaris Package: Create Package Component link.

    • If you want to deploy a Solaris datastream package, click the Solaris Datastream Package: Create Datastream Package Component link.

  3. In the left control panel, under Common Tasks, click the Sun Solaris icon.

    The Common Tasks for the Solaris Plug-In appear in the right panel of the browser interface.

  4. Click the Response File: Create Response File Component link.

    Define the response file component to reference the response file that you created for use with the package you want to install.

  5. In the left control panel, under Common Tasks, click the Sun Solaris icon.

    The Common Tasks for the Solaris Plug-In appear in the right panel of the browser interface.

  6. Create a Container that includes the Package component and the Response File component.

    • If you want to deploy a Solaris file system package, click the Package with Response File: Create Package With Response File Container link.

    • If you want to deploy a Solaris datastream package, click the Datastream Package with Response File: Create Datastream Package With Response File Container link.

  7. In the left control panel, under Application Deployment, click Components.

  8. From the list of components, click the container that you created.

  9. (Optional) Edit the component variables by clicking the Edit button.


    Note –

    If you are deploying a datastream package, you might need to edit the pkgName component variable for the package to deploy successfully.


    For more information, see Component Variables.

  10. In the Component Procedures section, click the Run link associated with the Component Procedure that you want to run.

    For more information, see Component Procedures.

Solaris Package Components

Package Component and Datastream Package Component

Use the Package components to create components that contain the packages that you want to install or remove. For more information about creating components, see Chapter 4, Plans, in N1 Grid Service Provisioning System 5.0 Plan and Component Developer’s Guide.

The Solaris Package: Create Package Component link creates a component of type com.sun.solaris#Package. This component references a file system package. A file system package contains a directory or series of directories that contain the files and scripts necessary to install the package.

The Solaris Datastream Package: Create Datastream Package Component link creates a component of type com.sun.solaris#StreamPackage. This component references a datastream package. A datastream package is a package that has been converted from a file system package into one data stream. For more information about datastream packages, see the pkgtrans(1) man page.

The Package components and the Datastream Package components contain the same component variables and component procedures. The variables and procedures are described below.

Component Variables

installName

The name to use for the package when it is installed. The default value is the name of the package component.

installPath

The path on the target host where the package will be downloaded.

installRoot

The path on the target host where the package will be installed.

pkgName

The name of the package.

When installing a datastream package, you might need to change the value of this variable. When installing a datastream package using the pkgadd command, you are prompted to enter the package name. The provisioning system cannot prompt you during the package installation for the package name, so you must supply the actual package name here.

You can find the package name for the datastream package in the header of the datastream file. In the following example, the package name is SMCcvs.


% head cvs-1.11.17-sol9-sparc-local
# PaCkAgE DaTaStReAm
SMCcvs 1 16852
# end of header
NAME=cvs
ARCH=sparc
VERSION=1.11.17
CATEGORY=application
VENDOR=Joe Smith et al
EMAIL=joe@smith.work.net
PSTAMP=Bob Miller
verboseMode

This variable enables you to supply the -v option to pkgadd(1M) when the package is added to the target host. The -v option traces all of the scripts that pkgadd executes, located in the pkginst/install directory. Use this option for debugging the procedural and non-procedural scripts. Valid values are true and false.

The remaining component variables correspond directly to the variable values that the provisioning system sets in an administration file that will be used to install the package. The provisioning system creates an administration file to provide information to the pkgadd command about how the installation should proceed. For more information about administration files, see Using an Administration File in System Administration Guide: Basic Administration. For descriptions of the following variables and valid values for each variable, see the admin(4) man page.


Note –

The values set by the provisioning system for the administration file variables do not match the default values that are set in the administration file that is installed with the Solaris OS in the /var/sadm/install/admin directory. The values set by the provisioning system enable the package installation to complete without any interaction. For more information about the default values that are set in the administration file that is installed with the Solaris OS, see the admin(4) man page.


Component Procedures

default: install

Use this procedure to install a package on a target system or systems.

mark Only: install

If you manually installed a package on a target system or systems but want the provisioning system database to be aware that the package is installed on those systems, use this procedure.

default: uninstall

Use this procedure to uninstall a package from a target system or systems.

markOnly: uninstall

If you manually uninstalled a package from a target system or systems but want the provisioning system database to be aware that the package has been uninstalled from those systems, use this procedure.

Response File Component

You create a Response File component when you have created a response file to use with a package. Some Solaris packages contain a request script that asks you questions prior to installation. If you want to use the N1 Grid Service Provisioning System to install a package that has a request script, you must create a response file that contains the responses to the questions asked by the request script. Use the pkgask(1M) command to create the response file that you will reference in the Response File Component. For more information about response files, see Avoiding User Interaction When Adding Packages (pkgadd) in System Administration Guide: Basic Administration.

The Response File: Create Response File Component creates a component of the type com.sun.solaris#ResponseFile. This component references the response file that you created for use with a package.

Solaris Package Container Components

Containers are components that reference other components. Use the Package containers to create components that include a Package component and its corresponding Response File component. For more information about containers, see Chapter 1, Plan and Component Development Concepts, in N1 Grid Service Provisioning System 5.0 Plan and Component Developer’s Guide.

Package Container Component and Datastream Package Container Component

If you want to deploy a Solaris package with a response file, from the Solaris Common Tasks page, click the Package with Response File: Create Package with Response File Container link. This link enables you to create a container component of the type com.sun.solaris#PackageWithResp. When you create this container component, include the Package component and its corresponding Response File component in the container component.

If you want to deploy a Solaris datastream package with a response file, from the Solaris Common Tasks page, click the Datastream Package with Response File: Create Datastream Package with Response File Container link. This link allows you to create a container component of the type com.sun.solaris#StreamPackageWithResp. When you create the container component, include the Datastream Package component and its corresponding Response File component in the container component.

Package Container Components and Datastream Package Container components contain the same component variables and component procedures. The variables and procedures are described below.

Component Variables

installPath

The path on the target host where the package file and the response file will be downloaded.

Component Procedures

default: install

Use this procedure to install a package with its response file on a target system or systems.

mark Only: install

If you manually installed a package with its response file on a target system or systems but want the provisioning system database to be aware that the package is installed on those systems, use this procedure.

default: uninstall

Use this procedure to uninstall a package and its response file from a target system or systems.

markOnly: uninstall

If you manually uninstalled a package and its response file from a target system or systems but want the provisioning system database to be aware that the package has been uninstalled from those systems, use this procedure.