Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Run a self-healing, auto-scaled and monitored cloud simply, in the clouds, on nearly any hardware, such as EC2, eucalyptus and vmware

branch: thrift

This branch is 0 commits ahead and 780 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.rdoc

PoolParty

poolpartyrb.com

DESCRIPTION:

PoolParty makes cloud provisioning and management easy. PoolParty provides a unified interface for provisioning, management and cloud life-cycle on many different cloud providers, such as EC2 and vmware.

Code your cloud!

SYNOPSIS:

PoolParty is written with the intention of being as application-agnostic as possible. It installs only the basic required software to glue the cloud together on the instances as listed below.

Quickstart

For instance, to start a basic cloud, let's write one:

pool "demo" do
  cloud "app" do
    instances 2..10
    keypair "cloud_demo"

    using :ec2

    has_file "/etc/motd", :content => "Hello from your cloud"
  end
end

Simply by issuing the command:

cloud start

The app cloud in the demo pool will be started, bootstrapped and provisioned to your liking. If the platform is not specified, then it's assumed to be ubuntu. However, if a node is running, then PoolParty will introspect the node and determine the operating system. This can be specified in the clouds.rb.

There are a number of commands PoolParty offers to interact with your cloud. They include:

  • cloud start

  • cloud terminate

  • cloud bootstrap

  • cloud configure

  • cloud compile

  • cloud console

  • cloud expand

  • cloud contract

  • cloud list

  • cloud show

  • cloud ssh

There is also a helper installer script. This is an easy way to get started bootstrapping your environment:

  • install-poolparty

We can change the cloud provider simply by changing the using line. For instance:

pool "demo" do
  cloud "app" do
    #...
    using :rackspace # coming soon
    #...

Clouds are distinguished by keypairs, so to create multiple clouds, create a new keypair. For instance:

pool "demo" do
  cloud "app" do
    keypair "demo_app"
    #...
  end
  cloud "db" do
    keypair "demo_db"
    #...
  end
end

Resources

As you probably noticed from above, you provision your system with resources. There are native resources, plugins (which are basically resources) and you can write your own. The base resources included in PoolParty are as follows:

  • file

  • directory

  • exec

  • variable

  • service

  • package

  • user

  • group

  • link (symlink)

  • line (line in file)

  • gem_package

  • cron

There are also dependency_resolver specific resources. For instance, *chef* specific resources are as follows:

  • chef_attribute

  • http_request

  • remote_directory

  • remote_file

  • route

  • script

To use these resources in your config file (clouds.rb), simply “assert” (call) the method with has_ or does_not_have prepended. For instance:

pool "demo" do
  cloud "app" do
    has_file "/etc/motd", :requires => get_package("apache2")
    has_package "apache2" do
      action :install
    end
  end
end

As you can see, there are many different ways to call a resource. All the following resource calls are identical:

has_file "/etc/motd", :content => "Hello world", :owner => "ari"
has_file :name => "/etc/motd", :content => "Hello world", :owner => "ari"
has_file "/etc/motd" do
  content "Hello world"
  owner "ari"
end
has_file "/etc/motd", :content => "Hello world" do
  owner "ari"
end

All resources can contain their own resources as well. This sets up a dependency on the parent dependency. For instance

has_directory "/etc/configs" do
  has_file "/etc/configs/configger", :content => "Stuff"
end

This says that the directory must exist before the file can be created.

You can see the dependency graph setup by your clouds.rb by calling

cloud compile -g output

That will generate a output.dot and output.png in the current directory. For this to work, you must have dot installed. Try it!

Resources can be built on top of other resources as well. This is the definition of a resource plugin. This is covered more in-depth on the homepage. For the curious, take a look at lib/poolparty/plugins/apache.rb for an example plugin.

There are currently several plugins that ship with PoolParty. Those include:

  • apache (this includes passenger, virtual_hosts, php5)

  • git

  • rails

This is list likely to expand as plugins are simply resources built on top of other resources. There is an external project called poolparty-extensions (<a href=“http://github.com/auser/poolparty-extensions/tree/mastergithub.com/auser/poolparty-extensions/tree/master”>http://github.com/auser/poolparty-extensions/tree/master>) that has quite a few external plugins, including hadoop, ganglia and more.

Extending

To add a cloud_provider, there are four methods that need to be implemented. Simply sublcass the CloudProviders module and require it in your clouds.rb (or commit it back to PoolParty). Those four methods are:

  • run_instance

  • terminate_instance

  • describe_instances

  • describe_instance

That's it!

Each resource is documented in the code and more documentation can be found at the site: <a href=“http://poolpartyrb.compoolpartyrb.com”>http://poolpartyrb.com>.

FEATURES/PROBLEMS:

  • Written in Ruby and Erlang (Internal node communication handled by <a href=“Hermesgithub.com/auser/hermes/tree/master”>Hermes>)

  • Written from the ground up to be extensible with plugins

  • Easy git-style commands to communicate with your clouds

  • Much much more

REQUIREMENTS:

  • Ruby

  • Erlang

INSTALL:

sudo gem install auser-poolparty

LICENSE:

(The MIT License)

Copyright © 2009 Ari Lerner, CloudTeam

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.