deployments

The cfy deployments command is used to manage running deployments on a Cloudify 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 Cloudify 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

...