A plan is an XML document that performs operations on hosts specified by the operator.
This section discusses the following topics:
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.
Within the N1 Service Provisioning System software mode there are two types of plans:
Composite plans, which contain only subplans.
Simple plans, which contain a collection of simple steps, but which cannot call other 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.
Steps are logical blocks that manage what to do with subplans or components. The N1 Service Provisioning System software supports three types of steps:
Steps that can be called only from a component. These steps can in turn be divided into two types:
Component steps that can only be called from an install block.
Component steps that can be called from outside an install block.
Steps that can be called only from plans. These steps consist of two groups:
Steps that can be called only from composite plans.
Steps that can be called only from simple plans.
Steps that can be called from both components and plans
For a detailed description of the XML schema for plans, see N1 Service Provisioning System 4.1 Reference Guide.
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).
Allows you to specify where to look for or store plans. Click on change path to specify a different path.
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.
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.
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.
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.
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.
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.
From this area you can either delete or apply categories to the checked plan(s).
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.
The name of the plan.
Displays the revision number of the plan.
Displays the date and time when the plan was checked in. That is, created or modified.
Displays the user ID of the one who checked in the plan. This provides an audit trail when trying to troubleshoot problems or inconsistencies.
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.
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.
By clicking one of these buttons you initiate one of the following functions.
Runs the plan.
Allows you to edit the XML code for the plan.
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.
Takes you to the plans page.
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 Plan Advanced Edit page allows you to change what a plan does by changing the XML code of a plan.
Allows you to change the name of the plan.
Displays the revision number of the plan. This will increment when the plan is checked in. This cannot be changed by the user.
This will reflect a new time and date when the plan is checked in. This cannot be changed by the user.
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.
Displays the category for the plan. Categories can be assigned or changed at from the plans page by clicking in the “Apply Categories . . .” link.
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.
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.
By clicking one of these buttons you initiate one of the following functions.
Allows you to check in the plan using its current name.
Allows you to check in the plan using a new name.
Takes you to the plans page without saving any changes.
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.
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.
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.
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.
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.
Click the advanced edit button.
The HTML user interface displays a Plan Advanced Edit page for the plan.
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.
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.
Click continue to check in to finish checking in the plan.
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.
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.
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.
In the component procedures table, click the checkbox next to the name of each procedure you want to include in the plan.
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.
Click check in.
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.
Using a schema-validating editor, write your plan using the XML schema elements described in N1 Service Provisioning System 4.1 Reference Guide.
When you have finished writing the plan, log in through your web browser.
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.
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.
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.
Click continue to check in to finish checking in the plan.
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. |
To run plans, use the pe commands described in Table 6–2.
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.
The Session Variables page allows you to list, create, edit and, view the details of Sessions Variables.
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.
A user definable text string that names the session variable object.
Indicates if a password is required to change the session variable.
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
Links that take you to other session variables related pages to either create or edit a session variable.
From this area you can delete the checked session variable(s).
This page is used to view the details for a session variables.
Displays the name of the session variable object.
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.
Displays the value of the session variable unless it is password protected.
Displays the name of the session variable object.
By clicking one of these buttons you initiate one of the following functions.
Allows you to permanently delete the session variable.
Takes you to the edit page for the session variable.
Takes you to the session variables page without saving any changes.
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.
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.
Marks this session variable as password protected. When checked, the value of the session variable will be seen as a series of ellipses.
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.
A text field that allows you to enter a value of the session variable.
A text field that allows you to enter a password for the session variable.
By clicking one of these buttons you initiate one of the following functions.
Saves the changes and takes you to the session variables page.
Takes you to the session variables page without saving any changes.
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.
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.
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.
Near the bottom of the page, click the done button when finished.
The HTML user interface displays a session variables page.
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.
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.
Near the bottom of the page, click the edit button.
The HTML user interface displays the session variables edit page for the session variables.
Using the text fields make any desired changes.
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.
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.
Once you have checked in a plan, you can run it in order to perform operations on hosts.
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.
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.
Near the bottom of the page, click the run button.
The HTML user interface displays a Plan Details Run page.
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.
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:
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.
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.
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.
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.
Do one of the following:
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. |