Workflow

The Workflow project type is intended for pure automation tasks using scripts and services. This guide will create a Workflow project intended to restart the Apache service in selected environments.

Before proceeding make sure your Cascade installation has at least one deployment target configured to use the environment(s) and deployment groups defined for your system. The default setup creates a single deployment group for use in a standard development -> staging -> production workflow; however,there can be more or less depending on your needs.

Login to Cascade

Login to Cascade using your credentials, the next page you should see is the My Projects dashboard as shown below.

Take note of the “Add New Project” button location under the user drop-down at the top right of the page. You will be clicking that soon!

My projects

Check your account permissions

Please note that you must have the System Admin privileges in Cascade in order to create a new project. Use the System Admin Verification guide to confirm before proceeding.

Create a New Workflow Project

Follow the Add a New Project guide with the following directives:

Step 1: Select “Workflow” as the project type.

Step 2: As written. Optional: enter “Restart Apache” as the project name for an exact match to this guide.

Step 3: As written. Optional: use Development, Staging, and Production environments for an exact match to this guide.

Step 4: Skip. Workflow projects do not use the GitLab repositories

Click the “Save Project” button at the top of the page.

Create a Workflow Project in Development

Navigate to the “My Projects” display, you may have to reload the page to see your new project. Take note of the status icon in the first column of the My Projects display and use the mouse pointer hover description for more information.

When your new project has been successfully created, you should see a green circle icon (Project ready); this icon being displayed means your project has been provisioned and is ready to configure further, click on the project name to open the project dashboard. You can edit all aspects of an individual project from within the project dashboard.

Those who are new to Workflow projects will notice that the landing page for them is the Pipelines dashboard. This is expected as the Workflow type does not deploy to environments like the other projects; instead, workflows execute actions directly in connected environments.

Project dashboard for Workflows

Pipelines are containers that run a collection of actions, and, there are not bundled pipelines or steps included in Workflow projects. If you are unfamiliar with the icon for the Pipelines dashboard, it looks like a command prompt with a little cursor: (Open the Pipelines dashboard)

Create Reload Apache Pipeline

Create New Step “Reload Apache Configuration in Development”

Steps are used to automate individual parts of a workflow. Follow the Add a New Pipeline Step guide with the following directives:

Step 1: Step Type

  • Service

Step 2: Common Properties

  • Step Name: Reload Apache Configuration in Development
  • Target Environment: Select Development
  • Deployment Group: Select Code

Step 3: Type Specific Properties

  • Service Name: httpd
  • Service Action: Reload

You should end up with a form matching below, click the create button to create the step.

Reload Apache action

Create New Pipeline “Reload Apache in Development”

In order to run a step, you need to add to an existing or new pipeline. Since you will not be reloading Apache all the time, you should create a new Pipeline also named “Reload Apache in Development” and add your new step to it by selecting it from the dropdown.

Follow the Add a New Pipeline guide with the following directives:

Step 1: Pipeline Template Name: Reload Apache in Development.

Step 2: Select the “Reload Apache in Development” step you just created.

Step 3: Click save.

You should end up with a form that looks similar to below or in the add pipeline guide, click the save button to create the pipeline.

Reload Apache pipeline

After you have successfully created the service step and pipeline, the pipelines dashboard will list one pipline and look similar to the screenshot here.

Pipelines listing with Reload Apache available

To run this pipeline manually you will need to click the Play button (Run a pipeline).

Create a Workflow Project in Staging and Production

Once your development pipeline suits your liking and you are ready to push things live, you have a few more simple tasks to complete:

  1. Replicate the Reload Apache in Development step and pipeline for each remaining environment In this example, the remaining environments are Staging and Production and you will end up with the following pipelines and associated script actions:
    • Pipeline Reload Apache in Staging
      • Step: Reload Apache in Staging
    • Pipeline Reload Apache in Production
      • Step: Reload Apache in Production
  2. Run the Reload Apache in Development pipeline for each environment to reload Apache.