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. .. toctree:: :maxdepth: 2 .. note: screenshot starting width: 1200 x 675 or 1200 x 900 .. |My Projects| image:: ../../../shared/images/v2.6.2/portal/my_projects.jpg :width: 400 :alt: My projects .. |New Workflow Project Dashboard| image:: ../../../shared/images/v2.6.2/portal/project_dashboard_workflows_empty.jpg :width: 400 :alt: Project dashboard for Workflows .. |Step Reload Apache in Development| image:: ../../../shared/images/portal/pipeline_action_reload_apache.jpg :width: 400 :alt: Reload Apache action .. |Pipeline Reload Apache in Development| image:: ../../../shared/images/portal/pipeline_reload_apache.jpg :width: 400 :alt: Reload Apache pipeline .. |Project Pipeline Reload Apache in Development| image:: ../../../shared/images/v2.6.2/portal/project_dashboard_workflows_apache.jpg :width: 400 :alt: Pipelines listing with Reload Apache available .. |Green Circle| image:: ../../../shared/images/v2.6.2/portal/icon_green_circle.jpg :height: 16 :align: middle :alt: Project ready .. |Pipelines Icon| image:: ../../../shared/images/v2.6.2/portal/icon_pipelines.jpg :height: 16 :align: middle :alt: Open the Pipelines dashboard .. |Play Icon| image:: ../../../shared/images/v2.6.2/portal/icon_play.jpg :height: 16 :align: middle :alt: Run a pipeline 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 :ref:`System Admin Verification guide ` to confirm before proceeding. Create a New Workflow Project +++++++++++++++++++++++++++++ Follow the :ref:`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 (|Green Circle|); 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. |New Workflow Project Dashboard| 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: (|Pipelines Icon|) Create Reload Apache Pipeline ----------------------------- Create New Step "Reload Apache Configuration in Development" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Steps are used to automate individual parts of a workflow. Follow the :ref:`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. |Step Reload Apache in Development| 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 :ref:`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. |Pipeline Reload Apache in Development| After you have successfully created the service step and pipeline, the pipelines dashboard will list one pipline and look similar to the screenshot here. |Project Pipeline Reload Apache in Development| To run this pipeline manually you will need to click the Play button (|Play Icon|). 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: #. 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 #. Run the *Reload Apache in Development* pipeline for each environment to reload Apache.