Apache Libcloud 1.0.0-rc2 (preview) was released today and it contains the new Outscale storage driver I contributed upstream several days ago.

This release together with the digital signatures are available in the download section. You can read the change log here.

Along this entry I will introduce the Apache Libcloud project, the Outscale driver and how a new provider can be used to connect with the Outscale object storage service.

The Apache Libcloud project

Apache Libcloud is an Open Source Python library that provides a vendor-neutral interface to cloud provider APIs. It is used to support diversification without vendor lock-in.

The library eases the interaction with the cloud resources through an unified API and backend drivers.

There are available backend drivers to support popular and well-known cloud service providers. As expected, those drivers contain the functionalities exported to developers and applications via the unified API.

From a logical perspective, the library divides the supported resources among the following categories:

  • Cloud Servers and Block Storage
  • Cloud Object Storage and CDN
  • Load Balancers as a Service
  • DNS as a Service
  • Container Services
  • Backup as a Service

The next picture shows a simplified Libcloud diagram:

As we shall see later, the Outscale driver implements a new Libcloud provider to be used with the Cloud Object Storage API and the Outscale Object Storage Unit (OSU) based on Ceph.

The Outscale object storage driver

Righ now Outscale provides two different storage services in its cloud. They go under the names Block Storage Unit (BSU) and Object Storage Unit (OSU)

The BSU is the way to work with block storage on standard hard drives or SSDs. It is used to create and attach block storage volumes to instances in the Flexible Compute Unit (FCU) service.

The OSU service is all about storing and managing objects in a replicated and high-availability environment. The service exports an AWS S3 compatible API.

The Outscale object storage driver targets this second service, the OSU service. The driver extends the Libcloud S3 storage driver to provide a compatible S3 API together with the required bits to connect with the OSU service.

Using the Outscale OSU storage driver in Libcloud

You can use the OSU driver via the S3_RGW_OUTSCALE provider easily. A simple snippet follows...

from libcloud.storage.types import Provider
from libcloud.storage.providers import get_driver
import libcloud

api_key = 'api_key'
secret_key = 'secret_key'

cls = get_driver(Provider.S3_RGW_OUTSCALE)
driver = cls(api_key, secret_key, region='eu-west-1')
container = driver.get_container(...)

The 'region' parameter is an optional parameter. If you don't set up an explicit region the driver will use the default region 'eu-west-2'.

The driver supports the following five Outscale regions:

  • eu-west-1
  • eu-west-2
  • us-west-1
  • us-east-2
  • cn-southeast-1

A full example loading the S3_RGW_OUTSCALE provider and then retrieving an object is available here.

Running the example...

$ ./test-osu-outscale-driver.py
<Object: name=my-name-abcdabcd-123,
provider=OUTSCALE Ceph RGW S3 (eu-west-1) ...>


My work in Apache Libcloud is sponsored by Outscale and has been made possible by Igalia and the invaluable help of the Libcloud community. Thank you all!


comments powered by Disqus

Recent Entries