Conductor Documentation

deployments

The cfy deployments command is used to manage running deployments on a Conductor manager.

You can use the command to create, delete, update and list deployments and to show the outputs for a specific deployment.

For more information, see deployment update process.

Optional flags

These commands support the common CLI flags.

Commands

create

Usage

cfy deployments create [OPTIONS] [DEPLOYMENT_ID]

Create a deployment on the Manager

DEPLOYMENT_ID - The ID of the deployment to be created.

Mandatory flags

Optional flags

 

Example

$ cfy deployments create -b simple-python-webserver-blueprint
...

Creating new deployment from blueprint simple-python-webserver-blueprint...
Deployment created. The deployment's id is simple-python-webserver-blueprint

...

update

Usage

cfy deployments update [OPTIONS] DEPLOYMENT_ID

Update a specified deployment according to the specified blueprint.

DEPLOYMENT_ID - is the deployment’s ID to update.

Mandatory flags

Optional flags

For more information, see deployment update process.

Example

$ cfy deployments update simple-python-webserver-blueprint -p simple-python-webserver-blueprint/blueprint.yaml
...

Updating deployment cloudify-nodecellar-example using blueprint cloudify-nodecellar-example/simple-blueprint.yaml
2017-03-30 10:26:12.723  CFY <cloudify-nodecellar-example> Starting 'update' workflow execution
2017-03-30 10:26:13.201  CFY <cloudify-nodecellar-example> 'update' workflow execution succeeded
Finished executing workflow 'update' on deployment 'cloudify-nodecellar-example'
Successfully updated deployment cloudify-nodecellar-example. Deployment update id: cloudify-nodecellar-example-d53a26e8-a10a-4545-956b-8bad45b90966. Execution id: dcf2dc2f-dc4f-4036-85a6-e693196e6331

...

history

Usage

cfy deployments history [OPTIONS]

List deployment updates history.

Optional flags

get-update

Usage

cfy dep get-up [OPTIONS] DEPLOYMENT_UPDATE_ID

List deployment update details.

Optional flags

delete

Usage

cfy deployments delete [OPTIONS] DEPLOYMENT_ID

Delete a deployment from Conductor Manager.

DEPLOYMENT_ID - The ID of the deployment to delete

Optional flags

$ cfy deployments delete simple-python-webserver-blueprint
...

Deleting deployment simple-python-webserver-blueprint...
Deployment deleted

...

list

Usage

cfy deployments list [OPTIONS]

List deployments.

If --blueprint-id is provided, list deployments for that blueprint. Otherwise, list deployments for all blueprints.

Optional flags

 

Example

$ cfy deployments list
...

Listing all deployments...

Deployments:
+-----------------------------+-----------------------------+--------------------------+--------------------------+------------+----------------+------------+
|              id             |         blueprint_id        |        created_at        |        updated_at        | visibility |  tenant_name   | created_by |
+-----------------------------+-----------------------------+--------------------------+--------------------------+------------+----------------+------------+
| cloudify-nodecellar-example | cloudify-nodecellar-example | 2017-03-30 10:14:40.556  | 2017-03-30 10:14:40.556  |   tenant   | default_tenant |   admin    |
+-----------------------------+-----------------------------+--------------------------+--------------------------+------------+----------------+------------+

...

summary

Usage

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

Summarizes deployments, 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 deployments summary

 

Example

$ cfy deployments summary blueprint_id
Retrieving summary of deployments on field blueprint_id

Deployment summary by blueprint_id
+--------------+-------------+
| blueprint_id | deployments |
+--------------+-------------+
|     sga      |      3      |
|      s       |      5      |
|      sg      |      1      |
+--------------+-------------+

...

$ cfy deployments summary --all-tenants tenant_name blueprint_id
Retrieving summary of deployments on field tenant_name

Deployment summary by tenant_name
+----------------+--------------+-------------+
|  tenant_name   | blueprint_id | deployments |
+----------------+--------------+-------------+
|     test1      |      s       |      1      |
|     test1      |      sg      |      3      |
|     test1      |     sga      |      5      |
|     test1      |    TOTAL     |      9      |
|     test2      |     sga      |      1      |
|     test2      |      s       |      3      |
|     test2      |      sg      |      5      |
|     test2      |    TOTAL     |      9      |
| default_tenant |     sga      |      3      |
| default_tenant |      s       |      5      |
| default_tenant |      sg      |      1      |
| default_tenant |    TOTAL     |      9      |
+----------------+--------------+-------------+

