N1 Service Provisioning System 4.1 User's Guide

Chapter 6 Plans

A plan is an XML document that performs operations on hosts specified by the operator.

This section discusses the following topics:

Working with Plans

A plan is a sequence of instructions typically used to manipulate one or more components. For example, an execution plan may instruct the provisioning software to install three components and initiate the “startup” control on another. A plan can also be defined as a sequence of other plans, which allows common instruction sequences to be shared between multiple plans.

The provisioning software provides an in-memory representation of the objects expressed by the plan and component language and also defines a process for the validation, persistence and version control for those objects. The provisioning software manages the physical resources associated with a component. When the provisioning software executes a plan, substitution variables declared by a component are replaced. The Notification feature can be used to send email in response to plan execution related events. The provisioning software also includes a number of predefined components that may be used directly, or as samples for constructing other components.

Plan Types

Within the N1 Service Provisioning System software mode there are two types of plans:

The XML Schema enforces these restrictions so that you can either have a top-level plan which only calls other subplans, or you can have a simple plan with various simple steps but no calls to other subplans. The distinction is important because the steps contained in a simple plan all execute on the same set of target hosts, whereas the steps of a composite plan may execute on different sets of target hosts, using one set of target hosts for each simple plan recursively contained in the composite plan.

Types of Steps

Steps are logical blocks that manage what to do with subplans or components. The N1 Service Provisioning System software supports three types of steps:

Plan XML Schema

For a detailed description of the XML schema for plans, see N1 Service Provisioning System 4.1 Reference Guide.

Plans User Interface

The Plans Page

The plans page allows you to list plans, view plan details, create plans, and edit plans. This page also contains controls for filtering the component list and selecting sort criteria. There are blue wedge shaped arrows over several of the columns on the plans page that allow you to select the column to sort the list by and in either ascending or descending order. When one of the arrows is clicked it selects that column by which to sort, sorts the list in either ascending or descending order (depending on which arrow was clicked), and changes the arrow to white . The white arrow indicates which column was used for the sort and in which order (ascending or descending).

Path

Allows you to specify where to look for or store plans. Click on change path to specify a different path.

Show

Allows you to list either plans or components. If you select components, the HTML user interface displays the components page as though you had click on the components option in the left-hand navigation menu.

You can also narrow the list by selecting a category from the category pull down menu.

(Check Box)

Marks a plan for inclusion when one of the actions are clicked in the Actions for Checked plans area. When clicked, Actions for Checked plans will either delete or categorize a plan.

Plan

A user definable text string that names the plan object. By default, the plans are listed in alphabetical order by plan name. You can change the sort order between ascending and descending by clicking on one of the sort icons that is in the plans header area.

Version

Displays the revision number of the plan. Each time a plan is modified, its version number is incremented.

You can sort the plan list by version number by clicking on one of the sort icons in the header area for this column. Clicking this icon toggles the order between ascending and descending.

Description

An optional user defined text string that describes the plan object. This attribute is not used by the provisioning software but can provide meaningful information to the user.

Action

Links that take you to other plan related pages to either find a specific plan, create a new plan, view more information about a plan, or view the run history for a plan.

Actions for Checked Plans

From this area you can either delete or apply categories to the checked plan(s).

The Plans Details Page

The Plans Details page allows you to view a Plan's information and attributes. This page includes information and attributes information, and also contains buttons that allow you to run, edit, and delete a plan.

Plan

The name of the plan.

Version

Displays the revision number of the plan.

Checked In

Displays the date and time when the plan was checked in. That is, created or modified.

Checked In By

Displays the user ID of the one who checked in the plan. This provides an audit trail when trying to troubleshoot problems or inconsistencies.

Category

A user definable object that is used to filter the plan list. Categories are created using the categories page accessed from the Administrative page. Categories are then applied to a plan from the plans page. Categories can also be created by clicking in the “Apply Categories . . .” link.

Description

An optional user defined text string that describes the plan object. This attribute is not used by the provisioning software but can provide meaningful information to the user.

Buttons

By clicking one of these buttons you initiate one of the following functions.

Run

Runs the plan.

