This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

libcloud-vagrant is a compute provider for Apache Libcloud which uses Vagrant to create VirtualBox nodes.

With libcloud-vagrant installed, you could prototype a small cluster on your laptop, for instance, and then deploy it later on to Amazon, Rackspace, or any of the other clouds supported by Libcloud.

Hello, world

The following snippet spins up a virtual machine running on your host:

from libcloud.compute.providers import get_driver

from libcloudvagrant import VAGRANT


driver = get_driver(VAGRANT)()

pub = driver.ex_create_network(name="pub", cidr="172.16.0.0/16", public=True)

node = driver.create_node(name="n1",
                          image=driver.get_image("hashicorp/precise64"),
                          size=driver.list_sizes()[0],
                          ex_networks=[pub])

print "Node '%s' running!" % (node.name,)
print ("Connect to it with 'ssh vagrant@%s' (password: 'vagrant')" %
       (node.public_ips[0],))

Features

libcloud-vagrant uses Vagrant to create boxes, networks and volumes. It creates a Vagrant environment under ~/.libcloudvagrant, which is used to run as many Vagrant boxes as you define.

Nodes created by libcloud-vagrant may be connected to public networks or to private networks. Public networks are implemented as VirtualBox host-only networks, and private networks are implemented as VirtualBox internal networks.

libcloud-vagrant also lets you create VDI disks, and attach them to the SATA controllers of your nodes.

Deployment scripts are run through Vagrant’s NAT interface, using Vagrant’s SSH credentials. Therefore they also work for non-networked nodes.

libcloud-vagrant includes a command-line tool to do simple operations with Vagrant nodes created by Libcloud:

$ libcloud-vagrant -h
usage: libcloud-vagrant [-h] <cmd>

Manage your Vagrant libcloud environment.

positional arguments:
  <cmd>       command to execute

optional arguments:
  -h, --help  show this help message and exit

Available commands:

    destroy
        Destroys all nodes, networks and volumes in your Vagrant
        environment.

    list
        Lists all nodes, networks and volumes in your Vagrant
        environment.

    screen
        Opens a screen(1) session to all nodes in your Vagrant
        environment.
$

libcloud-vagrant is not thread- or multiprocess-safe. Interactions with Vagrant and with the Virtualbox command-line tools are protected with a filesystem-based lock, which (hopefully) serializes things, so even if they worked, concurrent operations would not give you much benefit.

Requirements

libcloud-vagrant requires:

  • VirtualBox (tested with version 4.3.14 under 64-bit Linux).

  • Vagrant (tested with version 1.6.3 under 64-bit Linux).

  • Python 2.7.

  • If you want to attach storage volumes to nodes, you’ll need the vagrant-libcloud-helper Vagrant plugin. Install it with:

    $ vagrant plugin install vagrant-libcloud-helper
    

The following are optional:

  • If you’re behind an HTTP/FTP proxy, the Vagrant plugin vagrant-proxyconf will modify the nodes created by libcloud-vagrant to use it.

    You don’t need to configure vagrant-proxyconf. Install it with:

    $ vagrant plugin install vagrant-proxyconf
    

Installation

Once you have installed VirtualBox and Vagrant, do the usual:

$ pip install libcloud-vagrant

That will install libcloud-vagrant and its Python dependencies. You might want to do that within a virtualenv.

More examples

Have a look at the samples subdirectory of the source distribution. You wil find there a few scripts to create a single node, to show you how to provision it, and a script which creates a two-node cluster.

Release History

Release History

0.5.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
libcloud-vagrant-0.5.0.tar.gz (166.5 kB) Copy SHA256 Checksum SHA256 Source Aug 15, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting