Compute driver that uses BOTO API to utilize EC2.
Go to file
cameron-r 36649ae1fc Cameron & Ed | Delete more unused rule EC2 rule args in EC2RuleTransformer, fix TestOpenstackRuleTransformer class name 2014-11-06 10:36:42 -06:00
tests Cameron & Ed | Delete more unused rule EC2 rule args in EC2RuleTransformer, fix TestOpenstackRuleTransformer class name 2014-11-06 10:36:42 -06:00
.gitignore kashyap | spawn now specifies availability zone, added test for detach volume 2014-10-24 15:32:09 +05:30
README.md Venu | added features 2014-11-05 18:32:36 +05:30
Vagrantfile Kashyap | Changed the provider box name to point to the new dev box which has Cinder 2014-09-23 17:42:50 +05:30
__init__.py Kashyap | Corrected import to be just ec2 2014-08-12 10:13:45 +00:00
credentials.py Kashyap | added test for attach volume and modified the volume_map to support default values 2014-10-21 12:46:33 +05:30
ec2_group_transformer.py Ed & Cameron | Refactoring: extract rule comparison between openstack and ec2 groups to common group class 2014-11-05 15:27:44 -06:00
ec2_rule_service.py Ed & Cameron | Extract getting transformed rules from openstack and ec2 groups into rule services, extract getting openstack group into group service 2014-11-05 15:27:44 -06:00
ec2_rule_transformer.py Cameron & Ed | Delete more unused rule EC2 rule args in EC2RuleTransformer, fix TestOpenstackRuleTransformer class name 2014-11-06 10:36:42 -06:00
ec2driver.py Cameron & Ed | Fix EC2RuleTransformer constructor use, updated security group rule integration test 2014-11-05 15:27:45 -06:00
ec2driver_config.py Venu | Removing keys 2014-11-04 17:48:31 +05:30
ec2driver_standard_config.py Venu and Kashyap | moved the aws keys from our config file to nova.conf and importing those values using cfg 2014-11-04 12:29:47 +05:30
ec2driver_test_config.py Cam & Ed | Fix endpoint/host/port config for ec2 connection 2014-10-22 11:38:43 -05:00
group.py Ed & Cameron | Refactoring: extract rule comparison between openstack and ec2 groups to common group class 2014-11-05 15:27:44 -06:00
group_rule_refresher.py Ed & Cameron | Remove rules from security groups on EC2 in GroupRuleRefresher 2014-11-05 17:07:29 -06:00
instance_rule_refresher.py Cameron & Ed | Extract looping over groups and refreshing their rules to GroupRuleRefresher 2014-11-05 15:27:44 -06:00
openstack_group_service.py Ed & Cameron | Extract getting transformed rules from openstack and ec2 groups into rule services, extract getting openstack group into group service 2014-11-05 15:27:44 -06:00
openstack_group_transformer.py Ed & Cameron | Refactoring: extract rule comparison between openstack and ec2 groups to common group class 2014-11-05 15:27:44 -06:00
openstack_rule_service.py Ed & Cameron | Extract getting transformed rules from openstack and ec2 groups into rule services, extract getting openstack group into group service 2014-11-05 15:27:44 -06:00
openstack_rule_transformer.py Cameron & Ed | Remove unused arguments from OpenStack and EC2 rules in rule transformers 2014-11-05 17:06:24 -06:00
rule.py Ed & Cameron | Common rule class for comparing openstack and ec2 rules 2014-11-05 15:27:44 -06:00
rule_comparator.py Ed & Cameron | Add and remove rules to/from security groups associated with instances 2014-10-30 17:18:17 -05:00

README.md

ThoughtWorks OpenStack to EC2 Driver

Thank you for your interest in this project. This is a ThoughtWorks internal R&D project to make Hybrid cloud real! So that enterprises can enjoy the benefits of the private cloud without being limited by it. In the event of all the Private cloud resources being utilised to their maximum capacity, the traffic can be managed by bursting to the public cloud for extra capacity.

For now we are focusing on being able to burst to Amazon EC2.

This driver will provide the level of abstraction that is required for OpenStack Dashboard or APIs to use Amazon EC2 as a hypervisor while continuing to be able to manage the existing private cloud.

Getting Started

  • OpenStack Icehouse/Juno installed
  • Python 2.7 and above
  • Amazon Web Service (AWS) SDK for Python -- Boto 2.34

Quick Setup Steps

  1. $ cd <openstack_root_dir>/nova/nova/virt/

  2. $ git clone https://github.com/ThoughtWorksInc/OpenStack-EC2-Driver.git ec2

  3. $ vim /etc/nova/nova.conf # make sure it contains the following options in the respective sections

     [DEFAULT]
     compute_driver=ec2.EC2Driver
    
     [conductor]
     use_local=True
    
     [ec2driver]
     ec2_secret_access_key = <your_aws_secret_access_key>
     ec2_access_key_id = <your_aws_access_key_id>
    
  4. ec2driver_standard_config.py can be edited to configure the default AMI, AWS region and endpoints.

  5. Restart the nova-compute service. You are now all set cloud burst!

What's supported!

  • Launch
  • Reboot
  • Terminate
  • Resize
  • Config drive / User Data
  • Pause/Unpause*
  • Suspend/Resume*
  • Attach/Detach/Swap Volume
  • Snapshot
  • Security Groups
  • Nova Diagnostics

###Some more to be added!

  • Spice, VNC and RDP Console
  • Serial Console Output
  • iSCSI
  • Service Control

#For Contributors

###Instructions for Developer Environment setup

  1. Install git, Virtualbox and Vagrant.
  2. $ git clone https://github.com/ThoughtWorksInc/OpenStack-EC2-Driver.git ec2
  3. $ cd ec2/ && vagrant up This will download the development environment from Vagrant clound and setup devstack.
  4. $ vagrant ssh
  5. Edit nova.conf and add the ec2 configuration options, refer to step 3 in Quick setup guide.
  6. Restart nova-compute
  • ~/devstack/rejoin-stack.sh
  • go to the nova-cpu screen (ctrl+a, 7)
  • restart the process with ctrl+c, press up, and then enter
  • go to nova-api (screen 6), and repeat

The driver should now be loaded. The contents of the repository is mapped to /opt/stack/nova/nova/virt/ec2/, and you can edit it directly from your host computer with an IDE of your choice.

###Running Tests

  1. Moto can be used to mock the EC2 server. To install moto, run sudo pip install moto.
  2. To optionally use Moto, run source /opt/stack/nova/nova/virt/ec2/tests/setup_moto.sh.
  3. ~/devstack/rejoin-stack.sh
  4. cd /opt/stack/nova/nova/virt/ec2/tests
  5. Use nosetests -s test_ec2driver.py
  6. To stop Moto, run source /opt/stack/nova/nova/virt/ec2/tests/shutdown_moto.sh.

* In Amazons EC2 there is no concept of suspend and resume on instances. Therefore, we simply stop EC2 instances when suspended and start the instances when resumed, we do the same on pause and un-pause.