...

inputs

Usage

cfy deployments inputs [OPTIONS] DEPLOYMENT_ID

Retrieve inputs for a specific deployment

DEPLOYMENT_ID - The ID of the deployment for which you want to list inputs.

Optional flags

 

Example

$ cfy deployments inputs cloudify-nodecellar-example
...

Retrieving inputs for deployment cloudify-nodecellar-example...
 - "agent_private_key_path":
     Value: /key.pem
 - "agent_user":
     Value: centos
 - "host_ip":
     Value: 172.16.0.7

...

outputs

Usage

cfy deployments outputs [OPTIONS] DEPLOYMENT_ID

Lists all outputs for a deployment. Note that not every deployment has outputs and it depends on whether or not outputs were defined in the blueprint from which the deployment was created

DEPLOYMENT_ID - The ID of the deployment for which you want to list outputs.

Optional flags

 

Example

$ cfy deployments outputs cloudify-nodecellar-example
...

Retrieving outputs for deployment cloudify-nodecellar-example...
 - "endpoint":
     Description: Web application endpoint
     Value: {u'ip_address': u'172.16.0.7', u'port': 8080}

...

capabilities

Usage

cfy deployments capabilities [OPTIONS] DEPLOYMENT_ID

Lists all capabilities for a deployment. Note that not every deployment has capabilities and it depends on whether or not capabilities were defined in the blueprint from which the deployment was created

DEPLOYMENT_ID - The ID of the deployment for which you want to list capabilities.

Optional flags

 

Example

$ cfy deployments capabilities cloudify-nodecellar-example
...

Retrieving capabilities for deployment cloudify-nodecellar-example...
 - "endpoint":
     Description: Web application endpoint
     Value: {u'ip_address': u'172.16.0.7', u'port': 8080}

...

set-visibility

Usage

cfy deployments set-visibility [OPTIONS] DEPLOYMENT_ID

Set the deployment’s visibility to tenant

DEPLOYMENT_ID - The id of the deployment to update.

Mandatory flags

 

Example

$ cfy deployments set-visibility cloudify-nodecellar-example -l tenant
...

Deployment `cloudify-nodecellar-example` was set to tenant

...

set-site

Usage

cfy deployments set-site [OPTIONS] DEPLOYMENT_ID

Set the deployment’s site

DEPLOYMENT_ID is the id of the deployment to update

Optional flags

set-owner

Usage

cfy deployments set-owner [OPTIONS] DEPLOYMENT_ID

Change ownership of a deployment.

DEPLOYMENT_ID - The id of the deployment to update.

Optional flags

 

Example

$ cfy deployments set-owner cloudify-nodecellar-example -s admin
...

Deployment `cloudify-nodecellar-example` is now owned by user `admin`.

...

labels

A deployment label is a key-value pair that can be assigned with a deployment. There can be multiple labels assigned with each deployment, and one can assign more than one label with the same key (yet different value) to the same deployment.

labels list

Usage

cfy deployments labels list [OPTIONS] DEPLOYMENT_ID

List the deployment’s labels.

DEPLOYMENT_ID is the id of the deployment to list the labels for

labels add

Usage

cfy deployments labels add [OPTIONS] LABELS_LIST DEPLOYMENT_ID

Add labels to a specific deployment.

DEPLOYMENT_ID is the id of the deployment to update
LABELS_LIST: <key>:<value>,<key>:<value>. Any comma and colon in <value> must be escaped with \

labels delete

Usage

cfy deployments labels delete [OPTIONS] LABEL DEPLOYMENT_ID

Delete labels from a specific deployment.

DEPLOYMENT_ID is the id of the deployment to update
LABEL: A mixed list of labels and keys, i.e. <key>:<value>,<key>,<key>:<value>. If <key> is provided, all labels associated with this key will be deleted from the deployment. Any comma and colon in <value> must be escaped with \

schedule

