N1 Grid Service Provisioning System 5.0 Plan and Component Developer's Guide

Chapter 4 Plans

A plan is used to perform operations on hosts that are managed by the provisioning system.

This chapter covers the following topics:

Managing Plans

You can use the N1 Grid Service Provisioning System software browser interface to manage plans. The following pages in the browser interface include information about how to view and manage plans:

In addition to managing plans, you can create plans and run plans as described later in this chapter.

You can also use the CLI to work with plans. See Summary of Plan CLI Commands. For detailed information about the CLI commands, see the N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual.

ProcedureHow to Edit a Plan

Steps
  1. Go to the Details page of the plan you want, and click Advanced Edit.

  2. Modify the XML or import new XML for the plan.

    To import a plan from another system, do one of the following:

    • Type the full path of the file, then click Replace.

    • Click Browse and locate the file, then click Replace.

  3. Check in the plan.

    • Click Check In to save the plan with the same name.

      The Plans page appears.

    • Click Check In As to save the plan with a different name.

      A new page appears that tells you that you are about to check in a plan. The version number is incremented.

  4. Click Continue To Check In.

Creating Plans

You can create an auto-generated plan, create a custom plan, or customize an auto-generated plan.

The provisioning system can automatically generate a plan that consists of more than one direct-run procedures. You can run this plan directly or save it for use as a template for more complex 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 system XML schema to define operations. Such operations might include dependency checks and scripting that execute commands on an application console. Once the plan is written, you need to check it in to the plan repository.

ProcedureHow to Create an Auto-Generated Plan

You create an auto-generated plan from inside a component.

Before You Begin

To create a generated plan, you must belong to a user group that has Create, Edit, and Delete permission on the folder that contains the component for which you want to generate a plan.

Steps
  1. From the navigation menu, choose Components.

    The Components page lists the components that are already checked in.

  2. Click Change Folder.

  3. Specify the name of the folder in which to create the component, and click Change to Selected Folder.

    The Components page now lists the components in the specified folder.

  4. Click the name of the component that you want.

    The Details page for that component appears.

  5. In the Component Procedures table, select each procedure to include in the plan.

  6. In the bottom row of the Component Procedures table, click Generate Plan With Checked Procedures.

    The generated plan's Advanced Edit page appears.

  7. In the Plan field, type the new plan's name.

  8. Click Check In.


    Note –

    You might see this message: Warning - plan names and/or paths differ. This message indicates that you specified a plan name that is different from the plan name specified in the XML model. The XML model is updated according to what you type in the plan name field.


  9. Confirm the component check-in.

    1. Verify that you specified the correct plan name.

    2. If necessary, select the component's new version number.

    3. Click Continue to Check In.

    The new plan's Details page appears.

ProcedureHow to Create a Custom Plan

You can create a plan by using a schema-validating editor, such as TurboXML, or on the Advanced Edit page of the browser interface.

This procedure describes how to import a plan that you have written by using an XML editor.

Steps
  1. Write a plan.

    See the XML schema elements described in Chapter 2, Shared Schema Used by Components and Simple Plans, in N1 Grid Service Provisioning System 5.0 XML Schema Reference Guide and Chapter 4, Plan Schema, in N1 Grid Service Provisioning System 5.0 XML Schema Reference Guide.

  2. Launch the browser interface and go to the Plans page.

  3. Type the name and brief description for the plan that you want to create, and click Create.

    The Advanced Edit page for the plan appears.

    The provisioning system creates an XML skeleton for the plan.

  4. In the Plan Definition field, do the following:

    • Enter the XML for the plan.

    • To import a plan that is stored on your local system, type the full path name of the file or click the Browse button. Then, click Replace.

  5. Click Check In.

    A window appears that tells you that you are about to check in a plan. The plan is assigned Version 1.0.

  6. Click Continue To Check In.

Running Plans

A plan must be checked in to the plan repository before it can be run. When you run a plan, it performs operations on the hosts that you specify.

A preflight is the simulated execution of a plan to a simulated UNIX® environment that finds and reports any errors or potential errors that might affect the deployment. A preflight always precedes a deployment, but you can run a preflight as a standalone operation.

You can also run a detailed preflight, which performs the following functions:

ProcedureHow to Run a Plan

Use this procedure to run a plan from a plan's Details page in the browser interface.

Before You Begin

Ensure that you have the installation information that you need to be able to set the plan's variable settings.

To run a plan, you must belong to a user group that has Allow on Host Set permissions on the folder that contains the plan you want to run.

