Skip to content

InfrastructureManager

shatterednirvana edited this page Sep 10, 2012 · 3 revisions

Executive Summary: Starts and terminates virtual machines in supported Infrastructure-as-a-Services.

Why do we need it?

AppScale is a Platform-as-a-Service, so it (ideally) runs on top of an Infrastructure-as-a-Service. The complexity associated with starting virtual machines and managing them was originally placed within the AppController, but moving it into its own service allows other services to dynamically scale up and down, without needing to know how to do so for each Infrastructure-as-a-Service that we support. Currently those Infrastructure-as-a-Services are:

  • Eucalyptus
  • Amazon EC2

What does it do, and how does it do it?

The InfrastructureManager exposes methods via SOAP that can be used to start, query, or terminate virtual machines. Currently the InfrastructureManager uses the euca2ools when interacting with Eucalyptus, and the EC2 tools when interacting with Amazon EC2. In the future, we'd like to refactor this interface to use a Factory pattern - implementers should see how we provide Factory support for pluggable Datastores within the NeptuneManager for inspiration (located in appscale/Neptune/lib/datastores).

When does it do it?

In response to an AppController or NeptuneManager asking for virtual machines to be started or terminated.

Where does it do it?

An InfrastructureManager runs on each node within an AppScale deployment.

Developer stuff

The InfrastructureManager is written in Ruby, and its code can be found in appscale/InfrastructureManager. The main InfrastructureManager daemon is called infrastructure_manager.rb, and the SOAP server that exposes its methods is found in infrastructure_manager_server.rb.

Tests are written with test/unit and flexmock. Run the current unit test suite from appscale with rake infrastructuremanager:test.

Clone this wiki locally