This chapter describes how to manage components and covers the following topics:
You can use the Sun N1 Service Provisioning System software browser interface to manage components.
You can also use the command-line interface (CLI) to manage components. See Summary of Component CLI Commands. For detailed information about CLI commands, see the Sun N1 Service Provisioning System 5.1 Command-Line Interface Reference Manual.
The following pages in the browser interface include information about how to view and manage components:
Components page. List components and add new components to the list. You can also access other component pages to view component details.
To see which components are already checked in to the repository, choose Components from the navigation menu.
To see details about a component, go to the Components page, click the name of the component you want, and view details on the Details page.
To create a component, see How to Create a Component.
To see where a component is installed, go to the component's Details page and click Where Installed.
Details page. View detailed information about the component, such as its attributes and values. This page also provides information and buttons that enable you to manage the component.
The information shown on the Details page depends on the component type of the component.
To edit a component, go to the component's Details page, click Edit, modify the component configuration on the Edit page, and click Check In. You can choose which version number to use, then click Continue To Check In.
To delete a component, see How to Delete a Component.
To rename a component, go to the component's Details page and click Rename. Specify the new name of the component and click Rename, or click Cancel if you do not want to rename the component.
To move a component to another folder, go to the component's Details page and click Move. Specify the name of the folder in which to move the component and click Move, or click Cancel if you do not want to move the component.
If you plan to move a component into a folder that does not yet exist, click New Folder in the Move Component window. This new folder inherits the permissions from its parent folder. After you click Create, the folder tree displays with the new folder selected. Click Move.
To edit the component's XML, go to the component's Details page and click Advanced Edit. Make the changes you want to the XML. To overwrite the current XML, click Check In. To create a new component based on the changes to the XML, click Check In As. Or, click Cancel if you do not want to change the component's XML.
To download the component's XML to your system, go to the component's Details page and click Download. Click OK to continue the download, or click Cancel to cancel. Specify the directory in which to download the component's XML and click Save, or click Cancel if you do not want to download the component's XML.
To modify the component's variable settings, go to the component's Details page and click Variable Settings. Click Create Set to create new variable settings, or click Import Set to import variable settings from your system.
To see where the component is installed, go to the component's Details page and click Where Installed.
Edit page. Change component attribute values. Note that all of the fields cannot be changed.
The information shown on this page depends on the component type of the component.
Use this procedure to create simple and composite components.
From the navigation menu, choose Components.
The Components page appears and lists the components that are already checked in.
(Optional) Click Change Folder and specify the folder that will contain the new component.
A window appears where you specify the name of the folder in which to create the component.
If the folder exists, select the name of the folder, and click Change to Selected Folder.
The Components page displays the list of components in the specified folder.
If the folder does not exist, create the folder.
Specify the parent folder, and click New Folder.
The Create New Folder window appears.
Type the name of the new folder, and click Create.
The new folder inherits its permissions from its parent folder. After you click Create, the folder tree displays with the new folder selected.
You cannot create multiple folder levels at one time. To create several nested folders, you must return to the Change Folder window and repeat steps A and B.
After the folder is created, select the name of the folder, and click Change to Selected Folder.
The Components page displays the list of components in the specified folder.
Type a name for the new component in the Component field, and click Create.
The new component's Edit page appears.
Define the component.
(Optional) Change the component's name in the Component field, and click Rename.
Choose the component type from the Component Type drop-down menu.
Some of the resulting fields might change to match those that are used by the component type that you selected.
From the Platform Type drop-down menu, choose the platform type to which this component can be deployed.
(Optional) Specify a label in the Label field.
(Optional) Specify a description in the Description field.
Supply other required information.
The information that is required is based on the component type that you selected.
If your component references other components, local names are created for each of the components that this component references.
A window appears that reports that the provisioning system is checking in the component as Version 1.0.
Click Continue To Check In.
Note the following restrictions before deleting a component:
A component that is referred to by another component cannot be deleted.
An installed component cannot be deleted until it has been uninstalled.
A component that has been created by a plug-in cannot be deleted except by deleting the plug-in.
The root component of a family cannot be deleted if non-root members of the family exist.
A component cannot be deleted during a plan run because all delete operations and plan runs acquire a system lock that keeps those operations from running concurrently.
When a component is deleted, the installation records are also deleted. This applies only to a component that has been installed and uninstalled, so no user-visible change is noticeable. A resource that is associated with a component, if any, is deleted with the component. Any plans that were created by running a direct-run component procedure are also deleted. The plan history that installed the component is edited to indicate that the component the plan installed was deleted. Plan history itself is not removed.
From the navigation menu, choose Components.
The Components page appears and lists the components that are already checked in.
Click Change Folder.
A window appears where you specify the name of the folder from which to delete the component.
Specify the name of the folder, and click Change to Selected Folder.
The Components page now lists the components in the specified folder.
Click the name of the component that you want.
The Details page for that component appears.
Click Delete.
A window appears that reports that the provisioning system is about to delete the component you selected.
Click Continue To Delete.
Click Cancel if you do not want to delete the component.
You can use the cdb.c commands to manage components. See Chapter 3, cdb: CLI Commands for Managing Components, in Sun N1 Service Provisioning System 5.1 Command-Line Interface Reference Manual.
cdb.c.ci – Creates a new version of an existing component, or creates an initial version of a nonbrowsable component using XML format
cdb.c.co – Checks out a component in XML format
cdb.c.lv – Lists all versions of a component
cdb.c.sc – Applies one or more categories to a component
The following cdb.ic commands retrieve information about components that have already been installed on hosts:
cdb.ic.lbc – Lists all of the hosts on which a component is installed
cdb.ic.lbh – Lists all of the components that are installed on a specific host
cdb.ic.vs.lo – Shows the details of the specified generated variable settings
The following cdb.rsrc commands manage resources:
cdb.rsrc.ci – Checks in certain components and their source objects
cdb.rsrc.cib – Checks in all of the resources listed in a batch file
cdb.rsrc.co – Checks out the specified resource
cdb.rsrc.gd – Generates a resource descriptor for the specified component
cdb.rsrc.rci – Rechecks in a resource
cdb.rsrc.showopts – Shows the check-in options supported by a particular component type
The following cdb.vs commands manage variable settings for components:
cdb.vs.add – Adds new variable settings
cdb.vs.del – Deletes variable settings
cdb.vs.imp – Imports variable settings from one component to another
cdb.vs.la – Lists all variable settings that are associated with a specific component
cdb.vs.lo – Lists the details of specific variable settings
When you check in a component, you copy a particular resource from a data source, such as a directory on a gold server, to the component repository. The component repository is a hierarchical namespace. Within this namespace, components are identified by name and version number.
A component must also have a component type that identifies the format and, in many cases, the function of a component. The built-in component types that are available with the provisioning system are described in Chapter 3, Built-in Component Types.
When you use the cdb.rsrc.ci command to check in a component, use the following options:
-src – Specifies the source location of the resource
-dst – Specifies the place in which to store the component in the component repository
-type – Specifies the component type
More than one component can reference the same resource. Checking in a resource using the cdb.rsrc.ci command associates that resource with the specified component.