Lesson 4: Preparing the deployment plan

In this lesson, you will configure the segments in the Default Plan and add a segment to it.

A deployment plan is always attached to a release. A deployment plan contains the tasks that must be completed for a successful deployment. Deployment plans are identified by their names and the releases they are assigned to. When you create a deployment plan, you assign it to a release.

The deployment plan is organized by segments. Segments are groups of tasks that are related in some business-meaningful focus. A deployment plan can have any number of segments, however; it must have at least one. The number of segments and their composition is up to you.

A task is a business meaningful activity with a start point, end point, and a measurable duration. There are several types of tasks: manual, automated deploy, wait, signal, outage, critical event, and wait for time. In this tutorial, you use manual, signal, and wait tasks. Typically, all tasks are defined in a plan before deployment, however; you can add task during a running deployment. If you add tasks during a deployment, the tasks are saved and are available the next time you use it for a deployment.

Tasks are organized into segments. A deployment plan can have any number of segments and must have at least one. The number of segments and their composition is up to you. A task, regardless of its type, must be added to a specific segment. The deployment plan in this tutorial uses three segments.

To finish a deployment, all tasks within a segment must be resolved.

The deployment plan that you will create in this tutorial is identified as Default Plan-Demo Release. Each new release that you create is initially assigned a copy of the original, default plan called Default Plan. The Default Plan that is assigned to the next release you create will not reflect the changes you make to the Default Plan attached to the Demo Release.

  1. From the dashboard, click Releases and Deployments, and then click Deployment Plans.
  2. Click the Default Plan link for the Demo Release.
    The Default Plan is attached to every phase when the release is created.
    The figure below show the Default Plan-Demo Release:The Default Plan page
    The Default Plan has two segments: Pre-Deployment Tasks and Deployment Tasks. Neither segment contains tasks.
    • The Pre-Deployment Tasks segment starts as soon as the deployment starts. Segments with other segments as prerequisites cannot start until all the prerequisite segments are complete.
    • The Deployment Tasks segment has the Pre-Deployment Tasks segment as a prerequisite, which is indicated by the Dependencies: 1 property in the figure. Because of this dependency the Deployment Tasks segment cannot start until all the tasks in the Pre-Deployment Tasks segment are completed. Segments without executor roles assigned to them start as soon as they are eligible. Segments with executor roles cannot start until someone in the role manually starts the segment. Otherwise, segments without prerequisites or executors can start as soon as the deployment starts.

    Although segments do not necessarily run in the order that they are listed, the first segment is usually the one you want to start first. You can rearrange the segment order with the up and down arrows on the right side. Tasks can start after their parent segment starts.

  3. Before adding tasks to the segment, we will configure the segment. Click the Edit action for the Pre-Deployment Tasks segment.
    The configuration fields for the Pre-Deployment Tasks segment are displayed, as shown in the following figure:
    Segment configuration fields
    All segments have the same configuration fields.
    Execution Pattern
    Determines how the segment duration is calculated, and when tasks are eligible to run. The values are: sequential and parallel.
    Parallel
    The segment's duration is equal to the duration of the longest task in the segment, and tasks can start simultaneously.
    Sequential
    The segment duration is equal to the duration of all tasks in the segment. If you select Sequential and Sequential Execution Enforced, tasks must run in the order they are listed. If you select Sequential but not Sequential Execution Enforced, tasks can run in any order but the duration is still equal to the tasks' total duration.
    Sequential Execution Enforced
    Indicates that all tasks in the segment must be run in the order that they are listed. The duration for the segment equals the duration of all tasks in the segment.
    Executor Role
    Assigns a role that has authority to start the segment. If a role is assigned, only users with that role can start the segment. Selecting None allows all users to start the segment.
  4. Select the Sequential Execution Enforced check box.
    The duration for the Pre-Deployment Tasks segment equals the duration of all tasks in the segment. Also, the tasks must be run in the order that they are listed.
  5. Click Save, and then close the configuration area for the segment.
    Because the Pre-Deployment Tasks segment is the first segment, it cannot be assigned a prerequisite segment.
    The heading for the Pre-Deployment Tasks segment displays Sequential Enforced.
    Pre-deployment segment configuration
  6. Open the configuration area for the Deployment Tasks segment and set the following., and then, below Prerequisites, make sure that Pre-Deployment Tasks is selected.

    Set the value for the Execution Pattern field to Parallel. The tasks in this segment can start in any order, and multiple tasks can be run at the same time.

    Under the Prerequisites heading, verify that make sure that Pre-Deployment Tasks is selected. The Deployment Tasks segment has the Pre-Deployment Tasks segment as a prerequisite.

  7. Click Save, and then close the configuration area for the Deployment Tasks segment.
    The heading for the Deployment Tasks segment displays Dependencies: 1 and Parallel.
    Deployment task configuration
  8. Click Create Segment and complete the following steps to add a segment to the deployment plan:
    1. In the Name field, enter Deployment Tasks II, or some other suitable name.
    2. Accept the default values for the other fields.
      The Deployment Tasks II segment does not have a prerequisite segment. Like the Pre-Deployment Tasks segment, this segment starts as soon as the deployment starts. After the segment starts, the tasks in this segment can start in any order.
    3. Click Save.
      Note: You can also create segments by hovering the mouse between segments and then clicking the Add button (Icon for adding segments.
    The new segment is inserted at the beginning of the plan.
  9. Use the down arrow (down arrow) until the Deployment Tasks II segment is positioned at the end of the segment list.
    The order in which segments are displayed is not necessarily the order in which they run. When you are creating a deployment plan, it can be useful to arrange the segments in the order that you expect them to run.

Lesson checkpoint

In this lesson, you modified the segments in the Default Plan and added a segment to it.

You configured the Default Plan to follow a specific workflow. The first segments to start are the Pre-Deployment Tasks and Deployment Tasks II segments. The tasks in the Pre-Deployment Tasks segment must be completed in the order that they are listed. Just as you did with the segment order, you can rearrange the task order within a segment by using the up and down arrows. The tasks in the Deployment Tasks segment cannot start until all tasks in its prerequisite segment finish. After the segment starts, the tasks in the Deployment Tasks segment can be resolved in any order. Multiple tasks can be run at the same time. Although the tasks in the Deployment Tasks II segment can start when the deployment begins, later you order task dependencies so that these tasks are actually done last.
The Default Plan with three segments