A deployment schedule, a.k.a. execution schedule, allows the user to set a scheduling rule for the execution of a particular workflow, such as install or uninstall, on a deployment. This allows both single-use, i.e. postponed executions, and recurrent executions (e.g. running each Sunday at 19:30).

schedule list

Usage

cfy deployments schedule list [OPTIONS] [DEPLOYMENT_ID]

List all deployment schedules on the manager. If DEPLOYMENT_ID is provided, list only schedules of this deployment.

Optional flags

Regular optional flags for list commands: * --sort-by TEXT - Key for sorting the list * --descending - Sort list in descending order [default: False] * -t --tenant-name TEXT - The name of the tenant for which to list the deployment schedules. If not specified, the current tenant is used. This argument cannot be used simultaneously with the all-tenants argument. * -a --all-tenants - Include resources from all tenants associated with the user. This option cannot be used simultaneously with the tenant-name argument. * --search TEXT - Search schedules by id. The returned list will include only schedules that contain the given search pattern. * -o, --pagination-offset INTEGER - The number of resources to skip; –pagination-offset=1 skips the first resource [default: 0] * -s, --pagination-size INTEGER - The max number of results to retrieve per page [default: 1000]

Additionally: * -s, --since TEXT - List only schedules which have occurrences after this time. Supported formats: YYYY-MM-DD HH:MM, HH:MM, or a relative time expression such as +2 weeks or +1day+10min. * -u, --until TEXT - List only schedules which have occurrences before this time. Supported formats: YYYY-MM-DD HH:MM, HH:MM, or a relative time expression such as +2 weeks or +1day+10min. * --tz TEXT - The timezone to be used for scheduling, e.g. EST or Asia/Jerusalem. By default, the local timezone will be used. Supports any timezone in the tz database

Valid relative time expressions are of the form +<integer> minutes|hours|days|weeks|months|years or a concatenation of several such, e.g. +1 year +3 months. These can be also written without a space after the number, without the final s, or using the short forms min|h|d|w|mo|y.

schedule get

Usage

cfy deployments schedule get [OPTIONS] DEPLOYMENT_ID SCHEDULE_ID

Retrieve information for a specific deployment schedule.

DEPLOYMENT_ID is the ID of the deployment to which the schedule belongs. SCHEDULE_ID is the ID of the deployment schedule for which to retrieve information.

Optional flags

schedule create

Usage

cfy deployments schedule create [OPTIONS] DEPLOYMENT_ID WORKFLOW_ID

Schedule the execution of a workflow on a given deployment.

DEPLOYMENT_ID is the ID of the deployment for which to create the schedule. WORKFLOW_ID is the ID of the workflow the schedule will run.

Mandatory flags
Optional flags

Valid relative time expressions are of the form +<integer> minutes|hours|days|weeks|months|years or a concatenation of several such, e.g. +1 year +3 months. These can be also written without a space after the number, without the final s, or using the short forms min|h|d|w|mo|y.

Valid recurrence expressions are of the form <integer> minutes|hours|days|weeks|months|years. These can be also written without a space after the number, without the final s, or using the short forms min|h|d|w|mo|y.

Valid weekdays expressions are any of su|mo|tu|we|th|fr|sa, or a comma-separated list of them. These may be optionally prefixed by 1 to 4 or l- (for “last”) signifying a “complex weekday”, e.g. 2mo for “the 2nd Monday of a month” or l-fr for “the last Friday of a month”. Complex weekdays can only be used in tandem with a months or years recurrence.

schedule update

Usage

cfy deployments schedule update [OPTIONS] DEPLOYMENT_ID SCHEDULE_ID

Update an existing schedule for a workflow execution.

DEPLOYMENT_ID is the ID of the deployment to which the schedule belongs. SCHEDULE_ID is the ID of the deployment schedule to update.

Optional flags

Valid relative time expressions are of the form +<integer> minutes|hours|days|weeks|months|years or a concatenation of several such, e.g. +1 year +3 months. These can be also written without a space after the number, without the final s, or using the short forms min|h|d|w|mo|y.

Valid recurrence expressions are of the form <integer> minutes|hours|days|weeks|months|years. These can be also written without a space after the number, without the final s, or using the short forms min|h|d|w|mo|y.