Advanced Edit

Allows you to edit the XML code for the plan.

Delete

Removes the plan from the database. If there is more than one version then the provisioning software asks if you want to delete just this version or all versions.

Done

Takes you to the plans page.

Download

Allows you to save the XML code to a text file. Between this function and the Replace Definition With File function the provisioning software allows you to use other text editors to create and modify the XML code for plans.

The Plans Advanced Edit Page

The Plan Advanced Edit page allows you to change what a plan does by changing the XML code of a plan.

Plan

Allows you to change the name of the plan.

Version

Displays the revision number of the plan. This will increment when the plan is checked in. This cannot be changed by the user.

Checked In

This will reflect a new time and date when the plan is checked in. This cannot be changed by the user.

Checked In By

This will reflect the user ID of the one who checks in the plan providing an audit trail. This cannot be changed by the user.

Category

Displays the category for the plan. Categories can be assigned or changed at from the plans page by clicking in the “Apply Categories . . .” link.

Edit The Plan Definition

This is a text field that displays the XML code defining what the plan does. You can make any desired changes directly into this text field.

Replace Definition With File:

This is a text field that allows you to replace the XML code in the plan definition field with that of a text file. Either type in the name of the file, including the path, into the text field or use the browse button to locate a file. Initiate this feature by clicking on the Replace link just to the right of the browse button.

Buttons

By clicking one of these buttons you initiate one of the following functions.

Check in

Allows you to check in the plan using its current name.

Check in as

Allows you to check in the plan using a new name.

Cancel

Takes you to the plans page without saving any changes.

ProcedureHow To View Plans List

Step
  1. In the left-hand navigation menu, click plans.

    The HTML user interface displays the plans page, which lists the plans already checked in to the database. By clicking on one of the sort arrows in the header yo can change the sort criteria.

ProcedureHow To View Plan Details

Steps
  1. In the left-hand navigation menu, click plans.

    The HTML user interface displays the plans page, which lists the plans already checked in to the database.

  2. Find the row listing the plan you're interested in, and click details.

    The HTML user interface displays a Plan Details page for the plan.

ProcedureHow To Edit Plans

Steps
  1. In the left-hand navigation menu, click components.

    The HTML user interface displays the plans page, which lists the plans already checked in to the database.

  2. Find the row listing the plan you're interested in, and click details.

    The HTML user interface displays a Plan Details page for the plan.

  3. Click the advanced edit button.

    The HTML user interface displays a Plan Advanced Edit page for the plan.

  4. In the text box, make the changes you want to the plan's XML code, or enter new XML for the plan that you have authored in another program.

    To upload a plan stored on your local system, enter the path of the file or use the browse button, then click Replace.

  5. Click the check in button to use the same name or click the check in as button to use a different name.

    The HTML user interface displays the plans page, which lists the plans already checked in to the database.

    The HTML user interface displays a new page, telling you that you are about to check in a plan and increments the version number.

  6. Click continue to check in to finish checking in the plan.

How To Create Plans

You can create an auto-generated plan, create a completely custom plan, or start with an auto-generated plan and customize it.

The N1 Service Provisioning System software can automatically generate a plan consisting of multiple “direct run” procedures. You can run this plan directly or save it for use as a template for more sophisticated plans that you author in XML.

For deployments that involve the coordination of multiple components, multiple host sets, or both, write a plan and use the provisioning software XML schema to define operations such as dependency checks and scripting that executes commands on an application console. Once the plan is written, you need to check it into the plan repository.

ProcedureHow To Create Auto Generated Plans

Steps
  1. In the left-hand navigation menu, click components.

    The HTML user interface displays the components page, which lists the components already checked in to the database.

  2. In the table listing components, find the row describing the component you would like to deploy, and click details.

    The HTML user interface displays a Components Details page for the component.

  3. In the component procedures table, click the checkbox next to the name of each procedure you want to include in the plan.

  4. When you have selected all the procedures you want to include, click the link labeled generate plan with checked procedures.

    The HTML user interface displays a Plan Advanced Edit page for the plan.

  5. Click check in.

ProcedureHow To Create Custom Plans

