blob: 88d591e2688e3860cf29b50abfba3e6c23b2e003 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="The Apache Software Foundation">
<meta name="keywords" content="python,libcloud,cloud,cloud computing,rackspace,amazon ec2,cloudfiles,openstack,cloudstack" />
<title>Blog | Apache Libcloud</title>
<!-- fav icons -->
<link rel="shortcut icon" href="/images/favicon.png" />
<link rel="apple-touch-icon" href="/images/apple-touch-icon.png" />
<link rel="apple-touch-icon-precomposed" href="/images/apple-touch-icon.png" />
<link href="/blog/atom.xml" type="application/atom+xml" rel="alternate" title="Apache Libcloud Blog Feed" />
<!-- Facebook OpenGraph tags -->
<meta content="Apache Libcloud" property="og:site_name">
<meta content="Blog" property="og:title">
<meta content="website" property="og:type">
<meta content="https://libcloud.apache.org/blog/page/10/" property="og:url">
<link href='/assets/global-1768bfa479597eed443be67c5aec2edc.css' rel='stylesheet' type='text/css' />
</head>
<body data-spy="scroll" data-target=".sidebar-nav" data-offset="80">
<nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/"><img src="/images/libcloud_logo.png" class="navbar-logo" /> Apache Libcloud</a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li ><a href="/" >Home</a></li>
<li ><a href="/about.html" >About</a></li>
<li ><a href="/getting-started.html" >Quick Start</a></li>
<li ><a href="https://libcloud.readthedocs.org/en/stable/" target="_blank">Documentation</a></li>
<li ><a href="/downloads.html" >Downloads</a></li>
<li ><a href="/community.html" >Community</a></li>
<li ><a href="/blog/" >Blog</a></li>
</ul>
<div class="material-switch pull-right">
<input id="theme-switch" name="theme-switch" type="checkbox" onclick="modeSwitcher()"/>
<label for="theme-switch" class="label-default"></label>
<span id="theme-toggle" class="theme-switch">Dark mode</span>
</div>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</nav>
<div class="container main-container">
<div class="row section page-content">
<div class="col-lg-8">
<h1>Blog</h1>
<div class="posts">
<div class="post">
<h2 class="post-title"><a href="/blog/2016/02/16/new-drivers-deprecated-drivers.html">New compute drivers and deprecated drivers in 1.0</a></h2>
<span class="post-date-author">By Anthony Shaw on Feb 16, 2016</span>
<div class="post-content">
<p>With Libcloud 1.0.0 around the corner, it’s time to have a spring clean of the compute drivers. Granted, it’s not spring everywhere -actually
I’m writing from Sydney, Australia where it’s definitely summer.</p>
<p>Looking at the 52 providers in the 0.21.0 release, I have identified 5 providers that are no longer available or open.</p>
<ul>
<li>CloudFrames</li>
<li>Looks dead - website doesn’t work, can’t see any references to this online.</li>
<li><code class="language-plaintext highlighter-rouge">libcloud.compute.drivers.cloudframes</code></li>
<li>HP Public Cloud (Helion)</li>
<li><a href="https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2566">Shut down on 31st of January 2016</a></li>
<li><code class="language-plaintext highlighter-rouge">libcloud.compute.drivers.hpcloud</code></li>
<li>IBM SmartCloud Enterprise</li>
<li><a href="http://www.theregister.co.uk/2013/10/31/ibm_to_shutter_smartcloud_enterprise_moves_customers_to_softlayer/">Shut down 2014, customers instructed to move to SoftLayer</a></li>
<li><code class="language-plaintext highlighter-rouge">libcloud.compute.drivers.ibm_sce</code></li>
<li>Ninefold</li>
<li><a href="http://www.itnews.com.au/news/ninefold-to-shut-down-411312">Ninefold shut down in January 2016</a></li>
<li><code class="language-plaintext highlighter-rouge">libcloud.compute.drivers.ninefold</code></li>
<li>Opsource</li>
<li>Dimension Data acquired OpSource in 2012, the Opsource driver is succeeded by the Dimension Data driver.</li>
<li><code class="language-plaintext highlighter-rouge">libcloud.compute.drivers.opsource</code></li>
</ul>
<h3 id="handling-deprecated-drivers">Handling deprecated drivers</h3>
<p>For 1.0.0, we need a clean and user-friendly way of handling deprecated drivers as well as keeping the repository clean from legacy code.</p>
<p>The most obvious implementation is that calls to <code class="language-plaintext highlighter-rouge">get_driver(Provider.NINEFOLD)</code> as an example will return a user error message saying
this provider is no longer supported with a link to a new article and an alternative solution.</p>
<p>Currently, users trying to instantiate a HPE public cloud driver for example will get a connection error, which is not user friendly.</p>
<h3 id="new-compute-drivers-in-100-pre2">New compute drivers in 1.0.0-pre2</h3>
<p>The upcoming release, so currently available in trunk contains some new compute drivers.</p>
<ul>
<li><a href="http://libcloud.readthedocs.org/en/latest/compute/drivers/ntta.html">NTT America Public Cloud</a></li>
<li><a href="http://libcloud.readthedocs.org/en/latest/compute/drivers/internetsolutions.html">Internet Solutions Public Cloud</a></li>
<li><a href="http://libcloud.readthedocs.org/en/latest/compute/drivers/medone.html">Med-1 Public Cloud</a></li>
<li><a href="http://libcloud.readthedocs.org/en/latest/compute/drivers/indosat.html">Indosat Cloud</a></li>
<li><a href="http://libcloud.readthedocs.org/en/latest/compute/drivers/bsnl.html">BSNL IDC Cloud</a></li>
</ul>
<p>Full change log can be found at <a href="https://github.com/apache/libcloud/blob/trunk/CHANGES.rst">here</a>.</p>
</div>
<div class="row section post-meta">
<div class="col-md-12 post-tags">
<p>Tags: <a href="/blog/tags/news.html" rel="tag">news</a>, <a href="/blog/tags/announcement.html" rel="tag">announcement</a></p>
</div>
</div>
</div>
<div class="post">
<h2 class="post-title"><a href="/blog/2016/02/05/libcloud-containers-example.html">Using the container abstraction API in 1.0.0-pre1</a></h2>
<span class="post-date-author">By Anthony Shaw on Feb 05, 2016</span>
<div class="post-content">
<h2 id="background">Background</h2>
<p>Containers are the talk of the town, you can’t escape an event or meetup without someone talking about containers. The lessons we
learnt with compute abstraction are applying widely with containers in 2016. APIs are not consistent between clouds, designs are not
standardised and yet, users are trying to consume multiple services.</p>
<p>We introduced Container-as-a-Service support in <a href="http://libcloud.apache.org/blog/2016/01/26/libcloud-1-0-0-pre1-released.html">1.0.0-pre1</a>, a community pre-release with the intention of sparking feedback from
the open-source community about the design and the implementation of 4 example drivers :</p>
<ul>
<li>Docker</li>
<li>Joyent Triton</li>
<li>Amazon EC2 Container Service</li>
<li>Google Kubernetes</li>
</ul>
<p>In this tutorial we’re going to explore how to do this:</p>
<div class="imginline">
<p><img src="/images/posts/2016-02-05-containers/container_cloud_example.png" class="img-responsive inline" /></p>
<p class="img-caption">Deploying containers across platforms.</p>
</div>
<p>Pulling images from the Docker hub, deploying to Docker, Kubernetes and Amazon ECS then auditing them with a single query.</p>
<h2 id="getting-started-with-100-pre1">Getting Started with 1.0.0-pre1</h2>
<p>First off, let’s install the new packages, you probably want to do this within a virtualenv if you’re using Apache Libcloud for other projects.</p>
<p>So run these commands at a Linux Shell to create a virtualenv called ‘containers’ and install the pre-release packages into that environment.</p>
<div class="language-bash highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code> virtualenv containers
<span class="nb">cd </span>containers
<span class="nb">source </span>bin/activate
pip <span class="nb">install </span>apache-libcloud<span class="o">==</span>1.0.0-pre1
</code></pre>
</div>
</div>
<p>Now you can start using this package with a test script, let’s create one called containers.py</p>
<div class="language-bash highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code> <span class="nb">touch </span>containers.py
</code></pre>
</div>
</div>
<p>Using your favourite text editor, update that file to import the 1.0.0-pre1 libraries and the factory methods for instantiating containers.</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code> <span class="kn">from</span> <span class="nn">libcloud.container.providers</span> <span class="kn">import</span> <span class="n">get_driver</span>
<span class="kn">from</span> <span class="nn">libcloud.container.types</span> <span class="kn">import</span> <span class="n">Provider</span>
</code></pre>
</div>
</div>
<p><code class="language-plaintext highlighter-rouge">get_driver</code> is a factory method as with all libcloud APIs, you call this method with the <code class="language-plaintext highlighter-rouge">Provider</code> that you want to instantiate. Our options are:</p>
<ul>
<li><code class="language-plaintext highlighter-rouge">Provider.DOCKER</code> - Standalone Docker API</li>
<li><code class="language-plaintext highlighter-rouge">Provider.KUBERNETES</code> - Kubernetes Cluster endpoint</li>
<li><code class="language-plaintext highlighter-rouge">Provider.JOYENT</code> - Joyent Triton Public API</li>
<li><code class="language-plaintext highlighter-rouge">Provider.ECS</code> - Amazon EC2 Container Service</li>
</ul>
<p>Calling <code class="language-plaintext highlighter-rouge">get_driver</code> will return a reference to the driver class that you requested. You can then instantiate that class into an object using the
contructor. This is always a set of parameters for setting the host or region, the authentication and any other options.</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code> <span class="n">driver</span> <span class="o">=</span> <span class="n">get_driver</span><span class="p">(</span><span class="n">Provider</span><span class="p">.</span><span class="n">DOCKER</span><span class="p">)</span>
</code></pre>
</div>
</div>
<p>Now we can call our driver and get an instance of it called <code class="language-plaintext highlighter-rouge">docker_driver</code> and use that to deploy a container. For Docker you need the pem files on the server,
the host (IP or FQDN) and the port.</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code> <span class="n">docker_driver</span> <span class="o">=</span> <span class="n">driver</span><span class="p">(</span><span class="n">host</span><span class="o">=</span><span class="s">'https://198.61.239.128'</span><span class="p">,</span> <span class="n">port</span><span class="o">=</span><span class="mi">4243</span><span class="p">,</span>
<span class="n">key_file</span><span class="o">=</span><span class="s">'key.pem'</span><span class="p">,</span> <span class="n">cert_file</span><span class="o">=</span><span class="s">'cert.pem'</span><span class="p">)</span>
</code></pre>
</div>
</div>
<p>Docker requires that images are available in the image database before they can be deployed as containers. With Kubernetes and Amazon ECS this step is not required
as when you deploy a container it carries out that download for you.</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code> <span class="n">image</span> <span class="o">=</span> <span class="n">driver</span><span class="p">.</span><span class="n">install_image</span><span class="p">(</span><span class="s">'tomcat:8.0'</span><span class="p">)</span>
</code></pre>
</div>
</div>
<p>Now that Docker has the version 8.0 image of Apache Tomcat, you can deploy this as a container called <code class="language-plaintext highlighter-rouge">my_tomcat_container</code>. Tomcat runs on TCP/8080 by default so we
want to bind that port for our container using an optional parameter <code class="language-plaintext highlighter-rouge">port_bindings</code></p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code> <span class="n">bindings</span> <span class="o">=</span> <span class="p">{</span> <span class="s">"22/tcp"</span><span class="p">:</span> <span class="p">[{</span> <span class="s">"HostPort"</span><span class="p">:</span> <span class="s">"11022"</span> <span class="p">}]</span> <span class="p">}</span>
<span class="n">container</span> <span class="o">=</span> <span class="n">driver</span><span class="p">.</span><span class="n">deploy_container</span><span class="p">(</span><span class="s">'my_tomcat_container'</span><span class="p">,</span> <span class="n">image</span><span class="p">,</span> <span class="n">port_bindings</span><span class="o">=</span><span class="n">bindings</span><span class="p">)</span>
</code></pre>
</div>
</div>
<p>This will have deployed the container and started it up for you, you can disable the automatic startup by using <code class="language-plaintext highlighter-rouge">start=False</code> as a keyword argument. You can now call upon this container and
run methods, <code class="language-plaintext highlighter-rouge">restart</code>, <code class="language-plaintext highlighter-rouge">start</code>, <code class="language-plaintext highlighter-rouge">stop</code> and <code class="language-plaintext highlighter-rouge">destroy</code>.</p>
<p>For example, to blow away that test container:</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code> <span class="n">container</span><span class="p">.</span><span class="n">destroy</span><span class="p">()</span>
</code></pre>
</div>
</div>
<h2 id="crossing-the-streams-calling-kubernetes-and-amazon-ec2-container-service">Crossing the streams; calling Kubernetes and Amazon EC2 Container Service</h2>
<p>With Docker we saw that we needed to “pull” the image before we deployed it. Kubernetes and Amazon ECS don’t have that requirement, but as a safeguard you can query the Docker Hub API using a
utility class provided</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code> <span class="kn">from</span> <span class="nn">libcloud.container.utils.docker</span> <span class="kn">import</span> <span class="n">HubClient</span>
<span class="n">hub</span> <span class="o">=</span> <span class="n">HubClient</span><span class="p">()</span>
<span class="n">image</span> <span class="o">=</span> <span class="n">hub</span><span class="p">.</span><span class="n">get_image</span><span class="p">(</span><span class="s">'tomcat'</span><span class="p">,</span> <span class="s">'8.0'</span><span class="p">)</span>
</code></pre>
</div>
</div>
<p>Now <code class="language-plaintext highlighter-rouge">image</code> can be used to deploy to any driver instance that you create. Let’s try that against Kubernetes and ECS.</p>
<h3 id="amazon-ecs">Amazon ECS</h3>
<p>Before you run this example, you will need an API key and the permissions for that key to have the <code class="language-plaintext highlighter-rouge">AmazonEC2ContainerServiceFullAccess</code> role. <code class="language-plaintext highlighter-rouge">ap-southeast-2</code> is my nearest region, but you can
swap this out for any of the Amazon public regions that have the ECS service available.</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code> <span class="n">e_cls</span> <span class="o">=</span> <span class="n">get_driver</span><span class="p">(</span><span class="n">Provider</span><span class="p">.</span><span class="n">ECS</span><span class="p">)</span>
<span class="n">ecs</span> <span class="o">=</span> <span class="n">e_cls</span><span class="p">(</span><span class="n">access_id</span><span class="o">=</span><span class="s">'SDHFISJDIFJSIDFJ'</span><span class="p">,</span>
<span class="n">secret</span><span class="o">=</span><span class="s">'THIS_IS)+_MY_SECRET_KEY+I6TVkv68o4H'</span><span class="p">,</span>
<span class="n">region</span><span class="o">=</span><span class="s">'ap-southeast-2'</span><span class="p">)</span>
</code></pre>
</div>
</div>
<p>ECS and Kubernetes both support some form of grouping or clustering for your containers. This is available as <code class="language-plaintext highlighter-rouge">create_cluster</code>, <code class="language-plaintext highlighter-rouge">list_cluster</code>.</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code> <span class="n">cluster</span> <span class="o">=</span> <span class="n">ecs</span><span class="p">.</span><span class="n">create_cluster</span><span class="p">(</span><span class="s">'default'</span><span class="p">)</span>
<span class="n">container</span> <span class="o">=</span> <span class="n">ecs</span><span class="p">.</span><span class="n">deploy_container</span><span class="p">(</span>
<span class="n">cluster</span><span class="o">=</span><span class="n">cluster</span><span class="p">,</span>
<span class="n">name</span><span class="o">=</span><span class="s">'hello-world'</span><span class="p">,</span>
<span class="n">image</span><span class="o">=</span><span class="n">image</span><span class="p">,</span>
<span class="n">start</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span>
<span class="n">ex_container_port</span><span class="o">=</span><span class="mi">8080</span><span class="p">,</span> <span class="n">ex_host_port</span><span class="o">=</span><span class="mi">8080</span><span class="p">)</span>
</code></pre>
</div>
</div>
<p>This will have deployed a task definition in Amazon ECS with a single container inside, with a cluster called ‘main’ and deployed the tomcat:8.0 image from the Docker hub to that region.</p>
<p>Check out the <a href="http://libcloud.readthedocs.org/en/latest/container/drivers/ecs.html">ECS Documentation</a> for more details.</p>
<h3 id="kubernetes">Kubernetes</h3>
<p>Kubernetes authentication is currently only implemented for None (off) and Basic HTTP authentication. Let’s use the <a href="http://kubernetes.io/v1.1/docs/admin/authentication.html">basic HTTP authentication method</a> to connect.</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code>
<span class="n">k_cls</span> <span class="o">=</span> <span class="n">get_driver</span><span class="p">(</span><span class="n">Provider</span><span class="p">.</span><span class="n">KUBERNETES</span><span class="p">)</span>
<span class="n">kubernetes</span> <span class="o">=</span> <span class="n">k_cls</span><span class="p">(</span><span class="n">key</span><span class="o">=</span><span class="s">'my_username'</span><span class="p">,</span>
<span class="n">secret</span><span class="o">=</span><span class="s">'THIS_IS)+_MY_SECRET_KEY+I6TVkv68o4H'</span><span class="p">,</span>
<span class="n">host</span><span class="o">=</span><span class="s">'126.32.21.4'</span><span class="p">)</span>
<span class="n">cluster2</span> <span class="o">=</span> <span class="n">kubernetes</span><span class="p">.</span><span class="n">create_cluster</span><span class="p">(</span><span class="s">'default'</span><span class="p">)</span>
<span class="n">container2</span> <span class="o">=</span> <span class="n">kubernetes</span><span class="p">.</span><span class="n">deploy_container</span><span class="p">(</span>
<span class="n">cluster</span><span class="o">=</span><span class="n">cluster</span><span class="p">,</span>
<span class="n">name</span><span class="o">=</span><span class="s">'hello-world'</span><span class="p">,</span>
<span class="n">image</span><span class="o">=</span><span class="n">image</span><span class="p">,</span>
<span class="n">start</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span>
</code></pre>
</div>
</div>
<h2 id="wrapping-it-up">Wrapping it up</h2>
<p>Now, let’s wrap that all up by doing a list comprehension across the 3 drivers to get a list of all containers and print their ID’s and Names. Then delete them.</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code><span class="n">containers</span> <span class="o">=</span> <span class="p">[</span><span class="n">conn</span><span class="p">.</span><span class="n">list_containers</span><span class="p">()</span> <span class="k">for</span> <span class="n">conn</span> <span class="ow">in</span> <span class="p">[</span><span class="n">docker</span><span class="p">,</span> <span class="n">ecs</span><span class="p">,</span> <span class="n">kubernetes</span><span class="p">]]</span>
<span class="k">for</span> <span class="n">container</span> <span class="ow">in</span> <span class="n">containers</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="s">"%s : %s"</span> <span class="o">%</span> <span class="p">(</span><span class="n">container</span><span class="p">.</span><span class="nb">id</span><span class="p">,</span> <span class="n">container</span><span class="p">.</span><span class="n">name</span><span class="p">))</span>
<span class="n">container</span><span class="p">.</span><span class="n">destroy</span><span class="p">()</span>
</code></pre>
</div>
</div>
<h3 id="about-the-author">About the Author</h3>
<p>Anthony Shaw is on the PMC for Apache Libcloud, you can follow Anthony on Twitter at <a href="https://twitter.com/anthonypjshaw">@anthonypjshaw</a>.</p>
</div>
<div class="row section post-meta">
<div class="col-md-12 post-tags">
<p>Tags: <a href="/blog/tags/news.html" rel="tag">news</a>, <a href="/blog/tags/containers.html" rel="tag">containers</a>, <a href="/blog/tags/tutorial.html" rel="tag">tutorial</a></p>
</div>
</div>
</div>
<div class="post">
<h2 class="post-title"><a href="/blog/2016/01/26/libcloud-1-0-0-pre1-released.html">Libcloud 1.0.0-pre1 released</a></h2>
<span class="post-date-author">By Anthony Shaw on Jan 26, 2016</span>
<div class="post-content">
<p>We are pleased to announce the release of Libcloud 1.0.0-pre1.</p>
<p>This is a first pre-release in the 1.0.0 series which means it brings many new
features, improvements, bug-fixes, and DNS drivers.</p>
<h3 id="release-highlights">Release highlights</h3>
<p>A full blog post on the new features in 1.0.0 can be found <a href="http://libcloud.apache.org/blog/2016/01/20/libcloud-1.0-pre1.html">here</a></p>
<p>This includes:</p>
<ul>
<li>Introduction of Container-as-a-Service API drivers for <a href="http://libcloud.readthedocs.org/en/latest/container/drivers/kubernetes.html">Kubernetes</a>, <a href="http://libcloud.readthedocs.org/en/latest/container/drivers/docker.html">Docker</a>, <a href="http://libcloud.readthedocs.org/en/latest/container/drivers/ecs.html">Amazon ECS</a> and <a href="http://libcloud.readthedocs.org/en/latest/container/drivers/joyent.html">Joyent Triton</a></li>
<li>Introduction of Backup-as-a-Service API</li>
<li>Addition of South Korea region for Amazon EC2</li>
</ul>
<p>Full change log can be found at <a href="https://libcloud.readthedocs.org/en/latest/changelog.html">here</a>.</p>
<h3 id="download">Download</h3>
<p>The release can can be downloaded from
<a href="https://libcloud.apache.org/downloads.html">https://libcloud.apache.org/downloads.html</a> or installed using pip:</p>
<pre>
pip install apache-libcloud==1.0.0-pre1
</pre>
<h3 id="upgrading">Upgrading</h3>
<p>If you have installed Libcloud using pip you can also use it to upgrade it:</p>
<pre>
pip install --upgrade apache-libcloud==1.0.0-pre1
</pre>
<h3 id="upgrade-notes">Upgrade notes</h3>
<p>A page which describes backward incompatible or semi-incompatible
changes and how to preserve the old behavior when this is possible
can be found at <a href="https://libcloud.readthedocs.org/en/latest/upgrade_notes.html">https://libcloud.readthedocs.org/en/latest/upgrade_notes.html</a></p>
<h3 id="documentation">Documentation</h3>
<p>Regular and API documentation is available at <a href="https://libcloud.readthedocs.org/en/latest/">https://libcloud.readthedocs.org/en/latest/</a></p>
<h3 id="bugs--issues">Bugs / Issues</h3>
<p>If you find any bug or issue, please report it on our issue tracker
<a href="https://issues.apache.org/jira/browse/LIBCLOUD">https://issues.apache.org/jira/browse/LIBCLOUD</a>.
Don’t forget to attach an example and / or test which reproduces your
problem.</p>
<h3 id="thanks">Thanks</h3>
<p>Thanks to everyone who contributed and made this release possible! Full
list of people who contributed to this release can be found in the
<a href="https://libcloud.readthedocs.org/en/latest/changelog.html">CHANGES file</a>.</p>
</div>
<div class="row section post-meta">
<div class="col-md-12 post-tags">
<p>Tags: <a href="/blog/tags/news.html" rel="tag">news</a>, <a href="/blog/tags/release-announcement.html" rel="tag">release announcement</a></p>
</div>
</div>
</div>
<div class="post">
<h2 class="post-title"><a href="/blog/2016/01/20/libcloud-1.0-pre1.html">Libcloud 1.0-pre1 open for feedback</a></h2>
<span class="post-date-author">By Anthony Shaw on Jan 20, 2016</span>
<div class="post-content">
<p>We are pleased to announce that version 1.0-pre1 vote thread is open and the release is ready for community feedback.</p>
<p>1.0-pre1 marks the first pre-release of the 1.0 major release. Some years ago, Tomaz Muraus spoke on the podcast <a href="https://twit.tv/shows/floss-weekly/episodes/181">FLOSS weekly</a>.
Tomaz spoke about how much of a huge challenge porting the project to Python 3.x would be(!) as well as the 1.0 milestone.</p>
<p>It is worth listening to the podcast to see how far things have come, we now average 2 pull-requests a day and have 156 contributors.</p>
<p>As the project has matured over the last 5 years one of the most remarkable changes has been the adoption from the community and
continued support from our contributors adding new drivers, patching strange API issues and keeping the project alive.</p>
<p>Anthony Shaw will be speaking on the FLOSS weekly podcast on February 2nd and discussing our community and the project, so
please tune in.</p>
<p>The Cloud market as I’m sure you’re all aware of is thriving, the purpose of Libcloud was originally:</p>
<ul>
<li>To help prevent lock-in to a particular vendor</li>
<li>To abstract the complexity of vendor APIs</li>
<li>To give a simple way for deploying to and managing multiple cloud vendors</li>
</ul>
<p>Since that we have had (at the last count) 2,118,539 downloads. The project continues to grow in popularity with each new release.</p>
<p>So with the 1.0 major release we would like to announce 2 new driver types, containers and backup.</p>
<h2 id="history-of-our-drivers">History of our drivers</h2>
<p>The compute (IaaS) API is what libcloud is best known for but there is a range of drivers available for many other capabilities.</p>
<p>There is a presentation on the value of using Libcloud to avoid lock in <a href="http://www.slideshare.net/AnthonyShaw5/apache-libcloud-keeping-up-with-the-cloud-market-in-2016">on SlideShare</a></p>
<p>This is a history of the different driver types in the libcloud project.</p>
<ul>
<li>Compute (v0.1.0)</li>
<li>Support for nodes, node images, locations, states</li>
<li>52 providers including every major cloud provider in the market. Plus local services like Vmware, OpenStack, libvirt</li>
<li>DNS (v0.6.0)</li>
<li>Support for zones, records, recordtypes</li>
<li>19 providers including CloudFlare, DigitalOcean, DNSimple, GoDaddy, Google DNS, Linode, Rackspace, Amazon R53, Zerigo</li>
<li>Object Storage (v0.5.0)</li>
<li>Support for containers and objects</li>
<li>11 providers including Amazon S3, Azure Blobs, Google storage, CloudFiles, OpenStack Swift</li>
<li>Load Balancer (v0.5.0)</li>
<li>Support for nodes, balancers, listeners and algorithms</li>
<li>11 providers including CloudStack, Dimension Data, Amazon ELB, Google GCE LB, SoftLayer LB</li>
<li>Backup (v0.20.0)</li>
<li>Support for backup targets, recovery points and jobs</li>
<li>3 providers, Dimension Data, Amazon EBS snaps, Google snaps</li>
</ul>
<h2 id="introducing-backup-drivers">Introducing Backup Drivers</h2>
<p>With 1.0-pre1 we have introduced a new driver type for backup, <code class="language-plaintext highlighter-rouge">libcloud.backup</code></p>
<p>Backup API allows you to manage Backup as A Service and services such as EBS Snaps,
GCE volume snap and dimension data backup.</p>
<h3 id="terminology">Terminology</h3>
<ul>
<li><code class="language-plaintext highlighter-rouge">libcloud.backup.base.BackupTarget</code> - Represents a backup target, like a Virtual Machine, a folder or a database.</li>
<li><code class="language-plaintext highlighter-rouge">libcloud.backup.base.BackupTargetRecoveryPoint</code> - Represents a copy of the data in the target, a recovery point can be
recovered to a backup target. An inplace restore is where you recover to the same target and an out-of-place restore is where you
recover to another target.</li>
<li><code class="language-plaintext highlighter-rouge">libcloud.backup.base.BackupTargetJob</code> - Represents a backup job running on backup target.</li>
</ul>
<h2 id="introducing-container-as-a-service-drivers">Introducing Container-as-a-Service Drivers</h2>
<p>The API is for Container-as-a-Service providers, these new types of cloud services offer container management and hosting as a service.
The new services are already providing proprietary APIs, giving the need for a tool like Libcloud if you want to provision to any cloud provider.</p>
<p>Google, Amazon and Joyent have all announced Container cloud services and Microsoft have launched a beta service also, so we are getting on the front foot with an
abstraction API for people wishing to gain similar benefits to the compute, load balancer and storage APIs.</p>
<p><a href="http://www.slideshare.net/AnthonyShaw5/introducing-container-asaservice-support-to-apache-libcloud">A presentation on this topic is available on SlideShare.</a></p>
<p><strong>Isn’t docker a standard?</strong>
Well, yes and no.</p>
<p>Docker has been the main technology adopted by these providers as the host system for the containers and also as the specification of the containers themselves.
But, Docker is not a provisioning system, it is a virtualization host. Also there are alternatives, like CoreOS Rkt.</p>
<h3 id="container-api-design">Container API design</h3>
<p>Container-as-a-Service providers will implement the <code class="language-plaintext highlighter-rouge">ContainerDriver</code> class to provide functionality for :</p>
<ul>
<li>Listing deployed containers</li>
<li>Starting, stopping and restarting containers (where supported)</li>
<li>Destroying containers</li>
<li>Creating/deploying containers</li>
<li>Listing container images</li>
<li>Installing container images (pulling an image from a local copy or remote repository)</li>
</ul>
<h3 id="simple-container-support">Simple Container Support</h3>
<ul>
<li><code class="language-plaintext highlighter-rouge">libcloud.container.base.ContainerImage</code> - Represents an image that can be deployed, like an application or an operating system</li>
<li><code class="language-plaintext highlighter-rouge">libcloud.container.base.Container</code> - Represents a deployed container image running on a container host</li>
</ul>
<h3 id="cluster-suppport">Cluster Suppport</h3>
<p>Cluster support extends on the basic driver functions, but where drivers implement the class-level attribute <code class="language-plaintext highlighter-rouge">supports_clusters</code> as True
clusters may be listed, created and destroyed. When containers are deployed, the target cluster can be specified.</p>
<ul>
<li><code class="language-plaintext highlighter-rouge">libcloud.container.base.ContainerCluster</code> - Represents a deployed container image running on a container host</li>
<li><code class="language-plaintext highlighter-rouge">libcloud.container.base.ClusterLocation</code> - Represents a location for clusters to be deployed</li>
</ul>
<h3 id="using-the-container-drivers">Using the container drivers</h3>
<p>The container drivers have been designed around similar principles to the compute driver. It is simple to use and a flat class design.</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code><span class="kn">from</span> <span class="nn">libcloud.container.providers</span> <span class="kn">import</span> <span class="n">get_driver</span>
<span class="kn">from</span> <span class="nn">libcloud.container.types</span> <span class="kn">import</span> <span class="n">Provider</span>
<span class="n">Cls</span> <span class="o">=</span> <span class="n">get_driver</span><span class="p">(</span><span class="n">Provider</span><span class="p">.</span><span class="n">DOCKER</span><span class="p">)</span>
<span class="n">driver</span> <span class="o">=</span> <span class="n">Cls</span><span class="p">(</span><span class="s">'user'</span><span class="p">,</span> <span class="s">'api key'</span><span class="p">)</span>
<span class="n">image</span> <span class="o">=</span> <span class="n">driver</span><span class="p">.</span><span class="n">install_image</span><span class="p">(</span><span class="s">'tomcat:8.0'</span><span class="p">)</span>
<span class="n">container</span> <span class="o">=</span> <span class="n">driver</span><span class="p">.</span><span class="n">deploy_container</span><span class="p">(</span><span class="s">'tomcat'</span><span class="p">,</span> <span class="n">image</span><span class="p">)</span>
<span class="n">container</span><span class="p">.</span><span class="n">restart</span><span class="p">()</span>
</code></pre>
</div>
</div>
<h3 id="container-registries">Container Registries</h3>
<p>The Docker Registry API is used by services like Amazon ECR, the Docker Hub website and by anyone hosting their own Docker registry.
It doesn’t belong to a particular driver, so is a utility class.
Some providers, like Amazon ECR have a factory method to provide a registry client
Images from docker registry can be sent to the deploy_container method for any driver.</p>
<div class="language-python highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code><span class="kn">from</span> <span class="nn">libcloud.container.utils.docker</span> <span class="kn">import</span> <span class="n">HubClient</span>
<span class="n">hub</span> <span class="o">=</span> <span class="n">HubClient</span><span class="p">()</span>
<span class="n">image</span> <span class="o">=</span> <span class="n">hub</span><span class="p">.</span><span class="n">get_image</span><span class="p">(</span><span class="s">'ubuntu'</span><span class="p">,</span> <span class="s">'latest'</span><span class="p">)</span>
</code></pre>
</div>
</div>
<p>When other container registry services are made available these can be provided in a similar context.</p>
<h3 id="prototype-drivers-in-libcloudcontainer">Prototype drivers in libcloud.container</h3>
<p>Drivers have been provided to show example implementations of the API, these drivers are <strong>experimental</strong> and need to go through more thorough community testing
before they are ready for a stable release.</p>
<ul>
<li><a href="http://libcloud.readthedocs.org/en/latest/container/drivers/docker.html">Docker</a></li>
<li><a href="http://libcloud.readthedocs.org/en/latest/container/drivers/joyent.html">Joyent Triton</a></li>
<li><a href="http://libcloud.readthedocs.org/en/latest/container/drivers/kubernetes.html">Google Kubernetes</a></li>
<li><a href="http://libcloud.readthedocs.org/en/latest/container/drivers/ecs.html">Amazon Elastic Container Service (as well as Amazon Container Registry Service)</a></li>
</ul>
<p>The driver with the most contentious implementation is Kubernetes. We would like users of the Amazon ECS, Google Containers and Kubernetes project to provide feedback
on how they would like to map clusters, pods, namespaces to the low level concepts in the driver.</p>
<h1 id="providing-feedback">Providing feedback</h1>
<p>The <a href="http://mail-archives.apache.org/mod_mbox/libcloud-dev/201601.mbox/%3CCAOZ4b6sJM8ofMinGJCpfJEq7BYcAbfJBVCE7cfPniESqkEpkPQ%40mail.gmail.com%3E">voting thread</a> is open, please use this as your opportunity to give feedback.</p>
<h1 id="thanks">Thanks</h1>
<p>Thanks to everyone who contributed and made this release possible! Full
list of people who contributed to this release can be found in the
<a href="https://libcloud.readthedocs.org/en/latest/changelog.html">CHANGES file</a>.</p>
</div>
<div class="row section post-meta">
<div class="col-md-12 post-tags">
<p>Tags: <a href="/blog/tags/news.html" rel="tag">news</a>, <a href="/blog/tags/announcement.html" rel="tag">announcement</a></p>
</div>
</div>
</div>
<div class="post">
<h2 class="post-title"><a href="/blog/2016/01/19/libcloud-0-20-1-released.html">Libcloud 0.20.1 released</a></h2>
<span class="post-date-author">By Eric Johnson on Jan 19, 2016</span>
<div class="post-content">
<p>We are pleased to announce the release of Libcloud 0.20.1.</p>
<p>This is a bug-fix release in the 0.20 series.</p>
<h3 id="release-highlights">Release highlights</h3>
<ul>
<li>Allow for old and new style service accounts for GCE driver</li>
<li>Fix syntax error with DimensionDataStatus object</li>
<li>Fix bug in public IP addition command for DimensionData driver</li>
<li>Fix error with proxy_url with vCloud Compute driver.</li>
<li>Fix with hasattr for Rackspace DNS driver.</li>
</ul>
<p>Full change log can be found at <a href="https://libcloud.readthedocs.org/en/latest/changelog.html">here</a>.</p>
<h3 id="download">Download</h3>
<p>The release can can be downloaded from
<a href="https://libcloud.apache.org/downloads.html">https://libcloud.apache.org/downloads.html</a> or installed using pip:</p>
<pre>
pip install apache-libcloud==0.20.1
</pre>
<h3 id="upgrading">Upgrading</h3>
<p>If you have installed Libcloud using pip you can also use it to upgrade it:</p>
<pre>
pip install --upgrade apache-libcloud==0.20.1
</pre>
<h3 id="upgrade-notes">Upgrade notes</h3>
<p>A page which describes backward incompatible or semi-incompatible
changes and how to preserve the old behavior when this is possible
can be found at <a href="https://libcloud.readthedocs.org/en/latest/upgrade_notes.html">https://libcloud.readthedocs.org/en/latest/upgrade_notes.html</a></p>
<h3 id="documentation">Documentation</h3>
<p>Regular and API documentation is available at <a href="https://libcloud.readthedocs.org/en/latest/">https://libcloud.readthedocs.org/en/latest/</a></p>
<h3 id="bugs--issues">Bugs / Issues</h3>
<p>If you find any bug or issue, please report it on our issue tracker
<a href="https://issues.apache.org/jira/browse/LIBCLOUD">https://issues.apache.org/jira/browse/LIBCLOUD</a>.
Don’t forget to attach an example and / or test which reproduces your
problem.</p>
<h3 id="thanks">Thanks</h3>
<p>Thanks to everyone who contributed and made this release possible! Full
list of people who contributed to this release can be found in the
<a href="https://libcloud.readthedocs.org/en/latest/changelog.html">CHANGES file</a>.</p>
</div>
<div class="row section post-meta">
<div class="col-md-12 post-tags">
<p>Tags: <a href="/blog/tags/news.html" rel="tag">news</a>, <a href="/blog/tags/release-announcement.html" rel="tag">release announcement</a></p>
</div>
</div>
</div>
</div>
<p class="navigation">
<span class="alignleft"><a href="/blog/page/11/">« Previous Page</a></span>
<span class="pull-right"><a href="/blog/page/9/">Next Page »</a></span>
</p>
</div>
<div class="col-lg-3 col-lg-offset-1">
<h2>Archive</h1>
<ul>
<li> <a href="/blog/archives/2023/08/"> August 2023</a> &nbsp;(1)</li><li> <a href="/blog/archives/2023/01/"> January 2023</a> &nbsp;(1)</li><li> <a href="/blog/archives/2022/10/"> October 2022</a> &nbsp;(1)</li><li> <a href="/blog/archives/2022/05/"> May 2022</a> &nbsp;(1)</li><li> <a href="/blog/archives/2022/03/"> March 2022</a> &nbsp;(3)</li><li> <a href="/blog/archives/2021/11/"> November 2021</a> &nbsp;(2)</li><li> <a href="/blog/archives/2021/06/"> June 2021</a> &nbsp;(1)</li><li> <a href="/blog/archives/2021/01/"> January 2021</a> &nbsp;(2)</li><li> <a href="/blog/archives/2020/09/"> September 2020</a> &nbsp;(1)</li><li> <a href="/blog/archives/2020/08/"> August 2020</a> &nbsp;(2)</li><li> <a href="/blog/archives/2020/06/"> June 2020</a> &nbsp;(2)</li><li> <a href="/blog/archives/2020/04/"> April 2020</a> &nbsp;(2)</li><li> <a href="/blog/archives/2020/03/"> March 2020</a> &nbsp;(1)</li><li> <a href="/blog/archives/2020/01/"> January 2020</a> &nbsp;(2)</li><li> <a href="/blog/archives/2019/12/"> December 2019</a> &nbsp;(1)</li><li> <a href="/blog/archives/2019/11/"> November 2019</a> &nbsp;(1)</li><li> <a href="/blog/archives/2019/08/"> August 2019</a> &nbsp;(2)</li><li> <a href="/blog/archives/2019/05/"> May 2019</a> &nbsp;(1)</li><li> <a href="/blog/archives/2018/11/"> November 2018</a> &nbsp;(1)</li><li> <a href="/blog/archives/2018/06/"> June 2018</a> &nbsp;(1)</li><li> <a href="/blog/archives/2018/03/"> March 2018</a> &nbsp;(1)</li><li> <a href="/blog/archives/2017/12/"> December 2017</a> &nbsp;(1)</li><li> <a href="/blog/archives/2017/09/"> September 2017</a> &nbsp;(2)</li><li> <a href="/blog/archives/2017/07/"> July 2017</a> &nbsp;(1)</li><li> <a href="/blog/archives/2017/04/"> April 2017</a> &nbsp;(3)</li><li> <a href="/blog/archives/2016/12/"> December 2016</a> &nbsp;(1)</li><li> <a href="/blog/archives/2016/11/"> November 2016</a> &nbsp;(1)</li><li> <a href="/blog/archives/2016/10/"> October 2016</a> &nbsp;(1)</li><li> <a href="/blog/archives/2016/09/"> September 2016</a> &nbsp;(1)</li><li> <a href="/blog/archives/2016/07/"> July 2016</a> &nbsp;(1)</li><li> <a href="/blog/archives/2016/06/"> June 2016</a> &nbsp;(1)</li><li> <a href="/blog/archives/2016/04/"> April 2016</a> &nbsp;(2)</li><li> <a href="/blog/archives/2016/02/"> February 2016</a> &nbsp;(2)</li><li> <a href="/blog/archives/2016/01/"> January 2016</a> &nbsp;(4)</li><li> <a href="/blog/archives/2015/12/"> December 2015</a> &nbsp;(1)</li><li> <a href="/blog/archives/2015/11/"> November 2015</a> &nbsp;(1)</li><li> <a href="/blog/archives/2015/10/"> October 2015</a> &nbsp;(2)</li><li> <a href="/blog/archives/2015/08/"> August 2015</a> &nbsp;(1)</li><li> <a href="/blog/archives/2015/03/"> March 2015</a> &nbsp;(1)</li><li> <a href="/blog/archives/2015/02/"> February 2015</a> &nbsp;(1)</li><li> <a href="/blog/archives/2014/12/"> December 2014</a> &nbsp;(1)</li><li> <a href="/blog/archives/2014/11/"> November 2014</a> &nbsp;(1)</li><li> <a href="/blog/archives/2014/07/"> July 2014</a> &nbsp;(2)</li><li> <a href="/blog/archives/2014/06/"> June 2014</a> &nbsp;(1)</li><li> <a href="/blog/archives/2014/05/"> May 2014</a> &nbsp;(1)</li><li> <a href="/blog/archives/2014/04/"> April 2014</a> &nbsp;(1)</li><li> <a href="/blog/archives/2014/02/"> February 2014</a> &nbsp;(8)</li><li> <a href="/blog/archives/2014/01/"> January 2014</a> &nbsp;(4)</li><li> <a href="/blog/archives/2013/12/"> December 2013</a> &nbsp;(3)</li><li> <a href="/blog/archives/2013/11/"> November 2013</a> &nbsp;(2)</li><li> <a href="/blog/archives/2013/09/"> September 2013</a> &nbsp;(1)</li><li> <a href="/blog/archives/2013/08/"> August 2013</a> &nbsp;(1)</li><li> <a href="/blog/archives/2013/07/"> July 2013</a> &nbsp;(1)</li><li> <a href="/blog/archives/2013/03/"> March 2013</a> &nbsp;(1)</li><li> <a href="/blog/archives/2013/02/"> February 2013</a> &nbsp;(1)</li><li> <a href="/blog/archives/2012/12/"> December 2012</a> &nbsp;(2)</li><li> <a href="/blog/archives/2012/11/"> November 2012</a> &nbsp;(2)</li><li> <a href="/blog/archives/2012/09/"> September 2012</a> &nbsp;(1)</li><li> <a href="/blog/archives/2012/08/"> August 2012</a> &nbsp;(1)</li><li> <a href="/blog/archives/2012/07/"> July 2012</a> &nbsp;(1)</li><li> <a href="/blog/archives/2012/05/"> May 2012</a> &nbsp;(2)</li><li> <a href="/blog/archives/2012/04/"> April 2012</a> &nbsp;(1)</li><li> <a href="/blog/archives/2012/02/"> February 2012</a> &nbsp;(1)</li><li> <a href="/blog/archives/2011/12/"> December 2011</a> &nbsp;(2)</li><li> <a href="/blog/archives/2011/11/"> November 2011</a> &nbsp;(3)</li><li> <a href="/blog/archives/2011/10/"> October 2011</a> &nbsp;(1)</li><li> <a href="/blog/archives/2011/09/"> September 2011</a> &nbsp;(1)</li><li> <a href="/blog/archives/2011/07/"> July 2011</a> &nbsp;(1)</li><li> <a href="/blog/archives/2011/06/"> June 2011</a> &nbsp;(1)</li><li> <a href="/blog/archives/2011/05/"> May 2011</a> &nbsp;(1)</li><li> <a href="/blog/archives/2011/02/"> February 2011</a> &nbsp;(1)</li><li> <a href="/blog/archives/2011/01/"> January 2011</a> &nbsp;(1)</li><li> <a href="/blog/archives/2010/10/"> October 2010</a> &nbsp;(1)</li><li> <a href="/blog/archives/2010/05/"> May 2010</a> &nbsp;(1)</li><li> <a href="/blog/archives/2010/02/"> February 2010</a> &nbsp;(1)</li>
</ul>
</div>
</div>
<hr />
<footer>
<div class="row">
<div class="col-lg-12 text-center">
<div class="footer-links">
<p><a href="http://www.apache.org/licenses/">License</a> | <a
href="/security.html">Security</a> | <a
href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a> |
<a href="http://www.apache.org/foundation/thanks.html">Thanks</a> |
<a href="https://www.apache.org/events/">Events</a> |
<a href="/credits.html">Credits</a> | <a href="/media.html">Media</a>
</div>
<div class="footer-text">
<p><a class="acevent" data-format="wide"></a></p>
<p class="">Copyright &copy; 2009-2023 <a href="https://www.apache.org/" target="_blank">The Apache Software Foundation</a></p>
<p class="">Apache Libcloud, Libcloud, Apache, the Apache feather, and the Apache Libcloud project logo are trademarks of the Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
<p class="">Site last updated on 2023-09-09 21:33:21 +0000</p>
</div>
</div>
</div>
</footer>
</div><!-- /.container -->
<!-- JavaScript -->
<script src='/assets/global-20157a00c0e17a775f45ed99ccdf79d7.js' type='text/javascript'></script>
<script type="text/javascript">
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before
"trackPageView" */
/* We explicitly disable cookie tracking to avoid privacy issues */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '7']);
var d=document, g=d.createElement('script'),
s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<script src="https://www.apachecon.com/event-images/snippet.js"></script>
</body>
</html>