Steps
  1. Go to the plan's Details page, and click Run.

    The plan's Run page appears.

  2. In the Plan Parameters area, select the variable settings for the component you want to deploy.

    • If the variable settings have been established for this component, choose the appropriate settings from the menu.

    • If the settings are not available from the menu, click Select From List.

      The Select Variable Settings From List window appears.

      • If you want to use another component's variable settings, click Import Set.

        The Import Variable Settings window appears.

        1. If necessary, go to the folder that contains the component with the variable settings you want to import.

        2. Select the component version.


          Note –

          Variable settings can vary between component versions.


        3. Click Import Variable Settings.

          The imported variable settings appear in the table.

        4. Click Select.

      • If you want to create new variable settings, click Create Set.

        The Select Variable Settings From List window appears.

        1. In the text field at the top of the table, type a name to use for the new variable settings.

        2. Select the component variable you want to change.

          The table cell is highlighted and a text field appears.

        3. Type a new value for the component variable.

        4. (Optional) Repeat the previous substeps b and c for each variable value you want to change.

        5. After updating the variable settings values, click Save.

          The new variable settings appear in the table.

        6. Click Select.

  3. Specify where to deploy the component.

    • To specify a host, type the host name in the Target Host field, or click Select From List and select a host.

    • To select a target host set, choose one from the Target Host Set menu.

  4. 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.

  5. In the Options area, specify whether to perform a detailed preflight.

    The detailed preflight attempts to simulate every step of the plan that will run on the remote agent. The detailed preflight tests the following functions:

    • Resource installation

    • <execNative> calls

    • File transformations

    • File deletion, when uninstalling resources

    Running a detailed preflight increases the amount of time the preflight takes.

  6. (Optional) To limit the number of hosts running at the same time, type the number of hosts on which to run a plan in the field provided.

    When a plan is run on several hosts simultaneously, all hosts must complete a particular step before any host can begin the next step. If the number of hosts is too high, the network connection can time out between steps.

    For example, the time interval between Host A finishing the first step and being able to run the second step might be too long. In this case, the length of the time interval causes the network connection to time out.

  7. (Optional) To limit the overall running time of a plan or of native calls, type a number in the fields provided, then choose the time unit, such as minutes, from the menu.

    By limiting the runtime of a plan or native call, you prevent a nonresponsive host from tying up the progress of a running plan.

    If you set up a notification rule to alert you to plan failures, when the plan times out, you will be notified that the plan was unsuccessful.

    For information about setting up notification rules, see Configuring Email Notification in N1 Grid Service Provisioning System 5.0 System Administration Guide.

  8. Specify whether to deploy the component.

    • To run just the preflight test of the procedure, click Run Preflight Only.

    • To run the preflight test and then the procedure itself, click Run Plan (Includes Preflight).

      Note that the procedure is not run if the preflight fails.

ProcedureHow to Deploy a Component by Using a Direct-Run Procedure

Most components include install, uninstall, and snapshot procedures. A component might also include control procedures that manage the installed component. For example, a control procedure might to start or stop the application.

You might be able to use one of the direct-run procedures that the provisioning system automatically generated when you checked in your component. Use this method for straightforward deployments that do not involve more than one component or synchronization between hosts.

Steps
  1. From the navigation menu, choose Components.

    The Components page lists the components that are already checked in.

  2. Click Change Folder.

  3. Specify the name of the folder in which to create the component, and click Change to Selected Folder.

    The Components page now lists the components in the specified folder.

  4. Click the name of the component that you want.

    The Details page for that component appears.

  5. In the Component Procedures table, determine which procedure to run, and click Run.

    The provisioning system generates a plan, which is stored in the /system/autogen folder.

    The Run page for the generated plan appears.

  6. In the Plan Parameters area, select the variable settings for the component you want to deploy.

    • If the variable settings have been established for this component, choose the appropriate settings from the menu.

    • If the settings are not available from the menu, click Select From List.

      The Select Variable Settings From List window appears.

      • If you want to use another component's variable settings, click Import Set.

        The Import Variable Settings window appears.

        1. If necessary, go to the folder that contains the component with the variable settings you want to import.

        2. Select the component version.


          Note –

          Variable settings can vary between component versions.


        3. Click Import Variable Settings.

          The imported variable settings appear in the table.

        4. Click Select.

      • If you want to create new variable settings, click Create Set.

        The Select Variable Settings From List window appears.

        1. In the text field at the top of the table, type a name to use for the new variable settings.

        2. Select the component variable you want to change.

          The table cell is highlighted and a text field appears.

        3. Type a new value for the component variable.

        4. (Optional) Repeat the previous substeps b and c for each variable value you want to change.

        5. After updating the variable settings values, click Save.

          The new variable settings appear in the table.

        6. Click Select.

  7. Specify where to deploy the component.

    • To select a host, type the host name in the Target Host field or click Select From List and select a host.

    • To select a target host set, choose one from the Target Host Set menu.

  8. In the Plan Variables area, configure the variables you want to set.

    Whether there are variables to configure depends on the contents of the component procedure you select.

  9. In the Options area, select whether to perform a detailed preflight.

    The detailed preflight attempts to simulate every step of the plan that will run on the remote agent. The detailed preflight tests the following functions.

    • Resource installation

    • <execNative> calls

    • File transformations

    • File deletion, when uninstalling resources

    Running a detailed preflight increases the amount of time the preflight takes.

  10. (Optional) To limit the number of hosts running at the same time, type the number of hosts on which to run a plan in the field provided.

    When a plan is run on several hosts simultaneously, all hosts must complete a particular step before any host can begin the next step. If the number of hosts is too high, the network connection can time out between steps.

    For example, the time interval between Host A finishing the first step and being able to run the second step might be too long. In this case, the length of the time interval causes the network connection to time out.

  11. (Optional) To limit the overall running time of a plan or of native calls, type a number in the fields provided, then choose the time unit, such as minutes, from the menu.

    By limiting the runtime of a plan or native call, you prevent a nonresponsive host from tying up the progress of a running plan.

    If you set up a notification rule to alert you to plan failures, when the plan times out, you will be notified that the plan was unsuccessful.

    For information about setting up notification rules, see Configuring Email Notification in N1 Grid Service Provisioning System 5.0 System Administration Guide.

  12. Specify whether to deploy the component.

    • To run just the preflight test of the procedure, click Run Preflight Only.

    • To run the preflight test and then the procedure itself, click Run Plan (Includes Preflight).

      Note that the procedure is not run if the preflight fails.

Summary of Plan CLI Commands

You can use the following pdb commands to manage plans:

The following pe commands are associated with running plans:

For more information about the provisioning system CLI commands, see the N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual.