ECCopernicus

Automation

1. Tasks

Tasks are primarily created for use in Workflows, but a single Task can also be executed on an existing instance. There are many Task Types available, including scripts added directly, scripts and templates from the Library section, recipes, playbooks, salt states, puppet agent installs, and http calls.

Adding Tasks

  1. Select the Library link in the navigation bar.

  2. Select Automation from the sub-navigation menu.
  1. Make sure you are in the Tasks tab and click the + ADD button.
  1. From the New Task Wizard input a name for the task.
  1. Select the type of task from the type dropdown.
  1. Input the appropriate details dependent on the task type you selected from the dropdown and click SAVE CHANGES.

If you want to run a script that is on an instance form the Morpheus panel, then you MUST provide the full paths to the files/directories in both the script on the instance and in the Morpheus Script that runs the script.

For example:

If the user script assumes saving a file, it must provide the full path where this file is to be saved. For example, if the script contains the command:

touch test.txt

A script executed from the Morpheus level will fail. The user must specify the full path in the script on the instance:

touch /home/user/test/test.txt

We recommend adding sudo apt update && sudo apt upgrade line at the beginning of the script. We also recommend adding -y option to confirm the command. Otherwise, the command will not be executed because the task will wait for user response.

Editing Tasks

  1. Select the Provisioning link in the navigation bar.

  2. Select Automation from the sub-navigation menu.

  3. Click the Edit icon on the row of the task you wish to edit.
  1. Modify information as needed.

  2. Click the Save Changes button to save.

Deleting Tasks

  1. Select the Provisioning link in the navigation bar.

  2. Select Automation from the sub-navigation menu.

  3. Click the Delete icon on the row of the task you wish to delete.

One-time task execution

  1. Navigate to Provisioning → Instances

  2. Select an Instance

  3. Select ACTIONS → RUN TASK
  1. Choose a task you want to run.
  1. Click EXECUTE

Task execution result

  1. Navigate to Provisioning → Instances

  2. Select an Instance

  3. Select History tab in the bottom table

2. Workflows

Add Workflow

  1. Select the Provisioning link in the navigation bar.

  2. Select Automation from the sub-navigation menu.

  3. Click the Workflows tab to show the Workflows tab panel.
  1. Click the + ADD button and select one of the options.
  1. From the New Workflow Wizard input a name for the workflow.

  2. Optionally input a description.

  3. Expand the execution phases to add tasks to, and type the name of a created task and click the task when it appears to add.

  4. If multiple tasks are added to the same execution phase, their execution order can be changed by selecting the grip icon and dragging the task to the desired execution order.

  5. For multi-tenant environments, select Public or Private visibility for the Workflow.

  6. Click the SAVE CHANGES button to save.

Edit Workflow

  1. Select the Provisioning link in the navigation bar.

  2. Select Automation from the sub-navigation menu.

  3. Click the Workflows tab to show the workflows tab panel.

  4. Click the Edit icon on the row of the workflow you wish to edit.
  1. Modify information as needed.

  2. Click the Save Changes button to save.

Delete Workflow

  1. Select the Provisioning link in the navigation bar.

  2. Select Automation from the sub-navigation menu.

  3. Click the Workflows tab to show the workflows tab panel.

  4. Click the Delete icon on the row of the workflow you wish to delete.

Workflow execution when creating an instance

  1. When creating an instance, in the Automation tab, expand the Automation section.

  2. In the WORKFLOW dropdown, select a workflow.
  1. Continue creating the instance.

If you want to check workflow execution result:

  1. Navigate to Provisioning → Instances

  2. Select the instance you have created

  3. Select History tab in the bottom table

One-time workflow execution

  1. Navigate to Provisioning → Instances

  2. Select an Instance

  3. Select ACTIONS → RUN WORKFLOW
  1. Choose a workflow you want to run.
  1. Click EXECUTE

Workflow execution result

  1. Navigate to Provisioning → Instances

  2. Select an Instance

  3. Select History tab in the bottom table

3. Power Scheduling

Set weekly schedules for shutdown and startup times for Instances and VM’s. Apply Power Schedules to Instances pre- or post-provisioning.

Create Power Schedules

  1. Navigate to Library → Automation → Power Scheduling

  1. Select +ADD
  1. Configure the following options:

NAME - Name of the Power Schedule

DESCRIPTION - Description for the Power Schedule

TIME ZONE - Time Zone the Power Schedule times correlate to.

TYPE

Power On - Power Up and then Down at scheduled times

Power Off - Power Down then Up at scheduled times

Enabled - Check for Power Schedule to be Active. Uncheck to disable Power Schedule.

DAYS - Slide the start and end time controls for each day to configure each days Schedule. Green sections indicate Power on, red sections indicate Power Off. Time indicated applies to selected Time Zone.

Add Power Schedule to Instance

  1. Navigate to Provisioning -> Instances.

  2. Select an Instance

  3. Select EDIT
  1. In the POWER SCHEDULE dropdown, select a Power Schedule.
  1. Select SAVE CHANGES

Remember, create power schedules for Instance before or after deployment. Otherwise, the POWER SCHEDULE option will be invisible.

4. Execute Scheduling

Execute Scheduling creates time schedules for Jobs, including Task, Workflow and Backup Jobs.

Create Execution Schedules

  1. Select the Provisioning link in the navigation bar.

  2. Select Automation from the sub-navigation menu.

  3. Select the Execute Scheduling tab, then click + ADD button.
  1. Enter the NAME of the Execution Schedule and optionally the DESCRIPTION.

  1. Set the SCHEDULE according to your preferences and click SAVE.

5. Jobs

Jobs are for scheduled execution of Automation Tasks and Workflows. Jobs can be set to execute on a schedule, at one specific point in time, and/or execute manually (on-demand). Jobs are linked to existing Tasks or Workflows, and allow for custom configuration options. Jobs can be associated with Instances, Servers, or have no association, such as a job for an SSH task.

Adding Jobs

  1. Select the Provisioning link in the navigation bar.

  2. Select Jobs from the sub-navigation menu.
  1. Click the + ADD button.
  1. Enter the NAME of the job and select JOB TYPE, then click NEXT.
  1. Select the TASK you execute in this job. Task must be created in the Automation → Tasks section.

  1. Select SCHEDULE to Manual or choose one of the schedulers. You can create your own in the Automation → Execute Scheduling section.
  1. Choose the CONTEXT TYPE and start typing the name of the CONTEXT SERVER/CONTEXT INSTANCE. Select the ones where you want to run the tasks.
  1. Click NEXT.
  1. In the REVIEW tab you can once again check all settings, then click COMPLETE to finish.