Zend_Cloud_Infrastructure

Zend_Cloud_Infrastructure_Adapter

Adapters

The Zend_Cloud_Infrastructure supports the following adapters:

AMAZON EC2

To initialize the AMAZON EC2 adapter you have to use the following code:

  1. span style="color: #ff0000;">'key';
  2. $secret = 'secret';
  3. $region = 'region''Zend_Cloud_Infrastructure_Adapter_Ec2'

To create a new instance for AMAZON EC2 adapter you have to use the following parameters:

  1. span style="color: #ff0000;">'imageId'      => 'your-image-id',
  2.     'instanceType' => 'your-instance-type''name of the instance'"Name of the instance: %s\n""ID of the instance  : %s\n"

The monitor an instance of AMAZON EC2 you can use the starting time and ending time optional parameters. The times must be specified using the ISO 8601 format.

  1. span style="color: #ff0000;">'2008-02-26T19:00:00+00:00''2008-02-26T20:00:00+00:00''id-instance'

The instanceType parameter is optional. This parameter specify the type of the instance to create (for instance, 't1.micro').

Rackspace Cloud Servers

To initialize the Rackspace Cloud Servers adapter you have to use the following code:

  1. $user = 'username''API key''Zend_Cloud_Infrastructure_Adapter_Rackspace'

To create a new instance for Rackspace Cloud Servers adapter you have to use the following parameters:

  1. span style="color: #ff0000;">'imageId'  => 'image-id-of-the-instance',
  2.     'flavorId' => 'flavor-id-of-the-instance',
  3.     'metadata''foo' => 'bar',
  4.     ),
  5.     'file''remote-instance-path' => 'local-path''name of the instance'"Name of the instance: %s\n""ID of the instance  : %s\n"

The metadata array and the file array are optional parameters.

To monitor an instance of Rackspace Cloud Servers we can use only the SSH2 extension. The Rackspace API does not offer a dedicated service to monitor the instance. The monitoring features using the SSH2 connection are limited to the CPU usage, the RAM usage and the DISK usage.

  1. span style="color: #ff0000;">'username' => 'your-username',
  2.     'password' => 'your-password''id-instance''id-instance''id-instance'

The $options contains the username and the password to be used for the SSH connection.


Zend_Cloud_Infrastructure