Skip to content
EarthmanT edited this page Jan 19, 2015 · 8 revisions

Welcome to the cloudify-aws-plugin wiki!

The Cloudify AWS Plugin gives you the ability to orchestrate your AWS resources using Cloudify.

Currently only the EC2 resources Instance, Security Group, Key Pair, and Elastic IP are supported. But this list will continue to grow.

Plugin Requirements:

  • Python 2.7

Importing the Plugin

To use this plugin, start by importing the node types file:

imports:
    - https://raw.githubusercontent.com/cloudify-cosmo/cloudify-aws-plugin/master/plugin.yaml

Types

cloudify.aws.nodes.Instance

This is an AWS EC2 Classic Instance. A basic virtual machine. Depends on a key pair and a security group. May optionally be attached to an Elastic IP.

  • derived_from: cloudify.nodes.Compute
  • properties:
    • ami_image_id: required. The AMI Image ID of the base image that you want to create and instance from.
    • instance_type: required. The instance type, usually a size, specified in [boto.ec2.connection.EC2Connection.run_instances] (http://boto.readthedocs.org/en/latest/ref/ec2.html#boto.ec2.connection.EC2Connection.run_instances)
    • use_external_resource: Boolean value whether to use an existing resource, whose ID is specified in resource_id.
    • resource_id: A string. The resource_id, if known (usually only known when using existing resource).
    • attributes: key-value parameters as described in: boto.ec2.connecton.EC2Connection.run_instances
      • ami_image_id and instance_type are also defined here. Doing so will not cause and error, but it will be overwritten by the required properties ami_image_id and instance_type.
      • key_name: The name of a key pair with which to launch the instance.
      • security_groups: required A comma separated string of security group names to connect to this server.
  • interfaces:
    • cloudify.interfaces.lifecycle:
      • create: Creates and starts an instance.
      • start: Starts a stopped instance.
      • stop: Stops an instance.
      • delete: Deletes and instance.
    • cloudify.interfaces.validation:
      • creation_validation: Validates that the resource was created.

cloudify.aws.nodes.SecurityGroup

This is a Security Group. It requires at least on rule, composed of an ip protocol (TCP, UDP, etc), from_port, to_port, and a CIDR IP block.

  • derived_from: cloudify.nodes.SecurityGroup
  • properties:
    • name: required A name that is unique in your account.
    • description: required A description of the security group. (Ex, "Public SSH Group.")
    • use_external_resource:
    • resource_id:
    • rules: required A list of rule sets, where each set is a dictionary of the following key-value pairs:
      • ip_protocol: required The IP protocol, such as TCP or UDP.
      • from_port: required The beginning port if providing a port range. Or just the port.
      • to_port: required The ending port if providing a port range, or just the port.
      • cidr_ip: required The cidr block if specifying an IP range, or just the ip followed by a single IP block suffix.
  • interfaces:
    • cloudify.interfaces.lifecycle:
      • create: Creates a security group.
      • delete: Deletes a security group.
    • cloudify.interfaces.validation:
      • creation_validation: Validates that the resource was created.

cloudify.aws.nodes.KeyPair

A key pair. You will use this to authenticate with a server instead of user name and password.

  • derived from: cloudify.nodes.Root
  • properties:
    • name: required. Name the file this. It will also become the filename.
    • use_external_resource:
    • resource_id:
    • private_key_path: required. This is the path on the machine where the script is run that you would like the key pair saved to. For example during bootstrap this will be saved on your local machine. The rest of the time it will be saved on your manager.
  • interfaces:
    • cloudify.interfaces.lifecycle:
      • create: Create a key pair. Used during the install workflow.
      • delete: Delete a key pair. Used during the uninstall workflow.
    • cloudify.interfaces.validation:
      • creation_validation: Validates that the resource was created.

cloudify.aws.nodes.ElasticIP:

An Elastic IP that you can provision in your account.

  • derived_from: cloudify.nodes.VirtualIP
  • properties:
    • elasticip: The IP. You can provide if using external resource.
    • use_external_resource
    • resource_id
  • interfaces:
    • cloudify.interfaces.lifecycle:
      • create: Allocate an Elastic IP in your account.
      • delete: Release an Elastic IP in your account.
    • cloudify.interfaces.validation:
      • creation_validation: Validates that the resource was created.

Relationship Types

cloudify.aws.relationships.instance_connected_to_security_group

Use this to connect a security group to an instance.

  • derived_from: cloudify.relationships.contained_in
    • source_interfaces
      • cloudify.interfaces.relationship_lifecycle
        • establish: This attaches the security group to an existing instance.
        • unlink: This detaches the security group from an instance.

cloudify.aws.relationships.instance_connected_to_elastic_ip

Adds a rule to a security group.

  • derived_from: cloudify.relationships.connected_to
    • source_interfaces:
      • cloudify.interfaces.relationship_lifecycle:
        • establish: Attach an Elastic IP to an existing Instance.
        • unlink: Detach an Elastic IP from an existing Instance.