Valid weekdays expressions are any of su|mo|tu|we|th|fr|sa, or a comma-separated list of them. These may be optionally prefixed by 1 to 4 or l- (for “last”) signifying a “complex weekday”, e.g. 2mo for “the 2nd Monday of a month” or l-fr for “the last Friday of a month”. Complex weekdays can only be used in tandem with a months or years recurrence.

schedule delete

Usage

cfy deployments schedule delete [OPTIONS] NAME

Delete a schedule for a workflow execution.

DEPLOYMENT_ID is the ID of the deployment to which the schedule belongs. SCHEDULE_ID is the ID of the deployment schedule to delete.

Optional flags

schedule enable

Usage

cfy deployments schedule enable [OPTIONS] DEPLOYMENT_ID SCHEDULE_ID

Enable a previously-disabled schedule for a workflow execution.

DEPLOYMENT_ID is the ID of the deployment to which the schedule belongs. SCHEDULE_ID is the ID of the deployment schedule to enable.

Optional flags

schedule disable

Usage

cfy deployments schedule disable [OPTIONS] DEPLOYMENT_ID SCHEDULE_ID

Disable a schedule for a workflow execution.

DEPLOYMENT_ID is the ID of the deployment to which the schedule belongs. SCHEDULE_ID is the ID of the deployment schedule to disable.

Optional flags

schedule summary

Usage

cfy deployments schedule summary [OPTIONS] [deployment_id|workflow_id|tenant_name|visibility]

Retrieve summary of deployment schedules, e.g. a count of schedules with the same deployment ID.

TARGET_FIELD is the field to summarise deployment schedules on.

Optional flags
Example
$ cfy deployments schedule summary deployment_id
Retrieving summary of deployment schedules on field deployment_id

Deployment schedules summary by deployment_id
+---------------+------------+---------------------+
| deployment_id | recurrence | execution_schedules |
+---------------+------------+---------------------+
|       a       | recurring  |          3          |
|       a       |   single   |          1          |
|       a       |   TOTAL    |          4          |
+---------------+------------+---------------------+

modifications

A modification is a specification of changes that are scheduled for a deployment. It is a result of running a scaling workflow on a deployment.

modifications list

Usage

cfy deployments modifications list [OPTIONS] DEPLOYMENT_ID

List the deployment’s modifications.

DEPLOYMENT_ID is the id of the deployment to list the modifications for

Example
$ cfy deployments modifications list openstack
Listing modifications of the deployment openstack...

Deployment modifications:
+--------------------------------------+-------------+--------------------------------------+----------+----------------+--------------------------+------------+
|                  id                  | workflow_id |             execution_id             |  status  |  tenant_name   |        created_at        | visibility |
+--------------------------------------+-------------+--------------------------------------+----------+----------------+--------------------------+------------+
| 57924e3c-f317-4604-a52b-c28abba90b64 |    scale    | f87c13d2-a6cd-4b5a-8d05-46193fe818bd | finished | default_tenant | 2021-01-22 10:18:22.101  |   tenant   |
| 05b0b0d5-9ed6-4f84-b3a9-3bd33ddc34ef |    scale    | ad9773e2-7018-49c9-8f02-93a4f8895637 | started  | default_tenant | 2021-01-22 10:25:47.087  |   tenant   |
+--------------------------------------+-------------+--------------------------------------+----------+----------------+--------------------------+------------+

Showing 2 of 2 deployment modifications

modifications get

Usage

cfy deployments modifications get [OPTIONS] DEPLOYMENT_MODIFICATION_ID

Show summary of the the deployment’s modification.

DEPLOYMENT_MODIFICATION_ID is the id of the deployment modification to detrieve

Example
$ cfy deployments modifications get 57924e3c-f317-4604-a52b-c28abba90b64
Retrieving deployment modification 57924e3c-f317-4604-a52b-c28abba90b64...

Deployment Modification:
+--------------------------------------+-------------+--------------------------------------+----------+----------------+--------------------------+------------+
|                  id                  | workflow_id |             execution_id             |  status  |  tenant_name   |        created_at        | visibility |
+--------------------------------------+-------------+--------------------------------------+----------+----------------+--------------------------+------------+
| 57924e3c-f317-4604-a52b-c28abba90b64 |    scale    | f87c13d2-a6cd-4b5a-8d05-46193fe818bd | finished | default_tenant | 2021-01-22 10:18:22.101  |   tenant   |
+--------------------------------------+-------------+--------------------------------------+----------+----------------+--------------------------+------------+

Modified nodes:
        - vm1

Node instances before modifications:
        - net_5vywa3 (net)
        - subnet_331f8n (subnet)
        - sec_group_evub21 (sec_group)
        - vm1_hjh3jp (vm1)

Added node instances:
        - vm1_sp6iar (vm1)

modifications rollback

Usage

cfy deployments modifications rollback [OPTIONS] DEPLOYMENT_MODIFICATION_ID

Rollback the broken (e.g. stalled) deployment’s modification.

DEPLOYMENT_MODIFICATION_ID is the id of the deployment modification to be rolled back

Example
$ cfy deployments modifications rollback bfcfd57e-814c-4de2-acc6-373d6e1ed232
Rolling back a deployment modification bfcfd57e-814c-4de2-acc6-373d6e1ed232...

Deployment Modification:
+--------------------------------------+-------------+--------------------------------------+------------+----------------+--------------------------+------------+
|                  id                  | workflow_id |             execution_id             |   status   |  tenant_name   |        created_at        | visibility |
+--------------------------------------+-------------+--------------------------------------+------------+----------------+--------------------------+------------+
| bfcfd57e-814c-4de2-acc6-373d6e1ed232 |    scale    | 1ffef87b-f10a-493c-8087-d5f8055938d0 | rolledback | default_tenant | 2021-01-22 11:46:55.390  |   tenant   |
+--------------------------------------+-------------+--------------------------------------+------------+----------------+--------------------------+------------+

Modified nodes:
        - vm1

Node instances before modifications:
        - net_5vywa3 (net)
        - subnet_331f8n (subnet)
        - sec_group_evub21 (sec_group)

Node instances before rollback:
        - net_5vywa3 (net)
        - subnet_331f8n (subnet)
        - sec_group_evub21 (sec_group)
        - vm1_b0kgj5 (vm1)

Added node instances:
        - vm1_b0kgj5 (vm1)

Deployment filters

A filter is defined as a set of filter-rules that can be used to filter a list of deployments, based on their labels and certain attributes. Deployments can be filtered by the following attributes: blueprint_id, created_by, site_name, and schedules.

For more information regarding the meaning of each filter rule, please refer to the [filter-rules document]/cli/orch_cli/filter-rules/.

Deployment filters create

Usage

cfy deployments filters create [OPTIONS] FILTER_ID

Create a new deployments’ filter.

FILTER-ID is the new filter’s ID

Optional flags

Deployment filters delete

Usage

cfy deployments filters delete [OPTIONS] FILTER_ID

Delete a deployments’ filter.

FILTER-ID is the filter’s ID

Optional flags

Deployment filters get

Usage

cfy deployments filters get [OPTIONS] FILTER_ID

Get details for a single deployments’ filter.

FILTER-ID is the filter’s ID

Optional flags

Example

$ cfy deployments filters get new_filter
Getting info for deployments' filter `new_filter`...
Requested deployments' filter info:
	id:                        new_filter
	visibility:                tenant
	created_at:                2021-04-07 15:34:39.410 
	updated_at:                2021-04-07 15:34:39.410 
	is_system_filter:          False
	tenant_name:               default_tenant
	created_by:                admin
	resource_availability:     tenant
	private_resource:          False
	labels_filter_rules:       "os=windows"
	attrs_filter_rules:        "created_by starts-with bob"

Deployment filters list

Usage

cfy deployments filters list [OPTIONS]

List all deployments’ filters.

Optional flags

Deployment filters update

Usage

cfy deployments filters update [OPTIONS] FILTER_ID

Update an existing deployments’ filter’s filter rules or visibility. Any flag provided as part of the update (labels’ filter-rulea / attributes’ filter-rulea / visibility) overrides only the corresponding value.
E.g. if only the flag --labels-rule is provided, the labels’ filter-rules will be overridden, but the visibility and attributes’ filter-rules of the filter will stay the same.

FILTER-ID is the filter’s ID

Optional flags