Cloudify has plugins for connecting to several major cloud service providers. In this tutorial, we will make Cloudify deploy a simple blueprint with the Amazon Web Services (AWS). Under the hood, Cloudify invokes Boto, the AWS Python SDK
providing API to interact with AWS services like Lambda functions, RDS and IAM.
In this tutorial, we will use a Docker image containing the community edition of the Cloudify Manager to deploy a Hello World server on an AWS EC2 t.micro machine.
Table of Contents:
Note: This tutorial is tested with Cloudify 5.0.0
sudo docker run --name cfy_manager_local -d --restart unless-stopped -v /sys/fs/cgroup:/sys/fs/cgroup:ro --tmpfs /run --tmpfs /run/lock --security-opt seccomp:unconfined --cap-add SYS_ADMIN -p 80:80 -p 8000:8000 cloudifyplatform/community-cloudify-manager-aio
Unable to find image 'cloudifyplatform/community-cloudify-manager-aio:latest' locally
latest: Pulling from cloudifyplatform/community-cloudify-manager-aio
7dc0dca2b151: Pull complete
36419b0b9a07: Pull complete
7e325147c43b: Pull complete
afc559a28010: Pull complete
d829f4717ec9: Pull complete
3a89461e4bbe: Pull complete
2934663eea88: Pull complete
4d20f997804e: Pull complete
90c089034ae9: Pull complete
Digest: sha256:c6c6fe90f28d1584936af9348a14ed3c8798dd5ea915352635d8a7b62c6e47f7
Status: Downloaded newer image for cloudifyplatform/community-cloudify-manager-aio:latest
352924eb411ec95e1b13c12cdb15b93257aeea56fb1a6d354436d33bf06364f9
CLI
. First, we have to create a user profile in the Cloudify CLI
. We will contact the manager at 127.0.0.1
, use the admin-admin access credentials and the default tenant.cfy profiles use 127.0.0.1 -u admin -p admin -t default_tenant
Attempting to connect to 127.0.0.1 through port 80, using http (SSL mode: False)...
Initializing profile 127.0.0.1...
Initialization completed successfully
Using manager 127.0.0.1 with port 80
cfy profiles list
Listing all profiles...
Profiles:
+------------+------------+------------------+----------------+----------+--------------+----------+--------------+-----------+---------------+------------------+
| name | manager_ip | manager_username | manager_tenant | ssh_user | ssh_key_path | ssh_port | kerberos_env | rest_port | rest_protocol | rest_certificate |
+------------+------------+------------------+----------------+----------+--------------+----------+--------------+-----------+---------------+------------------+
| *127.0.0.1 | 127.0.0.1 | admin | default_tenant | | | 22 | False | 80 | http | |
+------------+------------+------------------+----------------+----------+--------------+----------+--------------+-----------+---------------+------------------+
CLI
. This means that (CFY
) commands are now sent to the Cloudify Manager, not executed locally. We can check that the Cloudify Manager is running by retrieving its status.cfy status
Retrieving manager services status... [ip=127.0.0.1]
Services:
+-------------------------------+---------+
| service | status |
+-------------------------------+---------+
| Management Worker | running |
| AMQP-Postgres | running |
| Cloudify Console | running |
| RabbitMQ | running |
| PostgreSQL | running |
| Webserver | running |
| Manager Rest-Service | running |
+-------------------------------+---------+
cfy secrets create aws_access_key_id --secret-string <your-aws-access-key>
Secret `aws_access_key_id` created
cfy secrets create aws_secret_access_key --secret-string <your-aws-private-key>
Secret `aws_secret_access_key` created
cfy plugins bundle-upload
Starting upload of plugins bundle, this may take a few minutes to complete.
Bundle uploaded, 0 Plugins installed.
AWSSDK
plugin. Download the wagon
and yaml
files you find in the Cloudify Github repository. Then, upload them to Cloudify Manager.cfy plugins upload ./cloudify_awssdk_plugin-2.8.1-py27-none-linux_x86_64-centos-Core.wgn -y plugin.yaml
Creating plugin zip archive.
Uploading plugin archive (wagon + yaml)..
tmpFoY9H2.zip |#######################################################| 100.0%
Plugin uploaded. Plugin id is 6b8552c9-18da-4a73-a5e0-e4930938378a
blueprint.yaml
file. In this blueprint, there are many inputs, nodes and one output. Inputs are fed to the blueprint and treated as parameters (e.g., for BOTO3
APIs). Nodes (or node_templates) are the elements of the cloud application, like security groups, subnets and EC2 images and instances. (Almost) Each node has a type that identifies the AWS service, properties that compose the configuration of the service (note that the properties are the same at the ones specified in the AWS BOTO3
APIs documentation and relationships with other nodes. Outputs are values extracted from AWS APIs responses.tosca_definitions_version: cloudify_dsl_1_3
description: >
This blueprint installs an application using Cloudify on AWS.
imports:
- http://www.getcloudify.org/spec/cloudify/4.5.dev1/types.yaml
- plugin:cloudify-awssdk-plugin
- install-script.yaml
inputs:
aws_region_name:
type: string
description: The AWS region name, such as us-east-1 or us-west-1.
availability_zone:
type: string
description: The availability zone in the AWS Region.
default: { concat: [ { get_input: aws_region_name }, 'b' ] }
ami_owner_filter:
type: string
description: The AWS AMI owner number.
default: '099720109477'
ami_name_filter:
type: string
description: The name of the AWS AMI in the AWS region.
default: 'ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-20170727'
dsl_definitions:
client_config: &client_config
aws_access_key_id: { get_secret: aws_access_key_id }
aws_secret_access_key: { get_secret: aws_secret_access_key }
region_name: { get_input: aws_region_name }
node_templates:
vm:
type: cloudify.nodes.aws.ec2.Instances
properties:
client_config: *client_config
agent_config:
install_method: none
resource_config:
kwargs:
ImageId: { get_attribute: [ ami, aws_resource_id ] }
InstanceType: t2.micro
UserData: { get_input: install_script }
relationships:
- type: cloudify.relationships.depends_on
target: ami
- type: cloudify.relationships.depends_on
target: nic
ami:
type: cloudify.nodes.aws.ec2.Image
properties:
resource_config:
kwargs:
Filters:
- Name: name
Values:
- { get_input: ami_name_filter }
- Name: owner-id
Values:
- { get_input: ami_owner_filter }
client_config: *client_config
ip:
type: cloudify.nodes.aws.ec2.ElasticIP
properties:
resource_config:
kwargs:
Domain: 'vpc'
client_config: *client_config
relationships:
- type: cloudify.relationships.depends_on
target: nic
nic:
type: cloudify.nodes.aws.ec2.Interface
properties:
client_config: *client_config
resource_config:
kwargs:
Description: Created by cloudify-hello-world-example.
SubnetId: { get_attribute: [ subnet, aws_resource_id ] }
Groups:
- { get_attribute: [ security_group, aws_resource_id ] }
relationships:
- type: cloudify.relationships.depends_on
target: security_group
- type: cloudify.relationships.depends_on
target: subnet
security_group_rules:
type: cloudify.nodes.aws.ec2.SecurityGroupRuleIngress
properties:
client_config: *client_config
resource_config:
kwargs:
IpPermissions:
- IpProtocol: tcp
FromPort: 80
ToPort: 80
IpRanges:
- CidrIp: 0.0.0.0/0
relationships:
- type: cloudify.relationships.contained_in
target: security_group
security_group:
type: cloudify.nodes.aws.ec2.SecurityGroup
properties:
client_config: *client_config
resource_config:
kwargs:
GroupName: CloudifyHelloWorldGroup
Description: Created by cloudify-hello-world-example.
VpcId: { get_attribute: [ vpc, aws_resource_id ] }
relationships:
- type: cloudify.relationships.depends_on
target: vpc
route_public_subnet_internet_gateway:
type: cloudify.nodes.aws.ec2.Route
properties:
resource_config:
kwargs:
DestinationCidrBlock: '0.0.0.0/0'
client_config: *client_config
relationships:
- type: cloudify.relationships.contained_in
target: routetable
- type: cloudify.relationships.connected_to
target: internet_gateway
interfaces:
cloudify.interfaces.lifecycle:
stop: {}
routetable:
type: cloudify.nodes.aws.ec2.RouteTable
properties:
client_config: *client_config
relationships:
- type: cloudify.relationships.contained_in
target: vpc
- type: cloudify.relationships.connected_to
target: subnet
subnet:
type: cloudify.nodes.aws.ec2.Subnet
properties:
client_config: *client_config
resource_config:
kwargs:
CidrBlock: 10.10.4.0/24
AvailabilityZone: { get_input: availability_zone }
relationships:
- type: cloudify.relationships.depends_on
target: vpc
internet_gateway:
type: cloudify.nodes.aws.ec2.InternetGateway
properties:
client_config: *client_config
relationships:
- type: cloudify.relationships.connected_to
target: vpc
vpc:
type: cloudify.nodes.aws.ec2.Vpc
properties:
client_config: *client_config
resource_config:
kwargs:
CidrBlock: 10.10.0.0/16
outputs:
application_endpoint:
description: The external endpoint of the application.
value: { concat: [ 'http://', { get_attribute: [ vm, public_ip_address ] }, ':80' ] }
install
command giving as argument the (URL of the) zip containing the blueprint and providing the necessary inputs (i.e., the AWS region name).cfy install https://github.com/cloudify-cosmo/cloudify-hello-world-example/archive/master.zip -n aws.yaml -i aws_region_name=<AWS_REGION_NAME>
Downloading https://github.com/cloudify-cosmo/cloudify-hello-world-example/archive/master.zip to /tmp/tmpMro0dF...
Uploading blueprint /tmp/tmpgLeO1U/cloudify-hello-world-example-master/aws.yaml...
aws.yaml |############################################################| 100.0%
Blueprint uploaded. The blueprint id is cloudify-hello-world-example-master.aws
Creating new deployment from blueprint cloudify-hello-world-example-master.aws...
Deployment created. The deployment id is cloudify-hello-world-example-master.aws
Executing workflow `install` on deployment `cloudify-hello-world-example-master.aws` [timeout=900 seconds]
Deployment environment creation is pending...
2019-10-03 06:20:30.585 CFY <cloudify-hello-world-example-master.aws> Starting 'create_deployment_environment' workflow execution
2019-10-03 06:20:30.596 CFY <cloudify-hello-world-example-master.aws> Installing deployment and workflow plugins
2019-10-03 06:20:30.694 CFY <cloudify-hello-world-example-master.aws> Sending task 'cloudify_agent.operations.install_plugins'
2019-10-03 06:20:30.717 CFY <cloudify-hello-world-example-master.aws> Task started 'cloudify_agent.operations.install_plugins'
2019-10-03 06:20:31.111 LOG <cloudify-hello-world-example-master.aws> INFO: Installing plugin: awssdk
2019-10-03 06:20:32.247 LOG <cloudify-hello-world-example-master.aws> INFO: Using existing installation of managed plugin: 6b8552c9-18da-4a73-a5e0-e4930938378a [package_name: cloudify-awssdk-plugin, package_version: 2.8.1, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
2019-10-03 06:20:32.248 CFY <cloudify-hello-world-example-master.aws> Task succeeded 'cloudify_agent.operations.install_plugins'
2019-10-03 06:20:32.366 CFY <cloudify-hello-world-example-master.aws> Creating deployment work directory
2019-10-03 06:20:32.664 CFY <cloudify-hello-world-example-master.aws> 'create_deployment_environment' workflow execution succeeded
2019-10-03 06:20:38.260 CFY <cloudify-hello-world-example-master.aws> Starting 'install' workflow execution
2019-10-03 06:20:40.989 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Validating node instance before creation: nothing to do
2019-10-03 06:20:41.066 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Validating node instance before creation: nothing to do
2019-10-03 06:20:41.134 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Precreating node instance: nothing to do
2019-10-03 06:20:41.198 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Precreating node instance: nothing to do
2019-10-03 06:20:41.773 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Creating node instance
2019-10-03 06:20:41.841 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Creating node instance
2019-10-03 06:20:41.943 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd.create] Sending task 'cloudify_awssdk.ec2.resources.image.prepare'
2019-10-03 06:20:42.920 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi.create] Sending task 'cloudify_awssdk.ec2.resources.vpc.prepare'
2019-10-03 06:20:45.770 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd.create] Task succeeded 'cloudify_awssdk.ec2.resources.image.prepare'
2019-10-03 06:20:46.012 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Node instance created
2019-10-03 06:20:46.149 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Configuring node instance: nothing to do
2019-10-03 06:20:46.186 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi.create] Task succeeded 'cloudify_awssdk.ec2.resources.vpc.prepare'
2019-10-03 06:20:46.226 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Node instance created
2019-10-03 06:20:46.457 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Starting node instance: nothing to do
2019-10-03 06:20:46.533 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Configuring node instance
2019-10-03 06:20:46.587 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Poststarting node instance: nothing to do
2019-10-03 06:20:46.900 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi.configure] Sending task 'cloudify_awssdk.ec2.resources.vpc.create'
2019-10-03 06:20:47.004 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Node instance started
2019-10-03 06:20:50.307 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi.configure] Task succeeded 'cloudify_awssdk.ec2.resources.vpc.create'
2019-10-03 06:20:50.375 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Node instance configured
2019-10-03 06:20:50.657 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Starting node instance: nothing to do
2019-10-03 06:20:50.778 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Poststarting node instance: nothing to do
2019-10-03 06:20:50.861 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Node instance started
2019-10-03 06:20:51.838 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Validating node instance before creation: nothing to do
2019-10-03 06:20:51.909 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Validating node instance before creation: nothing to do
2019-10-03 06:20:51.959 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Precreating node instance: nothing to do
2019-10-03 06:20:52.010 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Validating node instance before creation: nothing to do
2019-10-03 06:20:52.238 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Creating node instance
2019-10-03 06:20:52.290 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Precreating node instance: nothing to do
2019-10-03 06:20:52.350 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Precreating node instance: nothing to do
2019-10-03 06:20:52.394 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731.create] Sending task 'cloudify_awssdk.ec2.resources.internet_gateway.prepare'
2019-10-03 06:20:54.220 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Creating node instance
2019-10-03 06:20:54.465 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Creating node instance
2019-10-03 06:20:54.549 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv.create] Sending task 'cloudify_awssdk.ec2.resources.subnet.prepare'
2019-10-03 06:20:55.007 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731.create] Task succeeded 'cloudify_awssdk.ec2.resources.internet_gateway.prepare'
2019-10-03 06:20:55.709 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp.create] Sending task 'cloudify_awssdk.ec2.resources.securitygroup.prepare'
2019-10-03 06:20:56.603 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Node instance created
2019-10-03 06:20:57.048 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Configuring node instance
2019-10-03 06:20:57.598 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731.configure] Sending task 'cloudify_awssdk.ec2.resources.internet_gateway.create'
2019-10-03 06:20:57.794 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv.create] Task succeeded 'cloudify_awssdk.ec2.resources.subnet.prepare'
2019-10-03 06:20:58.701 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Node instance created
2019-10-03 06:20:58.816 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Configuring node instance
2019-10-03 06:20:59.003 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp.create] Task succeeded 'cloudify_awssdk.ec2.resources.securitygroup.prepare'
2019-10-03 06:20:59.185 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv.configure] Sending task 'cloudify_awssdk.ec2.resources.subnet.create'
2019-10-03 06:20:59.270 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Node instance created
2019-10-03 06:20:59.542 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Configuring node instance
2019-10-03 06:20:59.875 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp.configure] Sending task 'cloudify_awssdk.ec2.resources.securitygroup.create'
2019-10-03 06:21:00.901 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731.configure] Task succeeded 'cloudify_awssdk.ec2.resources.internet_gateway.create'
2019-10-03 06:21:01.171 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Node instance configured
2019-10-03 06:21:01.348 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Starting node instance
2019-10-03 06:21:01.699 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731.start] Sending task 'cloudify_awssdk.ec2.resources.internet_gateway.attach'
2019-10-03 06:21:02.703 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv.configure] Task succeeded 'cloudify_awssdk.ec2.resources.subnet.create'
2019-10-03 06:21:02.934 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Node instance configured
2019-10-03 06:21:03.051 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Starting node instance: nothing to do
2019-10-03 06:21:03.130 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Poststarting node instance: nothing to do
2019-10-03 06:21:03.328 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp.configure] Task succeeded 'cloudify_awssdk.ec2.resources.securitygroup.create'
2019-10-03 06:21:03.448 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Node instance started
2019-10-03 06:21:03.727 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Node instance configured
2019-10-03 06:21:04.044 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Starting node instance: nothing to do
2019-10-03 06:21:04.122 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Validating node instance before creation: nothing to do
2019-10-03 06:21:04.197 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Poststarting node instance: nothing to do
2019-10-03 06:21:04.295 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Node instance started
2019-10-03 06:21:04.513 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Precreating node instance: nothing to do
2019-10-03 06:21:04.944 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Creating node instance
2019-10-03 06:21:05.090 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0.create] Sending task 'cloudify_awssdk.ec2.resources.routetable.prepare'
2019-10-03 06:21:05.336 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731.start] Task succeeded 'cloudify_awssdk.ec2.resources.internet_gateway.attach'
2019-10-03 06:21:06.046 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Validating node instance before creation: nothing to do
2019-10-03 06:21:06.111 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Validating node instance before creation: nothing to do
2019-10-03 06:21:06.167 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Poststarting node instance: nothing to do
2019-10-03 06:21:06.225 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Precreating node instance: nothing to do
2019-10-03 06:21:06.298 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Precreating node instance: nothing to do
2019-10-03 06:21:06.353 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Node instance started
2019-10-03 06:21:06.560 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Creating node instance: nothing to do
2019-10-03 06:21:06.797 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Creating node instance
2019-10-03 06:21:06.857 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Configuring node instance: nothing to do
2019-10-03 06:21:06.973 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex.create] Sending task 'cloudify_awssdk.ec2.resources.eni.prepare'
2019-10-03 06:21:07.968 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0.create] Task succeeded 'cloudify_awssdk.ec2.resources.routetable.prepare'
2019-10-03 06:21:08.079 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Starting node instance
2019-10-03 06:21:08.132 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Node instance created
2019-10-03 06:21:08.235 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm.start] Sending task 'cloudify_awssdk.ec2.resources.securitygroup.authorize_ingress_rules'
2019-10-03 06:21:09.171 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Configuring node instance
2019-10-03 06:21:09.434 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex.create] Task succeeded 'cloudify_awssdk.ec2.resources.eni.prepare'
2019-10-03 06:21:09.503 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0.configure] Sending task 'cloudify_awssdk.ec2.resources.routetable.create'
2019-10-03 06:21:10.326 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Node instance created
2019-10-03 06:21:10.841 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Configuring node instance
2019-10-03 06:21:10.995 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex.configure] Sending task 'cloudify_awssdk.ec2.resources.eni.create'
2019-10-03 06:21:11.723 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm.start] Task succeeded 'cloudify_awssdk.ec2.resources.securitygroup.authorize_ingress_rules'
2019-10-03 06:21:11.913 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Poststarting node instance: nothing to do
2019-10-03 06:21:12.034 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Node instance started
2019-10-03 06:21:13.208 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0.configure] Task succeeded 'cloudify_awssdk.ec2.resources.routetable.create'
2019-10-03 06:21:13.262 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Node instance configured
2019-10-03 06:21:13.555 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Starting node instance
2019-10-03 06:21:13.932 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0.start] Sending task 'cloudify_awssdk.ec2.resources.routetable.attach'
2019-10-03 06:21:15.346 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex.configure] Task succeeded 'cloudify_awssdk.ec2.resources.eni.create'
2019-10-03 06:21:15.626 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Node instance configured
2019-10-03 06:21:16.044 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Starting node instance
2019-10-03 06:21:16.239 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex.start] Sending task 'cloudify_awssdk.ec2.resources.eni.attach'
2019-10-03 06:21:17.753 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0.start] Task succeeded 'cloudify_awssdk.ec2.resources.routetable.attach'
2019-10-03 06:21:17.803 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Poststarting node instance: nothing to do
2019-10-03 06:21:17.985 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Node instance started
2019-10-03 06:21:18.705 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Validating node instance before creation: nothing to do
2019-10-03 06:21:18.824 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Precreating node instance: nothing to do
2019-10-03 06:21:19.093 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Creating node instance
2019-10-03 06:21:19.239 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs.create] Sending task 'cloudify_awssdk.ec2.resources.route.prepare'
2019-10-03 06:21:19.683 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex.start] Task succeeded 'cloudify_awssdk.ec2.resources.eni.attach'
2019-10-03 06:21:19.727 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Poststarting node instance: nothing to do
2019-10-03 06:21:19.790 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Node instance started
2019-10-03 06:21:20.643 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Validating node instance before creation: nothing to do
2019-10-03 06:21:20.714 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Validating node instance before creation: nothing to do
2019-10-03 06:21:20.779 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Precreating node instance: nothing to do
2019-10-03 06:21:20.908 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Creating node instance
2019-10-03 06:21:21.155 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Precreating node instance: nothing to do
2019-10-03 06:21:21.254 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.create] Sending task 'cloudify_awssdk.ec2.resources.elasticip.prepare'
2019-10-03 06:21:21.960 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs.create] Task succeeded 'cloudify_awssdk.ec2.resources.route.prepare'
2019-10-03 06:21:22.215 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Node instance created
2019-10-03 06:21:22.442 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Creating node instance
2019-10-03 06:21:22.684 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Configuring node instance
2019-10-03 06:21:22.771 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.create] Sending task 'cloudify_awssdk.ec2.resources.instances.prepare'
2019-10-03 06:21:23.587 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.create] Task succeeded 'cloudify_awssdk.ec2.resources.elasticip.prepare'
2019-10-03 06:21:23.712 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Node instance created
2019-10-03 06:21:23.757 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs.configure] Sending task 'cloudify_awssdk.ec2.resources.route.create'
2019-10-03 06:21:24.756 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Configuring node instance
2019-10-03 06:21:25.049 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.configure] Sending task 'cloudify_awssdk.ec2.resources.elasticip.create'
2019-10-03 06:21:25.795 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.create] Task succeeded 'cloudify_awssdk.ec2.resources.instances.prepare'
2019-10-03 06:21:26.206 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Node instance created
2019-10-03 06:21:26.331 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Configuring node instance
2019-10-03 06:21:26.690 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.configure] Sending task 'cloudify_awssdk.ec2.resources.instances.create'
2019-10-03 06:21:26.690 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.configure] Sending task 'cloudify_awssdk.ec2.resources.instances.create'
2019-10-03 06:21:27.321 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs.configure] Task succeeded 'cloudify_awssdk.ec2.resources.route.create'
2019-10-03 06:21:27.803 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Node instance configured
2019-10-03 06:21:27.938 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Starting node instance: nothing to do
2019-10-03 06:21:28.030 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Poststarting node instance: nothing to do
2019-10-03 06:21:28.309 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.configure] Task succeeded 'cloudify_awssdk.ec2.resources.elasticip.create'
2019-10-03 06:21:28.613 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Node instance started
2019-10-03 06:21:29.061 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Node instance configured
2019-10-03 06:21:29.319 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Starting node instance
2019-10-03 06:21:29.509 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.start] Sending task 'cloudify_awssdk.ec2.resources.elasticip.attach'
2019-10-03 06:21:31.730 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.configure] Task succeeded 'cloudify_awssdk.ec2.resources.instances.create'
2019-10-03 06:21:31.739 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Node instance configured
2019-10-03 06:21:32.259 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Starting node instance
2019-10-03 06:21:32.411 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.start] Sending task 'cloudify_awssdk.ec2.resources.instances.start'
2019-10-03 06:21:33.404 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.start] Task failed 'cloudify_awssdk.ec2.resources.elasticip.attach' -> An error occurred (IncorrectInstanceState) when calling the AssociateAddress operation: The pending-instance-creation instance to which 'eni-072e1ddf84a50994d' is attached is not in a valid state for this operation
Traceback (most recent call last):
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 813, in main
payload = handler.handle()
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 461, in handle
result = self._run_operation_func(ctx, kwargs)
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 519, in _run_operation_func
return self.func(*self.args, **kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/common/decorators.py", line 206, in wrapper_inner
return function(**kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/ec2/resources/elasticip.py", line 222, in attach
association_id = iface.attach(params)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/ec2/resources/elasticip.py", line 84, in attach
res = self.client.associate_address(**params)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/botocore/client.py", line 320, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/botocore/client.py", line 624, in _make_api_call
raise error_class(parsed_response, operation_name)
ClientError: An error occurred (IncorrectInstanceState) when calling the AssociateAddress operation: The pending-instance-creation instance to which 'eni-072e1ddf84a50994d' is attached is not in a valid state for this operation
2019-10-03 06:21:35.928 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.start] Task rescheduled 'cloudify_awssdk.ec2.resources.instances.start' -> EC2 Instances ID# i-08a204c449f3829e9 is still in a pending state.
Traceback (most recent call last):
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 813, in main
payload = handler.handle()
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 461, in handle
result = self._run_operation_func(ctx, kwargs)
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 519, in _run_operation_func
return self.func(*self.args, **kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/common/decorators.py", line 206, in wrapper_inner
return function(**kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/ec2/resources/instances.py", line 343, in start
iface.type_name, iface.resource_id))
OperationRetry: EC2 Instances ID# i-08a204c449f3829e9 is still in a pending state.
2019-10-03 06:21:48.546 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.start] Sending task 'cloudify_awssdk.ec2.resources.elasticip.attach' [retry 1/60]
2019-10-03 06:21:50.994 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.start] Sending task 'cloudify_awssdk.ec2.resources.instances.start' [retry 1/60]
2019-10-03 06:21:52.232 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.start] Task failed 'cloudify_awssdk.ec2.resources.elasticip.attach' -> An error occurred (IncorrectInstanceState) when calling the AssociateAddress operation: The pending-instance-creation instance to which 'eni-072e1ddf84a50994d' is attached is not in a valid state for this operation [retry 1/60]
Traceback (most recent call last):
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 813, in main
payload = handler.handle()
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 461, in handle
result = self._run_operation_func(ctx, kwargs)
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 519, in _run_operation_func
return self.func(*self.args, **kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/common/decorators.py", line 206, in wrapper_inner
return function(**kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/ec2/resources/elasticip.py", line 222, in attach
association_id = iface.attach(params)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/ec2/resources/elasticip.py", line 84, in attach
res = self.client.associate_address(**params)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/botocore/client.py", line 320, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/botocore/client.py", line 624, in _make_api_call
raise error_class(parsed_response, operation_name)
ClientError: An error occurred (IncorrectInstanceState) when calling the AssociateAddress operation: The pending-instance-creation instance to which 'eni-072e1ddf84a50994d' is attached is not in a valid state for this operation
2019-10-03 06:21:54.317 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.start] Task succeeded 'cloudify_awssdk.ec2.resources.instances.start' [retry 1/60]
2019-10-03 06:21:54.455 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Plugins installed
2019-10-03 06:21:54.776 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Poststarting node instance: nothing to do
2019-10-03 06:21:54.988 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Node instance started
2019-10-03 06:22:07.291 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.start] Sending task 'cloudify_awssdk.ec2.resources.elasticip.attach' [retry 2/60]
2019-10-03 06:22:11.029 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.start] Task succeeded 'cloudify_awssdk.ec2.resources.elasticip.attach' [retry 2/60]
2019-10-03 06:22:11.075 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Poststarting node instance: nothing to do
2019-10-03 06:22:11.363 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Node instance started
2019-10-03 06:22:11.603 CFY <cloudify-hello-world-example-master.aws> 'install' workflow execution succeeded
Finished executing workflow install on deployment cloudify-hello-world-example-master.aws
* Run cfy events list 8c2d1446-3a48-420c-9cb4-d16a230ad6a1 to retrieve the executions events/logs
Note: in the logs, you may see an error like
The pending-instance-creation instance to which 'eni-072e1ddf84a50994d' is attached is not in a valid state for this operation
. This is because the AWS EC2 instance was not in a running state when Cloudify was processing the request. In this case, Cloudify waits and tries again.
cfy deployment outputs cloudify-hello-world-example-master.aws
Retrieving outputs for deployment cloudify-hello-world-example-master.aws...
- "application_endpoint":
Description: The external endpoint of the application.
Value: http://None:80
Note: Sometimes this could return “None” instead of the IP address. Still, you can go to the AWS dashboard and find the IP under the EC2 service.
Copy and paste the URL into your browser to see the Hello World web page.
<Optional> To list the running instances of the nodes of the blueprint, run.
cfy node-instances list
Listing all instances...
Node-instances:
+---------------------------------------------+-----------------------------------------+-----------+--------------------------------------+---------+------------+----------------+------------+
| id | deployment_id | host_id | node_id | state | visibility | tenant_name | created_by |
+---------------------------------------------+-----------------------------------------+-----------+--------------------------------------+---------+------------+----------------+------------+
| ami_fbflmd | cloudify-hello-world-example-master.aws | | ami | started | tenant | default_tenant | admin |
| internet_gateway_cml731 | cloudify-hello-world-example-master.aws | | internet_gateway | started | tenant | default_tenant | admin |
| ip_xfke5m | cloudify-hello-world-example-master.aws | | ip | started | tenant | default_tenant | admin |
| nic_o15yex | cloudify-hello-world-example-master.aws | | nic | started | tenant | default_tenant | admin |
| route_public_subnet_internet_gateway_42bwgs | cloudify-hello-world-example-master.aws | | route_public_subnet_internet_gateway | started | tenant | default_tenant | admin |
| routetable_qak4y0 | cloudify-hello-world-example-master.aws | | routetable | started | tenant | default_tenant | admin |
| security_group_wxy9cp | cloudify-hello-world-example-master.aws | | security_group | started | tenant | default_tenant | admin |
| security_group_rules_5l9hcm | cloudify-hello-world-example-master.aws | | security_group_rules | started | tenant | default_tenant | admin |
| subnet_tfkqqv | cloudify-hello-world-example-master.aws | | subnet | started | tenant | default_tenant | admin |
| vm_fe59ew | cloudify-hello-world-example-master.aws | vm_fe59ew | vm | started | tenant | default_tenant | admin |
| vpc_y5smmi | cloudify-hello-world-example-master.aws | | vpc | started | tenant | default_tenant | admin |
+---------------------------------------------+-----------------------------------------+-----------+--------------------------------------+---------+------------+----------------+------------+
Showing 11 of 11 node-instances
cfy uninstall cloudify-hello-world-example-master.aws
Executing workflow `uninstall` on deployment `cloudify-hello-world-example-master.aws` [timeout=900 seconds]
2019-10-03 06:35:03.914 CFY <cloudify-hello-world-example-master.aws> Starting 'uninstall' workflow execution
2019-10-03 06:35:05.296 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Stopping node instance
2019-10-03 06:35:05.507 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Stopping node instance
2019-10-03 06:35:05.718 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Stopping node instance
2019-10-03 06:35:05.770 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Stopping node instance
2019-10-03 06:35:05.978 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Validating node instance after deletion: nothing to do
2019-10-03 06:35:06.036 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Validating node instance after deletion: nothing to do
2019-10-03 06:35:06.180 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm.stop] Sending task 'cloudify_awssdk.ec2.resources.securitygroup.revoke_ingress_rules'
2019-10-03 06:35:06.218 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Validating node instance after deletion: nothing to do
2019-10-03 06:35:06.282 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Validating node instance after deletion: nothing to do
2019-10-03 06:35:07.084 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Stopped node instance: nothing to do
2019-10-03 06:35:07.114 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.stop] Sending task 'cloudify_awssdk.ec2.resources.elasticip.detach'
2019-10-03 06:35:08.220 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.stop] Sending task 'cloudify_awssdk.ec2.resources.instances.stop'
2019-10-03 06:35:09.188 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Unlinking relationships
2019-10-03 06:35:09.253 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm.stop] Task succeeded 'cloudify_awssdk.ec2.resources.securitygroup.revoke_ingress_rules'
2019-10-03 06:35:09.370 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Stopped node instance
2019-10-03 06:35:09.612 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Relationships unlinked
2019-10-03 06:35:09.668 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Unlinking relationships
2019-10-03 06:35:09.919 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Deleting node instance
2019-10-03 06:35:09.970 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Relationships unlinked
2019-10-03 06:35:10.031 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Deleting node instance: nothing to do
2019-10-03 06:35:10.058 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs.delete] Sending task 'cloudify_awssdk.ec2.resources.route.delete'
2019-10-03 06:35:10.469 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.stop] Task succeeded 'cloudify_awssdk.ec2.resources.elasticip.detach'
2019-10-03 06:35:11.030 CFY <cloudify-hello-world-example-master.aws> [security_group_rules_5l9hcm] Deleted node instance
2019-10-03 06:35:11.258 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Stopped node instance
2019-10-03 06:35:11.718 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Unlinking relationships
2019-10-03 06:35:11.790 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.stop] Task rescheduled 'cloudify_awssdk.ec2.resources.instances.stop' -> EC2 Instances ID# "i-08a204c449f3829e9" is still in a pending state.
Traceback (most recent call last):
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 813, in main
payload = handler.handle()
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 461, in handle
result = self._run_operation_func(ctx, kwargs)
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 519, in _run_operation_func
return self.func(*self.args, **kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/common/decorators.py", line 206, in wrapper_inner
return function(**kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/common/decorators.py", line 254, in wrapper_inner
% (resource_type, iface.resource_id))
OperationRetry: EC2 Instances ID# "i-08a204c449f3829e9" is still in a pending state.
2019-10-03 06:35:12.065 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Relationships unlinked
2019-10-03 06:35:12.239 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Deleting node instance
2019-10-03 06:35:12.700 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.delete] Sending task 'cloudify_awssdk.ec2.resources.elasticip.delete'
2019-10-03 06:35:13.501 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs.delete] Task succeeded 'cloudify_awssdk.ec2.resources.route.delete'
2019-10-03 06:35:13.868 CFY <cloudify-hello-world-example-master.aws> [route_public_subnet_internet_gateway_42bwgs] Deleted node instance
2019-10-03 06:35:14.193 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Stopping node instance
2019-10-03 06:35:14.250 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Stopping node instance
2019-10-03 06:35:14.620 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Validating node instance after deletion: nothing to do
2019-10-03 06:35:14.683 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Validating node instance after deletion: nothing to do
2019-10-03 06:35:14.779 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0.stop] Sending task 'cloudify_awssdk.ec2.resources.routetable.detach'
2019-10-03 06:35:15.668 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731.stop] Sending task 'cloudify_awssdk.ec2.resources.internet_gateway.detach'
2019-10-03 06:35:15.815 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m.delete] Task succeeded 'cloudify_awssdk.ec2.resources.elasticip.delete'
2019-10-03 06:35:16.789 CFY <cloudify-hello-world-example-master.aws> [ip_xfke5m] Deleted node instance
2019-10-03 06:35:17.897 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0.stop] Task succeeded 'cloudify_awssdk.ec2.resources.routetable.detach'
2019-10-03 06:35:18.011 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Stopped node instance
2019-10-03 06:35:18.291 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Unlinking relationships
2019-10-03 06:35:18.559 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Relationships unlinked
2019-10-03 06:35:18.681 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Deleting node instance
2019-10-03 06:35:18.774 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731.stop] Task succeeded 'cloudify_awssdk.ec2.resources.internet_gateway.detach'
2019-10-03 06:35:18.918 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Stopped node instance
2019-10-03 06:35:18.991 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0.delete] Sending task 'cloudify_awssdk.ec2.resources.routetable.delete'
2019-10-03 06:35:20.190 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Unlinking relationships
2019-10-03 06:35:20.465 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Relationships unlinked
2019-10-03 06:35:20.697 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Deleting node instance
2019-10-03 06:35:20.874 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731.delete] Sending task 'cloudify_awssdk.ec2.resources.internet_gateway.delete'
2019-10-03 06:35:21.949 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0.delete] Task succeeded 'cloudify_awssdk.ec2.resources.routetable.delete'
2019-10-03 06:35:21.967 CFY <cloudify-hello-world-example-master.aws> [routetable_qak4y0] Deleted node instance
2019-10-03 06:35:23.980 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731.delete] Task succeeded 'cloudify_awssdk.ec2.resources.internet_gateway.delete'
2019-10-03 06:35:24.063 CFY <cloudify-hello-world-example-master.aws> [internet_gateway_cml731] Deleted node instance
2019-10-03 06:35:26.850 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.stop] Sending task 'cloudify_awssdk.ec2.resources.instances.stop' [retry 1/60]
2019-10-03 06:35:29.926 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.stop] Task rescheduled 'cloudify_awssdk.ec2.resources.instances.stop' -> EC2 Instances ID# "i-08a204c449f3829e9" is still in a pending state. [retry 1/60]
Traceback (most recent call last):
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 813, in main
payload = handler.handle()
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 461, in handle
result = self._run_operation_func(ctx, kwargs)
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 519, in _run_operation_func
return self.func(*self.args, **kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/common/decorators.py", line 206, in wrapper_inner
return function(**kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/common/decorators.py", line 254, in wrapper_inner
% (resource_type, iface.resource_id))
OperationRetry: EC2 Instances ID# "i-08a204c449f3829e9" is still in a pending state.
2019-10-03 06:35:45.097 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.stop] Sending task 'cloudify_awssdk.ec2.resources.instances.stop' [retry 2/60]
2019-10-03 06:35:47.303 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.stop] Task succeeded 'cloudify_awssdk.ec2.resources.instances.stop' [retry 2/60]
2019-10-03 06:35:47.338 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Stopped node instance
2019-10-03 06:35:47.643 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Unlinking relationships
2019-10-03 06:35:47.921 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Relationships unlinked
2019-10-03 06:35:48.146 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Deleting node instance
2019-10-03 06:35:48.328 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.delete] Sending task 'cloudify_awssdk.ec2.resources.instances.delete'
2019-10-03 06:35:50.794 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.delete] Task rescheduled 'cloudify_awssdk.ec2.resources.instances.delete' -> EC2 Instances ID# "i-08a204c449f3829e9" is still in a pending state.
Traceback (most recent call last):
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 813, in main
payload = handler.handle()
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 461, in handle
result = self._run_operation_func(ctx, kwargs)
File "/opt/mgmtworker/env/lib/python2.7/site-packages/cloudify/dispatch.py", line 519, in _run_operation_func
return self.func(*self.args, **kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/common/decorators.py", line 206, in wrapper_inner
return function(**kwargs)
File "/opt/mgmtworker/env/plugins/default_tenant/cloudify-awssdk-plugin-2.8.1/lib/python2.7/site-packages/cloudify_awssdk/common/decorators.py", line 298, in wrapper_inner
% (resource_type, iface.resource_id))
OperationRetry: EC2 Instances ID# "i-08a204c449f3829e9" is still in a pending state.
2019-10-03 06:36:05.834 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.delete] Sending task 'cloudify_awssdk.ec2.resources.instances.delete' [retry 1/60]
2019-10-03 06:36:08.669 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew.delete] Task succeeded 'cloudify_awssdk.ec2.resources.instances.delete' [retry 1/60]
2019-10-03 06:36:08.807 CFY <cloudify-hello-world-example-master.aws> [vm_fe59ew] Deleted node instance
2019-10-03 06:36:09.250 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Stopping node instance
2019-10-03 06:36:09.305 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Stopping node instance
2019-10-03 06:36:09.645 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Validating node instance after deletion: nothing to do
2019-10-03 06:36:09.762 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Validating node instance after deletion: nothing to do
2019-10-03 06:36:09.809 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Stopped node instance: nothing to do
2019-10-03 06:36:09.875 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex.stop] Sending task 'cloudify_awssdk.ec2.resources.eni.detach'
2019-10-03 06:36:11.010 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Unlinking relationships
2019-10-03 06:36:11.276 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Relationships unlinked
2019-10-03 06:36:11.364 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Deleting node instance: nothing to do
2019-10-03 06:36:11.651 CFY <cloudify-hello-world-example-master.aws> [ami_fbflmd] Deleted node instance
2019-10-03 06:36:12.502 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex.stop] Task succeeded 'cloudify_awssdk.ec2.resources.eni.detach'
2019-10-03 06:36:12.545 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Stopped node instance
2019-10-03 06:36:12.835 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Unlinking relationships
2019-10-03 06:36:13.106 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Relationships unlinked
2019-10-03 06:36:13.182 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Deleting node instance
2019-10-03 06:36:13.658 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex.delete] Sending task 'cloudify_awssdk.ec2.resources.eni.delete'
2019-10-03 06:36:17.288 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex.delete] Task succeeded 'cloudify_awssdk.ec2.resources.eni.delete'
2019-10-03 06:36:17.534 CFY <cloudify-hello-world-example-master.aws> [nic_o15yex] Deleted node instance
2019-10-03 06:36:17.849 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Stopping node instance
2019-10-03 06:36:17.908 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Stopping node instance
2019-10-03 06:36:18.264 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Validating node instance after deletion: nothing to do
2019-10-03 06:36:18.318 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Validating node instance after deletion: nothing to do
2019-10-03 06:36:18.429 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Stopped node instance: nothing to do
2019-10-03 06:36:18.475 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Stopped node instance: nothing to do
2019-10-03 06:36:18.801 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Unlinking relationships
2019-10-03 06:36:18.858 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Unlinking relationships
2019-10-03 06:36:19.172 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Relationships unlinked
2019-10-03 06:36:19.234 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Relationships unlinked
2019-10-03 06:36:19.426 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Deleting node instance
2019-10-03 06:36:19.588 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp.delete] Sending task 'cloudify_awssdk.ec2.resources.securitygroup.delete'
2019-10-03 06:36:19.628 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Deleting node instance
2019-10-03 06:36:20.578 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv.delete] Sending task 'cloudify_awssdk.ec2.resources.subnet.delete'
2019-10-03 06:36:22.643 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp.delete] Task succeeded 'cloudify_awssdk.ec2.resources.securitygroup.delete'
2019-10-03 06:36:22.820 CFY <cloudify-hello-world-example-master.aws> [security_group_wxy9cp] Deleted node instance
2019-10-03 06:36:23.860 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv.delete] Task succeeded 'cloudify_awssdk.ec2.resources.subnet.delete'
2019-10-03 06:36:23.954 CFY <cloudify-hello-world-example-master.aws> [subnet_tfkqqv] Deleted node instance
2019-10-03 06:36:24.473 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Stopping node instance
2019-10-03 06:36:24.785 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Validating node instance after deletion: nothing to do
2019-10-03 06:36:24.860 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Stopped node instance: nothing to do
2019-10-03 06:36:25.177 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Unlinking relationships
2019-10-03 06:36:25.526 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Relationships unlinked
2019-10-03 06:36:25.749 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Deleting node instance
2019-10-03 06:36:25.834 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi.delete] Sending task 'cloudify_awssdk.ec2.resources.vpc.delete'
2019-10-03 06:36:28.061 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi.delete] Task succeeded 'cloudify_awssdk.ec2.resources.vpc.delete'
2019-10-03 06:36:28.114 CFY <cloudify-hello-world-example-master.aws> [vpc_y5smmi] Deleted node instance
2019-10-03 06:36:28.520 CFY <cloudify-hello-world-example-master.aws> 'uninstall' workflow execution succeeded
Finished executing workflow uninstall on deployment cloudify-hello-world-example-master.aws
* Run cfy events list fdcb8a5c-b8c5-4ac8-8392-d419bc4b4a32 to retrieve the executions events/logs
Trying to delete deployment cloudify-hello-world-example-master.aws...
Deployment deleted
Deleting blueprint cloudify-hello-world-example-master.aws...
Blueprint deleted
cfy profiles delete $(name of the profile)
Deleting profile 127.0.0.1...
Profile deleted
sudo docker rm -f cfy_manager_local
cfy_manager_local
In this tutorial, we used the community edition of the Cloudify Manager to deploy a simple web server on an AWS EC2 machine. In next tutorials, we will start using the UI of the premium edition with a free trial license to develop and deploy more complex cloud applications.