Skip to content
Dan Ryan edited this page Sep 13, 2012 · 5 revisions

Participant::Node::EC2

Overview

The ec2_server participant performs various actions on an EC2 server.

Options

  • aws_access_key_id - Set with the environment variable, AWS_ACCESS_KEY_ID
  • aws_secret_access_key - Set with the environment variable, AWS_SECRET_ACCESS_KEY

Actions

create_ec2_server

Creates an EC2 server.

Required parameters:

  • image_id
  • flavor_id
  • availability_zone
  • groups
  • key_name
  • region

Example definition

create_ec2_server \
  image_id: "${image_id}",
  flavor_id: "${flavor_id}",
  region: "${region}",
  availability_zone: "${availability_zone}",
  groups: "$f:groups",
  key_name: "${key_name}"

destroy_ec2_server

Destroys (terminates) an EC2 server.

Required parameters:

  • instance_id
  • region

Example definition

destroy_ec2_server \
  instance_id: "${instance_id}",
  region: "${region}"

stop_ec2_server

Stops a started EC2 server.

Required parameters:

  • instance_id
  • region

Example definition

stop_ec2_server \
  instance_id: "${instance_id}",
  region: "${region}"

start_ec2_server

Starts a stopped EC2 server.

Required parameters:

  • instance_id
  • region

Example definition

start_ec2_server \
  instance_id: "${instance_id}",
  region: "${region}"

restart_ec2_server

Hard reboot which explicitly stops and starts an EC2 server.

Required parameters:

  • instance_id
  • region

Example definition

restart_ec2_server \
  instance_id: "${instance_id}",
  region: "${region}"

reboot_ec2_server

Soft reboots an EC2 server.

Required parameters:

  • instance_id
  • region

Example definition

reboot_ec2_server \
  instance_id: "${instance_id}",
  region: "${region}"