N1 Grid Service Provisioning System 5.0 Operation and Provisioning Guide

Chapter 1 Deploying Components

This chapter provides a brief description of what plans are and how to deploy components.

About Component Deployment

You can deploy components using any of three methods.

Using Direct-Run Component Procedures

For straightforward deployments that don't involve multiple components or synchronization among hosts, you might not need a plan to deploy. Instead, you might be able to use one of the direct-run component procedures that the provisioning software automatically generates when you check in a component that you want to deploy.

ProcedureHow to Use Direct-Run Component Procedures

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

This procedure describes how to deploy a component directly by using the browser interface. Use the following commands to perform the equivalent functionality.

For a detailed description of this command, see Chapter 9, pdb: CLI Commands for Managing Plans, in N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual and Chapter 10, pe: CLI Commands for Running Plans, in N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual.

For more information on component development, see N1 Grid Service Provisioning System 5.0 Plan and Component Developer’s Guide.

Before You Begin

To use direct-run component procedures, you must belong to a user group that has Run Component Procedures permission on the folder that contains the component. You must also have Allow on Host Set permission for the host set on which you plan to deploy the component.

Steps
  1. From the navigation menu, choose Components.

    The Components page is displayed.

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

    The component's Details page is displayed.

  3. In the Component Procedures table, determine the procedure that you want to run and click Run.

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

    The Run page for the generated plan displays.

  4. In the Plan Parameters area, select the variable settings for the component you plan to deploy.

    • If the variable settings have been established for this component, select 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 displays.

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

        The Import Variable Settings window displays.

        1. If necessary, navigate 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 display in the table.

        4. Click Select.

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

        The Select Variable Settings From List window displays.

        1. In the text field at the top of the table, enter the name of the new variable settings set.

        2. Select the component variable you want to change.

          The table cell is highlighted and a text field appears.

        3. Type the new value of the component variable.

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

          The new variable settings display in the table.

        5. Click Select.

  5. Select where you plan to deploy the component.

    • To select a host, use the Target Host text field to type a host's name or click Select From List.

    • To select a target host set, use the Target Host Set menu.

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

  7. In the Options area, select whether you want 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 preflight takes.

  8. (Optional) To limit the number of hosts running at the same time, type the number of hosts in the field provided.

    When a plan is run against several hosts simultaneously, all hosts must complete a step before any host can progress to the next step. If the number of hosts is too high, the network connection can time out between steps. For example, the time between Host A finishing step 1 and being pinged for step 2 might be too long and cause the network connection to time out.

  9. (Optional) To limit overall running time of a plan or to limit the running time of native calls, type a number in the fields provided. Then select the time unit from the menu.

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

    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 on setting up notification rules, see Configuring Email Notification in N1 Grid Service Provisioning System 5.0 System Administration Guide.

  10. Select whether you want to deploy the component.

    • 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).

Using Plans

You can run two types of plans in the provisioning system.

Generated Plans

The provisioning system can automatically generate a plan consisting of multiple component procedures. You can run this plan directly or save it for use as a template for more sophisticated plans that you author in XML.

Custom Plans

You can author custom plans in XML. For information about writing custom plans, see Creating Plans in N1 Grid Service Provisioning System 5.0 Plan and Component Developer’s Guide and the N1 Grid Service Provisioning System 5.0 XML Schema Reference Guide.

ProcedureHow to Create Generated Plans

This procedure describes how to generate a plan by using the browser interface. You can also generate plans by using the following commands.

For a detailed description of these commands, see Chapter 9, pdb: CLI Commands for Managing Plans, in N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual.

Before You Begin

To create a generated plan, you must belong to a user group that has Create, Edit, 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 displays.

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

    The component's Details page displays.

  3. In the Component Procedures table, select each procedure that you want to include in the plan.

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

    The generated plan's Advanced Edit displays.

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

  6. 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 different from the plan name specified in the XML model. The XML model is updated according to what you type into the plan name text field.


  7. Confirm the component check in.

    1. Verify that you have 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 Detail's page is displayed.

Managing Component Deployment

Deploying components with the help of plans can often take a significant amount of time. To provide visibility into the process of deploying components, you can monitor plans and view information about running or completed plans. You can also stop a plan in the middle of a deployment.

ProcedureHow to Run a Plan

This procedure describes how to run a plan by using the browser interface. You can also run plans by using the following command.

For a detailed description of this command, see Chapter 10, pe: CLI Commands for Running Plans, in N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual.

Before You Begin

Ensure that you have the installation information that will allow you 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 in the folder that contains the plan you need to run.

Steps
  1. Go to the plan's Details page.

  2. Click Run.

    The plan's Run page displays.

  3. In the Plan Parameters area, select the variable settings for the component you plan to deploy.

    • If the variable settings have been established for this component, select 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 displays.

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

        The Import Variable Settings window displays.

        1. If necessary, navigate 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 display in the table.

        4. Click Select.

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

        The Select Variable Settings From List window displays.

        1. In the text field at the top of the table, enter the name of the new variable settings set.

        2. Select the component variable you want to change.

          The table cell is highlighted and a text field appears.

        3. Type the new component variable value.

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

          The new variable settings display in the table.

        5. Click Select.

  4. Select where you plan to deploy the component.

    • To select a host, use the Target Host text field to type a host's name or click Select from List.

    • To select a target host set, use the Target Host Set menu.

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

  6. In the Options area, select whether you want 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 transforms

    • File deletion, when uninstalling resources

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

  7. (Optional) To limit the number of hosts running at the same time, type the number of hosts in the field provided.

    When a plan is run against several hosts simultaneously, all hosts must complete a step before any host can progress to the next step. If the number of hosts is too high, the network connection can time out between steps. For example, the time between Host A finishing step 1 and being pinged for step 2 might be too long and cause the network connection to time out.

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

    By limiting the run time of a plan or native call, you prevent a non-responsive host from tying up the progress of a running a 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 on setting up notification rules, see Configuring Email Notification in N1 Grid Service Provisioning System 5.0 System Administration Guide.

  9. Select whether you want to deploy the component.

    • 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).

ProcedureHow to View the Progress of a Plan

This procedure describes how to view the progress of a plan by using the browser interface. You can also view a plan's history by using the following commands.

For a detailed description of these commands, see Chapter 10, pe: CLI Commands for Running Plans, in N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual.

Steps
  1. In the navigation menu, expand the Application Deployment category and click Run History.

    All running and completed plans and preflight checks are listed. A running plan is indicated by a timestamp in the Completed column. The timestamp is the time at which the plan run was initiated.

  2. To view the details about a particular plan, click Results.

    By selecting the Details, Preflight, or Deployment icons, you can toggle between the plan details, the results of the preflight, and the results of the deployment.

    The Details page shows the following information.

    • Target host

    • Variable settings used for the plan's parameters

    • Limits imposed on the plan

    • User who ran the plan

ProcedureHow to Stop a Running Plan

This procedure describes how to stop a plan by using the browser interface. You can also stop plans by using the following command.

For a detailed description of this command, see Chapter 10, pe: CLI Commands for Running Plans, in N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual.

Before You Begin

To stop a plan, you must be either the user that started the plan or a member of the admin user group.

Step

    Cancel the running plan.

    • From the Run Deployment page, click Cancel Plan.

      The Run History page displays a message stating that the plan was cancelled by a user.

    • From the Run History page, determine the plan you want to stop.

      1. In the Action column, click Progress.

        The Run Deployment page displays.

      2. Click Cancel Plan.

Deployment Examples

You can use direct-run component procedures and generated plans to manage your applications.

Updating a Component

You can update a component to a newer version of that component. The newer component might reflect a product revision, a change to a file, or a directory that has new files added to it.

If you need to update a simple component, you only need to run the direct run install procedure. The install procedure will overwrite the old component version with the new version.

If you need to update a composite component (a component that references more than one simple component) and the set of referenced components are the same in each component version, you can run the direct run install procedure. The install procedure will overwrite each of the old simple components with the new versions.

If you need to update a composite component and the new version of the component contains a different set of referenced components, you will need to uninstall the old component version and install the new version. By uninstalling the old version, you prevent components that are no longer used or updated from cluttering your work space.

Downgrading to a Previous Component Version

Sometimes the upgrade of a component fails or you experience problems with the upgraded application. In such cases, you can downgrade to a reliable version of the component while you troubleshoot the new component version.

ProcedureHow to Downgrade to a Previous Component Version

Before You Begin

To redeploy a reliable component version, you must have Run Component Procedure and Allow on Host Set permissions on the folder that contains the component.

Steps
  1. Uninstall the broken component.

    1. From the component's Details page, click Run for the Default: Uninstall component procedure.

    2. From the plan's Run page, select the host from which you want to uninstall the component.

    3. Click Run Select Installations.

    4. Click Run Plan (Includes Preflight).

    By uninstalling the broken component version you ensure that old, unwanted files are removed from the system you deployed to.

  2. Select the component version that you need to roll back to.

    1. From the component's Details page, click Version History.

    2. From the Version History page, display the reliable component version by clicking Unhide and then click Details.

  3. Install the reliable version of the component.

Migrating a Component From One Server to Another

You can migrate a component from one server to another by simply uninstalling the component you want to move from its current host and reinstalling the component on the new host.

Grouping Simple Components in Container Components

You might want to create a container component if you need to deploy multiple simple components as a group to the same host or host set. Grouping simple components speeds deployment time and ensures that no component is forgotten when the set of components is deployed.

ProcedureHow to Create a Container Component

Before You Begin

To create a container component, you must have Create, Edit, Delete permission on the folder in which you want to create the component.

Steps
  1. From the Components page, create a new component.

    1. In the Component field, type the name of the new component.

    2. In the Type field, select System#container.

    3. In the Description field, type a description of the new component.

    4. Click Create.

  2. In the Referenced Components section, add components to the container.

    • If the components you need to reference already exist, click Reference Existing.

      The Reference Existing Components in Current Component window appears.

      1. Select the component that you want to reference in the container component and click Reference Checked Components.

        If you reference a component that contains component variables, the component variables are listed in a table before they are added to container component.

      2. If necessary, set the component variable's default value in the text field next to the component variable name.

      3. Click Continue to Reference Components.

        You are returned to the container component's Edit page. The referenced component is displayed in the Referenced Components table.

    • If the component you need to reference does not exist, click Check In New.

      Create the new component.

      For information about how to create a new component, see Chapter 2, Components, in N1 Grid Service Provisioning System 5.0 Plan and Component Developer’s Guide.

      After you have created the new component, the container component's Referenced Components table refreshes with the new component listed.

  3. If necessary, provide values for the component variables that need to be defined by the container component.

    If a component has a :[container....] substitution variable, the container component needs to define the value.