You can begin by writing the XML code for the plan using a schema-validating editor such as TurboXML or you can write the XML code within the HTML user interface. The following description assumes that you will write the XML code using an external editor.

Steps
  1. Using a schema-validating editor, write your plan using the XML schema elements described in N1 Service Provisioning System 4.1 Reference Guide.

  2. When you have finished writing the plan, log in through your web browser.

  3. In the left-hand navigation menu, click plans located under the application deployment heading.

    The HTML user interface displays the plans page, which lists the plans already checked in to the database.

  4. In the top row of the table listing plans, enter a name and a brief description for the plan you want to create, and click create.

    The HTML user interface displays a Plan Advanced Edit page for the plan . Note that the provisioning software has populated the plan definition with an XML skeleton.

    In the text box, enter the XML for the plan. To upload a plan stored on your local system, enter the path of the file or use the browse button, then click Replace.

  5. Click the check in button.

    The HTML user interface displays a new page, telling you that you are about to check in a plan. It assigns the plan version 1.0.

  6. Click continue to check in to finish checking in the plan.

Summary of CLI Commands

Table 6–1 lists the CLI commands you can use to manage plans.

Table 6–1 Summary of the pdb Commands

Command 

Description 

pdb.p.ci 

Checks in a new version of a plan. 

pdb.p.co 

Checks out a plan (outputs a plan in XML). 

pdb.p.genplan 

Generates and outputs a plan in XML. 

pdb.p.la 

Lists the latest versions of all plans. 

pdb.p.lo 

Views a plan. 

pdb.p.lv 

Lists all the versions of the specified plan. 

pdb.p.del 

Deletes an execution plan. 

pdb.p.sh 

Shows or hides a plan. 

pdb.p.sc 

Associates a plan with a set of categories. 


Note –

To run plans, use the pe commands described in Table 6–2.


Session Variables

Session variables are global values associated with deployments that expands the flexibility of the provisioning software. Session variables can be created and saved for future use with any deployment or created and not saved for use with a single deployment.

Session Variables User Interface

The Session Variables Page

The Session Variables page allows you to list, create, edit and, view the details of Sessions Variables.

(Check Box)

Marks a session variable for inclusion when one of the actions are clicked in the Actions for Checked Session Variables area. When clicked, Actions for Checked Session Variables will either delete the session variable.

Session Variable

A user definable text string that names the session variable object.

Password

Indicates if a password is required to change the session variable.

Value

Displays the value of the session variable. If a password is required for the session variable the value is seen as a series of ellipses

Action

Links that take you to other session variables related pages to either create or edit a session variable.

Actions for Checked Plans

From this area you can delete the checked session variable(s).

The Session Variables Details Page

This page is used to view the details for a session variables.

Session Variable

Displays the name of the session variable object.

Description

An optional user defined text string that describes the session variable. This attribute is not used by the provisioning software but can provide meaningful information to the user.

Value

Displays the value of the session variable unless it is password protected.

Session Variables

Displays the name of the session variable object.

Buttons

By clicking one of these buttons you initiate one of the following functions.

Delete

Allows you to permanently delete the session variable.

Edit

Takes you to the edit page for the session variable.

Done

Takes you to the session variables page without saving any changes.

The Session Variables Edit Page

This page is used to create and edit session variables. If you are editing an existing session variable the top two items are displayed and cannot be changed.

Session Variable

A text field that allows you to enter a name for the session variable. If this is an existing session variable then this field only displays the name. It cannot be changed.

(Check Box)

Marks this session variable as password protected. When checked, the value of the session variable will be seen as a series of ellipses.

Description

A text field that allows you to enter an optional text string that describes the session variable. This attribute is not used by the provisioning software but can provide meaningful information to the user.

Value

A text field that allows you to enter a value of the session variable.

Password

A text field that allows you to enter a password for the session variable.

Buttons

By clicking one of these buttons you initiate one of the following functions.

Save

Saves the changes and takes you to the session variables page.

Cancel

Takes you to the session variables page without saving any changes.

ProcedureHow To View Session Variables

Step
  1. In the left-hand navigation menu, click session variables.

    The HTML user interface displays the session variables page, which lists the session variables already checked in to the database.

ProcedureHow To View Session Variables Details

Steps
  1. In the left-hand navigation menu, click session variables.

    The HTML user interface displays the session variables page, which lists the session variables already checked in to the database.

  2. Find the row listing the session variable you're interested in, and click details.

    The HTML user interface displays a session variables Details page for the session variable.

  3. Near the bottom of the page, click the done button when finished.

    The HTML user interface displays a session variables page.

ProcedureHow To Edit Session Variables

Steps
  1. In the left-hand navigation menu, click session variables.

    The HTML user interface displays the session variables page, which lists the session variables already checked in to the database.

  2. Find the row listing the session variable you're interested in, and click details.

    The HTML user interface displays a session variables Details page for the session variable.

  3. Near the bottom of the page, click the edit button.

    The HTML user interface displays the session variables edit page for the session variables.

  4. Using the text fields make any desired changes.

  5. Near the bottom of the page, click the save button when finished.

    The HTML user interface save the changes and displays a session variables page.

  6. Near the bottom of the page, click the cancel button to cancel any changes.

    The HTML user interface displays a session variables page without saving any changes.

Running Plans

Once you have checked in a plan, you can run it in order to perform operations on hosts.

ProcedureHow To View Running Plans

Steps
  1. In the left-hand navigation menu, click plans.

    The HTML user interface displays the plans page, which lists the plans already checked in to the database.

  2. Find the row listing the plan you're interested in, and click details.

    The HTML user interface displays a Plan Details page for the plan.

  3. Near the bottom of the page, click the run button.

    The HTML user interface displays a Plan Details Run page.

  4. Enter the required information and click run preflight only to verify that the plan will run successfully or click run plan (includes preflight) to run the plan.

ProcedureHow To Use a Component's Direct Run Procedures

For straightforward deployments that don't involve multiple components or synchronization among hosts, you may not need to write a plan at all. Instead, you may be able to use one of the “direct run” procedures that the provisioning software automatically generated when you checked in the component you want to deploy.

To use one of these “direct run” procedures, do the following:

Steps
  1. In the left-hand navigation menu, click components.

    The HTML user interface displays the components page, which lists the components already checked in to the database.

  2. In the table listing components, find the row describing the component you would like to deploy, and click details.

    The HTML user interface displays a Components Details page for the component.

  3. In the component procedures table, click the checkbox next to the name of the procedure you want to run, and then click run.

    The HTML user interface displays the Plan Details Run page for the procedure.

  4. Use the fields on the page to enter the variables and select the parameters you want to use when you run the plan.

    • In the plan parameters area, use the target host field to select the host on which you want to run this plan, or use the pull-down menu to select a target host set.

    • In the plan variables area, configure the variables you want to set. Whether there are variables to configure depends on the contents of the plan.

    • In the options area, select whether you want to perform a detailed preflight. Running a detailed preflight increases the amount of time preflight takes, but also increases the detail the preflight goes into.

    • In the limits area, limit the number of hosts running at the same time by entering the number of hosts in the field provided. You can also limit overall running time of plan or limit running time of native calls by entering a number in the fields provided, and then selecting the time unit, such as “minutes,” from pull-down menus.

  5. Do one of the following:

    • To run just the preflight test of the procedure, click run preflight only.

    • To run the preflight test and then (assuming the preflight test finds no errors) to run the procedure itself, click run plan (includes preflight).

Summary of CLI Commands

Table 6–2 describes the CLI commands associated with running plans.

Table 6–2 Summary of the pe Commands

Command 

Description 

pe.h.prep 

Prepares a set of hosts. 

pe.p.en 

Displays the output of an execNative step. 

pe.p.la 

Lists running and completed plans. 

pe.p.lo 

Lists information about a running or completed plan. 

pe.p.del 

Deletes the history of a completed plan run. 

pe.p.lp 

Lists the subplans and targets associated with a plan. 

pe.p.run 

Runs a plan. 

pe.p.stop 

Stops a plan that is running 

pe.pi.lo 

Lists the parameters used to run a plan.