executions

The cfy executions command is used to manage workflow executions on Cloudify Manager.

You can use the command to start, cancel and and list executions and to retrieve information about a single execution.

You can also schedule executions to start in a specific date and time in the future (using the --schedule flag).

Optional flags

These commands support the common CLI flags.

Commands

start

Usage

cfy executions start [OPTIONS] WORKFLOW_ID

Execute a workflow on a given deployment

WORKFLOW_ID is the ID of the workflow to execute (e.g. uninstall)

Optional flags

 

Example

$ cfy executions start install -d cloudify-nodecellar-example
...

Executing workflow install on deployment cloudify-nodecellar-example [timeout=900 seconds]
2017-03-29 11:34:11.704  CFY <cloudify-nodecellar-example> Starting 'install' workflow execution
2017-03-29 11:34:12.204  CFY <cloudify-nodecellar-example> [hos...
.
.
.
2017-03-29 11:36:47.537  CFY <cloudify-nodecellar-example> 'install' workflow execution succeeded
Finished executing workflow install on deployment cloudify-nodecellar-example
* Run 'cfy events list -e f38ad989-d09e-4b68-b041-ac63aeacb9ae' to retrieve the execution's events/logs

...

cancel

Usage

cfy executions cancel [OPTIONS] EXECUTION_ID

Cancel a workflow’s execution

EXECUTION_ID - The ID of the execution to be canceled.

Optional flags

 

Example

$ cfy executions cancel eba71d2b-2456-4423-acb0-f8fc7324e793
...

Cancelling execution eba71d2b-2456-4423-acb0-f8fc7324e793
A cancel request for execution eba71d2b-2456-4423-acb0-f8fc7324e793 has been sent. To track the execution's status, use:
cfy executions get eba71d2b-2456-4423-acb0-f8fc7324e793

...

list

Usage

cfy executions list [options]

List executions.

If DEPLOYMENT_ID is provided, lists executions for that deployment. Otherwise, lists executions for all deployments.

Optional flags

 

Example

$ cfy executions list
...

Listing all executions...

Executions:
+--------------------------------------+-------------------------------+------------+---------------+--------------------------+-------+------------+----------------+------------+
|                  id                  |          workflow_id          |   status   | deployment_id |        created_at        | error | permission |  tenant_name   | created_by |
+--------------------------------------+-------------------------------+------------+---------------+--------------------------+-------+------------+----------------+------------+
| fa330011-1f33-4e6c-82cb-a4537e13c950 |            install            | terminated |   nodecellar  | 2017-03-28 07:47:04.733  |       |  creator   | default_tenant |   admin    |
| 261ac6f8-c75d-4e28-9c62-646925cd326c |           uninstall           | terminated |   nodecellar  | 2017-03-28 07:55:02.582  |       |  creator   | default_tenant |   admin    |
+--------------------------------------+-------------------------------+------------+---------------+--------------------------+-------+------------+----------------+------------+

...

summary

Usage

cfy executions summary <field> [optional sub-field] [OPTIONS]

Summarizes executions, giving a count of elements with each distinct value for the selected field. If a sub-field is selected then a count will be given for each distinct field and sub-field combination, as well as totals for each field.

For valid field/sub-field names, invoke cfy executions summary

 

Example

$ cfy executions summary deployment_id
Retrieving summary of executions on field deployment_id

Execution summary by deployment_id
+---------------+------------+
| deployment_id | executions |
+---------------+------------+
|      sga1     |     2      |
|      sga3     |     2      |
|      sga2     |     2      |
|       s3      |     2      |
|       s2      |     2      |
|       s1      |     2      |
|       s5      |     2      |
|       s4      |     2      |
|      sg1      |     2      |
+---------------+------------+

...

$ cfy executions summary workflow_id status
Retrieving summary of executions on field workflow_id

Execution summary by workflow_id
+-------------------------------+------------+------------+
|          workflow_id          |   status   | executions |
+-------------------------------+------------+------------+
|        create_snapshot        | terminated |     1      |
|        create_snapshot        |   TOTAL    |     1      |
| create_deployment_environment | terminated |     9      |
| create_deployment_environment |   TOTAL    |     9      |
|            install            | terminated |     9      |
|            install            |   TOTAL    |     9      |
|        restore_snapshot       |  started   |     1      |
|        restore_snapshot       |   TOTAL    |     1      |
+-------------------------------+------------+------------+

...

get

Usage

cfy executions get [OPTIONS] EXECUTION_ID

Retrieve information for a specific execution.

EXECUTION_ID is the execution about which to retrieve information.

Optional flags

 

Example

$ cfy executions get f38ad989-d09e-4b68-b041-ac63aeacb9ae
...

Retrieving execution f38ad989-d09e-4b68-b041-ac63aeacb9ae

Execution:
+--------------------------------------+-------------+------------+-----------------------------+--------------------------+--------------------------+-------+------------+----------------+------------+
|                  id                  | workflow_id |   status   |        deployment_id        |        created_at        |        ended_at          | error | permission |  tenant_name   | created_by |
+--------------------------------------+-------------+------------+-----------------------------+--------------------------+--------------------------+-------+------------+----------------+------------+
| f38ad989-d09e-4b68-b041-ac63aeacb9ae |   install   | terminated | cloudify-nodecellar-example | 2017-03-29 11:34:11.014  | 2017-03-29 11:34:11.410  |       |  creator   | default_tenant |   admin    |
+--------------------------------------+-------------+------------+-----------------------------+--------------------------+--------------------------+-------+------------+----------------+------------+

Execution Parameters:
...

resume

cfy executions resume [OPTIONS] EXECUTION_ID

Resume the execution of a workflow in a failed or cancelled state.

EXECUTION_ID is the ID of the execution to resume. The workflow will run again, restoring the tasks graph from the storage, and retrying failed tasks when necessary. If reset-operations is passed, tasks that were started but didn’t fail will be retried as well.

Optional flags

Example

$ cfy executions resume 19280e9a-7163-4066-b4f4-a09aaed6dd0e
...
Resuming execution 19280e9a-7163-4066-b4f4-a09aaed6dd0e
A resume request for execution 19280e9a-7163-4066-b4f4-a09aaed6dd0e has been sent. To track the execution's status, use:
cfy executions get 19280e9a-7163-4066-b4f4-a09aaed6dd0e