Version 1.0
This plugin will allow you to interface with Amazon EC2 and perform a subset of the functionality that the EC2 environment offers.
CakePHP 2.0+ is required for this plugin.
The AmazonServer Model uses MongoCake plugin for storage.
Clone the MongoCake plugin, or add as a submodule to your git repository. Alternatively you can download the archive via Github, and place into your Plugin directory:
$ git clone git://github.com/lorenzo/MongoCake.git Plugin/MongoCake
or
$ git submodule add git://github.com/lorenzo/MongoCake.git Plugin/MongoCake
Clone this Ec2 repository into your Plugin directory, or setup as a submodule, or extract an archive from Github:
$ git clone git://github.com/CakeDC/Ec2.git Plugin/Ec2
or
$ git submodule add git://github.com/CakeDC/Ec2.git Plugin/Ec2
You need to make CakePHP aware of your plugin, put the following like in your Config/bootstrap.php
file
CakePlugin::load('Ec2');
An example configuration file is in the Ec2 directory Config/Amazon.php.default
. It contains an example of how Config/database.php
should look like after configuring the new datasource, you can copy the example over to the mentioned file and fill in the details.
The settings are taken from your Amazon account settings.
The command line lets you view information about your amazon ec2 instances, as well as interact with them.
Available commands:
- create
- run
- describe
- start
- stop
- reboot
- terminate
- status
Show all information about current instances registered with Amazon:
$ cake Ec2.amazon_server describe
View information about a specific instance id:
$ cake Ec2.amazon_server status 4e9e405eb67099021c000000
Issue instructions to reboot the instance specified:
$ cake Ec2.amazon_server reboot 4e9e405eb67099021c000000
Stop an instance. Unlike terminate, this instance will be available for running again later:
$ cake Ec2.amazon_server stop 4e9e405eb67099021c000000
Start an instance that has been stopped
$ cake Ec2.amazon_server start 4e9e405eb67099021c000000
Terminate a specific EC2 instance:
$ cake Ec2.amazon_server terminate 4e9e405eb67099021c000000
Terminate all instances:
$ cake Ec2.amazon_server terminate all
For support and feature requests, please use Github issues.
For more information about our Professional CakePHP Services please visit the Cake Development Corporation website.
Copyright 2011, Cake Development Corporation
Licensed under The MIT License
Redistributions of files must retain the above copyright notice.
Copyright 2011
Cake Development Corporation
1785 E. Sahara Avenue, Suite 490-423
Las Vegas, Nevada 89104
http://cakedc.com