Modified: libcloud/site/trunk/generated/blog/page/6/index.html URL: http://svn.apache.org/viewvc/libcloud/site/trunk/generated/blog/page/6/index.html?rev=1878843&r1=1878842&r2=1878843&view=diff ============================================================================== --- libcloud/site/trunk/generated/blog/page/6/index.html (original) +++ libcloud/site/trunk/generated/blog/page/6/index.html Sun Jun 14 18:32:35 2020 @@ -97,6 +97,222 @@ <div class="post"> + <h2><a href="/blog/2016/09/23/libcloud-1-2-1-released.html">Libcloud 1.2.1 released</a></h2> + + + + + + <span class="post-date-author">By Anthony Shaw on Sep 23, 2016</span> + + <div class="post-content"> + <p>We are pleased to announce the release of Libcloud 1.2.1.</p> + +<p>This release brings many new features, improvements, bug-fixes, and drivers.</p> + +<h2>Release highlights</h2> + +<h3>Changes in Apache Libcloud 1.2.1</h3> + +<ul> +<li>Fix issue enabling backups on Dimension Data driver</li> +</ul> + +<h3>Changes in Apache Libcloud 1.2.0</h3> + +<h4>General</h4> + +<ul> +<li>Fix caching of auth tokens in the Google Compute Engine drivers. Now we make +sure that the file is truncated before writing a new token. Not truncating the +file would cause issues if the new token is shorted then the existing one +which is cached in the file.</li> +</ul> + +<h4>Compute</h4> + +<ul> +<li>Fix image undeprecation in GCE</li> +<li>Added Managed Instance Groups in GCE</li> +<li>Allow undeprecation of an image in GCE</li> +<li>BUGFIX Values with wildcards failed signature validation in cloudstack</li> +<li>Added StorageState-Migrating to the cloudstack driver.</li> +<li>Update copy image logic to match create image in GCE driver.</li> +<li>Removed HD attribute from the Abiquo compute driver to support the 3.4 API</li> +<li>Add image and size details to list_nodes response in Dimension Data driver</li> +<li>Add support for changing VM admin password in VMware driver</li> +<li>Add Barcelona (Spain) region to the Aurora Compute driver.</li> +<li>Various improvements in the libvirt driver.</li> +</ul> + +<h4>Load balancer</h4> + +<ul> +<li>Add support for temporary IAM role credentials (token) to the AWS ELB driver.</li> +</ul> + +<h4>DNS</h4> + +<ul> +<li>Updated the 'extra' parameter in update_record() to be optional in aurora driver</li> +<li>Support for iterating over records and zones in the Aurora DNS driver</li> +<li>Add support for DS, PTR, SSFHFP and TLSA record type to the Aurora DNS driver.</li> +</ul> + +<h4>Container</h4> + +<ul> +<li>Add network mode and labels when creating containers within docker driver</li> +</ul> + +<h4>Storage</h4> + +<ul> +<li>Fix authentication issue in S3/China region, disabled multipart uploads as +not supported by region.</li> +</ul> + +<p>Full change log can be found at <a href="https://libcloud.readthedocs.org/en/latest/changelog.html">here</a>.</p> + +<h3>Special thank you</h3> + +<p>I would like to wish a special thank you to all of our community contributors +for their ongoing support to the project.</p> + +<h3>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.2.1 +</pre> + +<h3>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.2.1 +</pre> + +<h3>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>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>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>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%20announcement.html" rel="tag">release announcement</a></p> + </div> + </div> +</div> + + + + + <div class="post"> + + <h2><a href="/blog/2016/07/07/libcloud-1-1-0-released.html">Libcloud 1.1.0 released</a></h2> + + + + + + <span class="post-date-author">By Tomaz Muraus <span style="display:none">(<a href="https://plus.google.com/+TomazMuraus?rel=author">Google+</a>)</span>on Jul 07, 2016</span> + + <div class="post-content"> + <p>We are pleased to announce the release of Libcloud 1.1.0.</p> + +<p>This is a first release after v1.0.0. It includes various improvements +and bug-fixes.</p> + +<h3>Release highlights</h3> + +<ul> +<li>Support for automatic SNI (SSL extension) using the hostname +supplied to connect to.</li> +<li>Various improvements in the libvirt driver</li> +<li>Various improvements in the DimensionData driver</li> +<li>Various improvements in the Aliyun driver</li> +</ul> + +<p>Full change log can be found at <a href="https://libcloud.readthedocs.io/en/v1.1.0/changelog.html#changes-with-apache-libcloud-1-1-0">here</a>.</p> + +<h3>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.1.0 +</pre> + +<h3>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.1.0 +</pre> + +<h3>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>Documentation</h3> + +<p>Regular and API documentation is available at <a href="https://libcloud.readthedocs.org/en/v1.1.0/">https://libcloud.readthedocs.org/en/v1.1.0/</a></p> + +<h3>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>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.io/en/v1.1.0/changelog.html#changes-with-apache-libcloud-1-1-0">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%20announcement.html" rel="tag">release announcement</a></p> + </div> + </div> +</div> + + + + + <div class="post"> + <h2><a href="/blog/2016/06/22/libcloud-1-0-0-released.html">Libcloud 1.0.0 released</a></h2> @@ -786,273 +1002,6 @@ that there are no regression bugs with t - - <div class="post"> - - <h2><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 - -<ul> -<li>Looks dead - website doesn't work, can't see any references to this online.</li> -<li><code>libcloud.compute.drivers.cloudframes</code></li> -</ul></li> -<li>HP Public Cloud (Helion) - -<ul> -<li><a href="https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2566">Shut down on 31st of January 2016</a></li> -<li><code>libcloud.compute.drivers.hpcloud</code></li> -</ul></li> -<li>IBM SmartCloud Enterprise - -<ul> -<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>libcloud.compute.drivers.ibm_sce</code></li> -</ul></li> -<li>Ninefold - -<ul> -<li><a href="http://www.itnews.com.au/news/ninefold-to-shut-down-411312">Ninefold shut down in January 2016</a></li> -<li><code>libcloud.compute.drivers.ninefold</code></li> -</ul></li> -<li>Opsource - -<ul> -<li>Dimension Data acquired OpSource in 2012, the Opsource driver is succeeded by the Dimension Data driver.</li> -<li><code>libcloud.compute.drivers.opsource</code></li> -</ul></li> -</ul> - -<h3>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>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>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><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>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"> - <img src="/images/posts/2016-02-05-containers/container_cloud_example.png" class="img-responsive inline" /> - <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>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="highlight"><pre><code class="bash language-bash" data-lang="bash"> virtualenv containers - <span class="nb">cd </span>containers - <span class="nb">source </span>bin/activate - pip install apache-libcloud<span class="o">==</span>1.0.0-pre1 -</code></pre></div> - -<p>Now you can start using this package with a test script, let's create one called containers.py</p> - -<div class="highlight"><pre><code class="bash language-bash" data-lang="bash"> touch containers.py -</code></pre></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="highlight"><pre><code class="python language-python" data-lang="python"> <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> - -<p><code>get_driver</code> is a factory method as with all libcloud APIs, you call this method with the <code>Provider</code> that you want to instantiate. Our options are:</p> - -<ul> -<li><code>Provider.DOCKER</code> - Standalone Docker API</li> -<li><code>Provider.KUBERNETES</code> - Kubernetes Cluster endpoint</li> -<li><code>Provider.JOYENT</code> - Joyent Triton Public API</li> -<li><code>Provider.ECS</code> - Amazon EC2 Container Service</li> -</ul> - -<p>Calling <code>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="highlight"><pre><code class="python language-python" data-lang="python"> <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="o">.</span><span class="n">DOCKER</span><span class="p">)</span> -</code></pre></div> - -<p>Now we can call our driver and get an instance of it called <code>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="highlight"><pre><code class="python language-python" data-lang="python"> <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> - -<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="highlight"><pre><code class="python language-python" data-lang="python"> <span class="n">image</span> <span class="o">=</span> <span class="n">driver</span><span class="o">.</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> - -<p>Now that Docker has the version 8.0 image of Apache Tomcat, you can deploy this as a container called <code>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>port_bindings</code></p> - -<div class="highlight"><pre><code class="python language-python" data-lang="python"> <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="o">.</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> - -<p>This will have deployed the container and started it up for you, you can disable the automatic startup by using <code>start=False</code> as a keyword argument. You can now call upon this container and -run methods, <code>restart</code>, <code>start</code>, <code>stop</code> and <code>destroy</code>.</p> - -<p>For example, to blow away that test container: </p> - -<div class="highlight"><pre><code class="python language-python" data-lang="python"> <span class="n">container</span><span class="o">.</span><span class="n">destroy</span><span class="p">()</span> -</code></pre></div> - -<h2>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="highlight"><pre><code class="python language-python" data-lang="python"> <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="o">.</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> - -<p>Now <code>image</code> can be used to deploy to any driver instance that you create. Let's try that against Kubernetes and ECS.</p> - -<h3>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>AmazonEC2ContainerServiceFullAccess</code> role. <code>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="highlight"><pre><code class="python language-python" data-lang="python"> <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="o">.</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> - -<p>ECS and Kubernetes both support some form of grouping or clustering for your containers. This is available as <code>create_cluster</code>, <code>list_cluster</code>.</p> - -<div class="highlight"><pre><code class="python language-python" data-lang="python"> <span class="n">cluster</span> <span class="o">=</span> <span class="n">ecs</span><span class="o">.</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="o">.</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> - -<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>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="highlight"><pre><code class="python language-python" data-lang="python"><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="o">.</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="o">.</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="o">.</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> - -<h2>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="highlight"><pre><code class="python language-python" data-lang="python"><span class="n">containers</span> <span class="o">=</span> <span class="p">[</span><span class="n">conn</span><span class="o">.</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">"</span><span class="si">%s</span><span class="s"> : </span><span class="si">%s</span><span class="s">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">container</span><span class="o">.</span><span class="n">id</span><span class="p">,</span> <span class="n">container</span><span class="o">.</span><span class="n">name</span><span class="p">))</span> - <span class="n">container</span><span class="o">.</span><span class="n">destroy</span><span class="p">()</span> -</code></pre></div> - -<h3>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> <p class="navigation"> @@ -1077,7 +1026,7 @@ swap this out for any of the Amazon publ <div class="col-lg-3 col-lg-offset-1"> <h2>Archive</h1> <ul> - <li> <a href="/blog/archives/2020/04/"> April 2020</a> (2)</li><li> <a href="/blog/archives/2020/03/"> March 2020</a> (1)</li><li> <a href="/blog/archives/2020/01/"> January 2020</a> (2)</li><li> <a href="/blog/archives/2019/12/"> December 2019</a> (1)</li><li> <a href="/blog/archives/2019/11/"> November 2019</a> (1)</li><li> <a href="/blog/archives/2019/08/"> August 2019</a> (2)</li><li> <a href="/blog/archives/2019/05/"> May 2019</a> (1)</li><li> <a href="/blog/archives/2018/11/"> November 2018</a> (1)</li><li> <a href="/blog/archives/2018/06/"> June 2018</a> (1)</li><li> <a href="/blog/archives/2018/03/"> March 2018</a> (1)</li><li> <a href="/blog/archives/2017/12/"> December 2017</a> (1)</li><li> <a href="/blog/archives/2017/09/"> September 2017</a> (2)</li><li> <a href="/blog/archives/2017/07/"> July 2017</a> (1)</li><li> <a href="/blog/archives/2017/04/"> April 2017</a> (3)</li><li> <a hr ef="/blog/archives/2016/12/"> December 2016</a> (1)</li><li> <a href="/blog/archives/2016/11/"> November 2016</a> (1)</li><li> <a href="/blog/archives/2016/10/"> October 2016</a> (1)</li><li> <a href="/blog/archives/2016/09/"> September 2016</a> (1)</li><li> <a href="/blog/archives/2016/07/"> July 2016</a> (1)</li><li> <a href="/blog/archives/2016/06/"> June 2016</a> (1)</li><li> <a href="/blog/archives/2016/04/"> April 2016</a> (2)</li><li> <a href="/blog/archives/2016/02/"> February 2016</a> (2)</li><li> <a href="/blog/archives/2016/01/"> January 2016</a> (4)</li><li> <a href="/blog/archives/2015/12/"> December 2015</a> (1)</li><li> <a href="/blog/archives/2015/11/"> November 2015</a> (1)</li><li> <a href="/blog/archives/2015/10/"> October 2015</a> (2)</li><li> <a href="/blog/archives/2015/08/"> August 2015</a> (1)</li><li> <a href="/blog/archives/2015/03/"> March 2015</a> (1)</li><li> <a href="/bl og/archives/2015/02/"> February 2015</a> (1)</li><li> <a href="/blog/archives/2014/12/"> December 2014</a> (1)</li><li> <a href="/blog/archives/2014/11/"> November 2014</a> (1)</li><li> <a href="/blog/archives/2014/07/"> July 2014</a> (2)</li><li> <a href="/blog/archives/2014/06/"> June 2014</a> (1)</li><li> <a href="/blog/archives/2014/05/"> May 2014</a> (1)</li><li> <a href="/blog/archives/2014/04/"> April 2014</a> (1)</li><li> <a href="/blog/archives/2014/02/"> February 2014</a> (8)</li><li> <a href="/blog/archives/2014/01/"> January 2014</a> (4)</li><li> <a href="/blog/archives/2013/12/"> December 2013</a> (3)</li><li> <a href="/blog/archives/2013/11/"> November 2013</a> (2)</li><li> <a href="/blog/archives/2013/09/"> September 2013</a> (1)</li><li> <a href="/blog/archives/2013/08/"> August 2013</a> (1)</li><li> <a href="/blog/archives/2013/07/"> July 2013</a> (1)</li><li> <a href="/blog/archives /2013/03/"> March 2013</a> (1)</li><li> <a href="/blog/archives/2013/02/"> February 2013</a> (1)</li><li> <a href="/blog/archives/2012/12/"> December 2012</a> (2)</li><li> <a href="/blog/archives/2012/11/"> November 2012</a> (2)</li><li> <a href="/blog/archives/2012/09/"> September 2012</a> (1)</li><li> <a href="/blog/archives/2012/08/"> August 2012</a> (1)</li><li> <a href="/blog/archives/2012/07/"> July 2012</a> (1)</li><li> <a href="/blog/archives/2012/05/"> May 2012</a> (2)</li><li> <a href="/blog/archives/2012/04/"> April 2012</a> (1)</li><li> <a href="/blog/archives/2012/02/"> February 2012</a> (1)</li><li> <a href="/blog/archives/2011/12/"> December 2011</a> (2)</li><li> <a href="/blog/archives/2011/11/"> November 2011</a> (3)</li><li> <a href="/blog/archives/2011/10/"> October 2011</a> (1)</li><li> <a href="/blog/archives/2011/09/"> September 2011</a> (1)</li><li> <a href="/blog/archives/2011 /07/"> July 2011</a> (1)</li><li> <a href="/blog/archives/2011/06/"> June 2011</a> (1)</li><li> <a href="/blog/archives/2011/05/"> May 2011</a> (1)</li><li> <a href="/blog/archives/2011/02/"> February 2011</a> (1)</li><li> <a href="/blog/archives/2011/01/"> January 2011</a> (1)</li><li> <a href="/blog/archives/2010/10/"> October 2010</a> (1)</li><li> <a href="/blog/archives/2010/05/"> May 2010</a> (1)</li><li> <a href="/blog/archives/2010/02/"> February 2010</a> (1)</li> + <li> <a href="/blog/archives/2020/06/"> June 2020</a> (2)</li><li> <a href="/blog/archives/2020/04/"> April 2020</a> (2)</li><li> <a href="/blog/archives/2020/03/"> March 2020</a> (1)</li><li> <a href="/blog/archives/2020/01/"> January 2020</a> (2)</li><li> <a href="/blog/archives/2019/12/"> December 2019</a> (1)</li><li> <a href="/blog/archives/2019/11/"> November 2019</a> (1)</li><li> <a href="/blog/archives/2019/08/"> August 2019</a> (2)</li><li> <a href="/blog/archives/2019/05/"> May 2019</a> (1)</li><li> <a href="/blog/archives/2018/11/"> November 2018</a> (1)</li><li> <a href="/blog/archives/2018/06/"> June 2018</a> (1)</li><li> <a href="/blog/archives/2018/03/"> March 2018</a> (1)</li><li> <a href="/blog/archives/2017/12/"> December 2017</a> (1)</li><li> <a href="/blog/archives/2017/09/"> September 2017</a> (2)</li><li> <a href="/blog/archives/2017/07/"> July 2017</a> (1)</li><li> <a hre f="/blog/archives/2017/04/"> April 2017</a> (3)</li><li> <a href="/blog/archives/2016/12/"> December 2016</a> (1)</li><li> <a href="/blog/archives/2016/11/"> November 2016</a> (1)</li><li> <a href="/blog/archives/2016/10/"> October 2016</a> (1)</li><li> <a href="/blog/archives/2016/09/"> September 2016</a> (1)</li><li> <a href="/blog/archives/2016/07/"> July 2016</a> (1)</li><li> <a href="/blog/archives/2016/06/"> June 2016</a> (1)</li><li> <a href="/blog/archives/2016/04/"> April 2016</a> (2)</li><li> <a href="/blog/archives/2016/02/"> February 2016</a> (2)</li><li> <a href="/blog/archives/2016/01/"> January 2016</a> (4)</li><li> <a href="/blog/archives/2015/12/"> December 2015</a> (1)</li><li> <a href="/blog/archives/2015/11/"> November 2015</a> (1)</li><li> <a href="/blog/archives/2015/10/"> October 2015</a> (2)</li><li> <a href="/blog/archives/2015/08/"> August 2015</a> (1)</li><li> <a href="/blo g/archives/2015/03/"> March 2015</a> (1)</li><li> <a href="/blog/archives/2015/02/"> February 2015</a> (1)</li><li> <a href="/blog/archives/2014/12/"> December 2014</a> (1)</li><li> <a href="/blog/archives/2014/11/"> November 2014</a> (1)</li><li> <a href="/blog/archives/2014/07/"> July 2014</a> (2)</li><li> <a href="/blog/archives/2014/06/"> June 2014</a> (1)</li><li> <a href="/blog/archives/2014/05/"> May 2014</a> (1)</li><li> <a href="/blog/archives/2014/04/"> April 2014</a> (1)</li><li> <a href="/blog/archives/2014/02/"> February 2014</a> (8)</li><li> <a href="/blog/archives/2014/01/"> January 2014</a> (4)</li><li> <a href="/blog/archives/2013/12/"> December 2013</a> (3)</li><li> <a href="/blog/archives/2013/11/"> November 2013</a> (2)</li><li> <a href="/blog/archives/2013/09/"> September 2013</a> (1)</li><li> <a href="/blog/archives/2013/08/"> August 2013</a> (1)</li><li> <a href="/blog/archives /2013/07/"> July 2013</a> (1)</li><li> <a href="/blog/archives/2013/03/"> March 2013</a> (1)</li><li> <a href="/blog/archives/2013/02/"> February 2013</a> (1)</li><li> <a href="/blog/archives/2012/12/"> December 2012</a> (2)</li><li> <a href="/blog/archives/2012/11/"> November 2012</a> (2)</li><li> <a href="/blog/archives/2012/09/"> September 2012</a> (1)</li><li> <a href="/blog/archives/2012/08/"> August 2012</a> (1)</li><li> <a href="/blog/archives/2012/07/"> July 2012</a> (1)</li><li> <a href="/blog/archives/2012/05/"> May 2012</a> (2)</li><li> <a href="/blog/archives/2012/04/"> April 2012</a> (1)</li><li> <a href="/blog/archives/2012/02/"> February 2012</a> (1)</li><li> <a href="/blog/archives/2011/12/"> December 2011</a> (2)</li><li> <a href="/blog/archives/2011/11/"> November 2011</a> (3)</li><li> <a href="/blog/archives/2011/10/"> October 2011</a> (1)</li><li> <a href="/blog/archives/2011/09/" > September 2011</a> (1)</li><li> <a href="/blog/archives/2011/07/"> > July 2011</a> (1)</li><li> <a href="/blog/archives/2011/06/"> June > 2011</a> (1)</li><li> <a href="/blog/archives/2011/05/"> May 2011</a> > (1)</li><li> <a href="/blog/archives/2011/02/"> February 2011</a> > (1)</li><li> <a href="/blog/archives/2011/01/"> January 2011</a> > (1)</li><li> <a href="/blog/archives/2010/10/"> October 2010</a> > (1)</li><li> <a href="/blog/archives/2010/05/"> May 2010</a> > (1)</li><li> <a href="/blog/archives/2010/02/"> February 2010</a> > (1)</li> </ul> </div> </div>
Modified: libcloud/site/trunk/generated/blog/page/7/index.html URL: http://svn.apache.org/viewvc/libcloud/site/trunk/generated/blog/page/7/index.html?rev=1878843&r1=1878842&r2=1878843&view=diff ============================================================================== --- libcloud/site/trunk/generated/blog/page/7/index.html (original) +++ libcloud/site/trunk/generated/blog/page/7/index.html Sun Jun 14 18:32:35 2020 @@ -97,6 +97,273 @@ <div class="post"> + <h2><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 + +<ul> +<li>Looks dead - website doesn't work, can't see any references to this online.</li> +<li><code>libcloud.compute.drivers.cloudframes</code></li> +</ul></li> +<li>HP Public Cloud (Helion) + +<ul> +<li><a href="https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2566">Shut down on 31st of January 2016</a></li> +<li><code>libcloud.compute.drivers.hpcloud</code></li> +</ul></li> +<li>IBM SmartCloud Enterprise + +<ul> +<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>libcloud.compute.drivers.ibm_sce</code></li> +</ul></li> +<li>Ninefold + +<ul> +<li><a href="http://www.itnews.com.au/news/ninefold-to-shut-down-411312">Ninefold shut down in January 2016</a></li> +<li><code>libcloud.compute.drivers.ninefold</code></li> +</ul></li> +<li>Opsource + +<ul> +<li>Dimension Data acquired OpSource in 2012, the Opsource driver is succeeded by the Dimension Data driver.</li> +<li><code>libcloud.compute.drivers.opsource</code></li> +</ul></li> +</ul> + +<h3>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>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>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><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>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"> + <img src="/images/posts/2016-02-05-containers/container_cloud_example.png" class="img-responsive inline" /> + <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>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="highlight"><pre><code class="bash language-bash" data-lang="bash"> virtualenv containers + <span class="nb">cd </span>containers + <span class="nb">source </span>bin/activate + pip install apache-libcloud<span class="o">==</span>1.0.0-pre1 +</code></pre></div> + +<p>Now you can start using this package with a test script, let's create one called containers.py</p> + +<div class="highlight"><pre><code class="bash language-bash" data-lang="bash"> touch containers.py +</code></pre></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="highlight"><pre><code class="python language-python" data-lang="python"> <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> + +<p><code>get_driver</code> is a factory method as with all libcloud APIs, you call this method with the <code>Provider</code> that you want to instantiate. Our options are:</p> + +<ul> +<li><code>Provider.DOCKER</code> - Standalone Docker API</li> +<li><code>Provider.KUBERNETES</code> - Kubernetes Cluster endpoint</li> +<li><code>Provider.JOYENT</code> - Joyent Triton Public API</li> +<li><code>Provider.ECS</code> - Amazon EC2 Container Service</li> +</ul> + +<p>Calling <code>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="highlight"><pre><code class="python language-python" data-lang="python"> <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="o">.</span><span class="n">DOCKER</span><span class="p">)</span> +</code></pre></div> + +<p>Now we can call our driver and get an instance of it called <code>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="highlight"><pre><code class="python language-python" data-lang="python"> <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> + +<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="highlight"><pre><code class="python language-python" data-lang="python"> <span class="n">image</span> <span class="o">=</span> <span class="n">driver</span><span class="o">.</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> + +<p>Now that Docker has the version 8.0 image of Apache Tomcat, you can deploy this as a container called <code>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>port_bindings</code></p> + +<div class="highlight"><pre><code class="python language-python" data-lang="python"> <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="o">.</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> + +<p>This will have deployed the container and started it up for you, you can disable the automatic startup by using <code>start=False</code> as a keyword argument. You can now call upon this container and +run methods, <code>restart</code>, <code>start</code>, <code>stop</code> and <code>destroy</code>.</p> + +<p>For example, to blow away that test container: </p> + +<div class="highlight"><pre><code class="python language-python" data-lang="python"> <span class="n">container</span><span class="o">.</span><span class="n">destroy</span><span class="p">()</span> +</code></pre></div> + +<h2>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="highlight"><pre><code class="python language-python" data-lang="python"> <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="o">.</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> + +<p>Now <code>image</code> can be used to deploy to any driver instance that you create. Let's try that against Kubernetes and ECS.</p> + +<h3>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>AmazonEC2ContainerServiceFullAccess</code> role. <code>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="highlight"><pre><code class="python language-python" data-lang="python"> <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="o">.</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> + +<p>ECS and Kubernetes both support some form of grouping or clustering for your containers. This is available as <code>create_cluster</code>, <code>list_cluster</code>.</p> + +<div class="highlight"><pre><code class="python language-python" data-lang="python"> <span class="n">cluster</span> <span class="o">=</span> <span class="n">ecs</span><span class="o">.</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="o">.</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> + +<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>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="highlight"><pre><code class="python language-python" data-lang="python"><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="o">.</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="o">.</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="o">.</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> + +<h2>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="highlight"><pre><code class="python language-python" data-lang="python"><span class="n">containers</span> <span class="o">=</span> <span class="p">[</span><span class="n">conn</span><span class="o">.</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">"</span><span class="si">%s</span><span class="s"> : </span><span class="si">%s</span><span class="s">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">container</span><span class="o">.</span><span class="n">id</span><span class="p">,</span> <span class="n">container</span><span class="o">.</span><span class="n">name</span><span class="p">))</span> + <span class="n">container</span><span class="o">.</span><span class="n">destroy</span><span class="p">()</span> +</code></pre></div> + +<h3>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><a href="/blog/2016/01/26/libcloud-1-0-0-pre1-released.html">Libcloud 1.0.0-pre1 released</a></h2> @@ -462,177 +729,6 @@ list of people who contributed to this r - - <div class="post"> - - <h2><a href="/blog/2016/01/14/notice-for-linode-users.html">Notice for Linode users</a></h2> - - - - - - <span class="post-date-author">By Tomaz Muraus <span style="display:none">(<a href="https://plus.google.com/+TomazMuraus?rel=author">Google+</a>)</span>on Jan 14, 2016</span> - - <div class="post-content"> - <p>This is an announcement for users of the Linode driver for Libcloud who might -have started experiencing issues recently.</p> - -<h2>Background</h2> - -<p>A couple of Libcloud users have reported that they have recently started -experiencing issues when talking to the Linode API using Libcloud. They have -received messages similar to the one shown below.</p> - -<pre> -socket.error: [Errno 104] Connection reset by peer -</pre> - -<p>It turns out that the issue is related to the used SSL / TLS version. For -compatibility and security reasons (Libcloud also supports older Python -versions), Libcloud uses TLS v1.0 by default.</p> - -<p>Linode recently dropped support for TLS v1.0 and it now only support TLS >= -v1.1. This means Libcloud won't work out of the box anymore.</p> - -<h2>Solution</h2> - -<p>If you are experiencing this issue, you should update your code to use TLS v1.2 -or TLS v1.1 as shown below.</p> - -<div class="highlight"><pre><code class="text language-text" data-lang="text">import ssl - -import libcloud.security -libcloud.security.SSL_VERSION = ssl.PROTOCOL_TLSv1_1 -# or even better if your system and Python version supports TLS v1.2 -libcloud.security.SSL_VERSION = ssl.PROTOCOL_TLSv1_2 - -# Instantiate and work with the Linode driver here... -</code></pre></div> - -<p>Keep in mind that for this to work you need to have a recent version of OpenSSL -installed on your system and you need to use Python >= 3.4 or Python 2.7.9.</p> - -<p>For more details please see recently updated <a href="https://libcloud.readthedocs.org/en/latest/other/ssl-certificate-validation.html#changing-used-ssl-tls-version">documentation</a>. If you are -still experiencing issues or have any questions, please feel free to reach -us via the mailing list or IRC.</p> - -<p>Note: Even if you are not experiencing any issues, it's generally a good idea -to use the highest version of TLS supported by your system and the provider you -use.</p> - -<h2>Quick note on ssl.PROTOCOL_SSLv23</h2> - -<p>Python uses <code>ssl.PROTOCOL_SSLv23</code> constant by default. When this constant is -used, it will let client known to pick the highest protocol version which both -the client and server support (it will be selecting between SSL v3.0, TLS v1.0, -TLS v1.1 and TLS v1.2).</p> - -<p>We use <code>ssl.PROTOCOL_TLSv1</code> instead of <code>ssl.PROTOCOL_SSLv23</code> for security -and compatibility reasons. SSL v3.0 is considered broken and unsafe and using -<code>ssl.PROTOCOL_SSLv23</code> can result in an increased risk for a downgrade attack.</p> - -<h3>Thanks</h3> - -<p>Special thanks to Jacob Riley, Steve V, Heath Naylor and everyone from -<a href="https://issues.apache.org/jira/browse/LIBCLOUD-791">LIBCLOUD-791</a> who helped debug and track down the root cause of this issue.</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/linode.html" rel="tag">linode</a>, <a href="/blog/tags/announcement.html" rel="tag">announcement</a></p> - </div> - </div> -</div> - - - - - <div class="post"> - - <h2><a href="/blog/2015/12/15/libcloud-0-20-0-released.html">Libcloud 0.20.0 released</a></h2> - - - - - - <span class="post-date-author">By Anthony Shaw on Dec 15, 2015</span> - - <div class="post-content"> - <p>We are pleased to announce the release of Libcloud 0.20.0.</p> - -<p>This is a first release in the 0.20 series which means it brings many new -features, improvements, bug-fixes, and DNS drivers.</p> - -<h3>Release highlights</h3> - -<ul> -<li>New DNS driver for <a href="http://libcloud.readthedocs.org/en/latest/dns/drivers/godaddy.html">GoDaddy</a></li> -<li>New DNS driver for <a href="https://www.cloudflare.com/dns/">CloudFlare DNS</a></li> -<li>Many more improvements and API v2.1 support for the <a href="http://cloud.dimensiondata.com/am/en/">Dimension Data compute driver</a></li> -<li>Support for adding and configuring PTR (reverse DNS) record in RackSpace DNS driver</li> -<li>Support for preemptable instances in Google Compute driver</li> -<li>Add new eu-west-2 & us-east-2 regions to the OUTSCALE<em>INC & OUTSCALE</em>SAS drivers</li> -<li>Added C4, M4 instance types in Amazon EC2 driver</li> -<li>Add support for multiple regions in Aurora compute driver</li> -<li>GoogleStorageDriver can now use either our S3 authentication or other Google Cloud Platform OAuth2 authentication methods.</li> -<li>Removed DreamHosts Compute Driver, DreamHosts users will now use the OpenStack Node driver since DreamHosts are OpenStack API compliant</li> -<li>and much more!</li> -</ul> - -<p>Full change log can be found at <a href="https://libcloud.readthedocs.org/en/latest/changelog.html#changes-with-apache-libcloud-0-20-0">here</a>.</p> - -<h3>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.0 -</pre> - -<h3>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.0 -</pre> - -<h3>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>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>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>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-with-apache-libcloud-0-20-0">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%20announcement.html" rel="tag">release announcement</a></p> - </div> - </div> -</div> - - - </div> <p class="navigation"> @@ -657,7 +753,7 @@ list of people who contributed to this r <div class="col-lg-3 col-lg-offset-1"> <h2>Archive</h1> <ul> - <li> <a href="/blog/archives/2020/04/"> April 2020</a> (2)</li><li> <a href="/blog/archives/2020/03/"> March 2020</a> (1)</li><li> <a href="/blog/archives/2020/01/"> January 2020</a> (2)</li><li> <a href="/blog/archives/2019/12/"> December 2019</a> (1)</li><li> <a href="/blog/archives/2019/11/"> November 2019</a> (1)</li><li> <a href="/blog/archives/2019/08/"> August 2019</a> (2)</li><li> <a href="/blog/archives/2019/05/"> May 2019</a> (1)</li><li> <a href="/blog/archives/2018/11/"> November 2018</a> (1)</li><li> <a href="/blog/archives/2018/06/"> June 2018</a> (1)</li><li> <a href="/blog/archives/2018/03/"> March 2018</a> (1)</li><li> <a href="/blog/archives/2017/12/"> December 2017</a> (1)</li><li> <a href="/blog/archives/2017/09/"> September 2017</a> (2)</li><li> <a href="/blog/archives/2017/07/"> July 2017</a> (1)</li><li> <a href="/blog/archives/2017/04/"> April 2017</a> (3)</li><li> <a hr ef="/blog/archives/2016/12/"> December 2016</a> (1)</li><li> <a href="/blog/archives/2016/11/"> November 2016</a> (1)</li><li> <a href="/blog/archives/2016/10/"> October 2016</a> (1)</li><li> <a href="/blog/archives/2016/09/"> September 2016</a> (1)</li><li> <a href="/blog/archives/2016/07/"> July 2016</a> (1)</li><li> <a href="/blog/archives/2016/06/"> June 2016</a> (1)</li><li> <a href="/blog/archives/2016/04/"> April 2016</a> (2)</li><li> <a href="/blog/archives/2016/02/"> February 2016</a> (2)</li><li> <a href="/blog/archives/2016/01/"> January 2016</a> (4)</li><li> <a href="/blog/archives/2015/12/"> December 2015</a> (1)</li><li> <a href="/blog/archives/2015/11/"> November 2015</a> (1)</li><li> <a href="/blog/archives/2015/10/"> October 2015</a> (2)</li><li> <a href="/blog/archives/2015/08/"> August 2015</a> (1)</li><li> <a href="/blog/archives/2015/03/"> March 2015</a> (1)</li><li> <a href="/bl og/archives/2015/02/"> February 2015</a> (1)</li><li> <a href="/blog/archives/2014/12/"> December 2014</a> (1)</li><li> <a href="/blog/archives/2014/11/"> November 2014</a> (1)</li><li> <a href="/blog/archives/2014/07/"> July 2014</a> (2)</li><li> <a href="/blog/archives/2014/06/"> June 2014</a> (1)</li><li> <a href="/blog/archives/2014/05/"> May 2014</a> (1)</li><li> <a href="/blog/archives/2014/04/"> April 2014</a> (1)</li><li> <a href="/blog/archives/2014/02/"> February 2014</a> (8)</li><li> <a href="/blog/archives/2014/01/"> January 2014</a> (4)</li><li> <a href="/blog/archives/2013/12/"> December 2013</a> (3)</li><li> <a href="/blog/archives/2013/11/"> November 2013</a> (2)</li><li> <a href="/blog/archives/2013/09/"> September 2013</a> (1)</li><li> <a href="/blog/archives/2013/08/"> August 2013</a> (1)</li><li> <a href="/blog/archives/2013/07/"> July 2013</a> (1)</li><li> <a href="/blog/archives /2013/03/"> March 2013</a> (1)</li><li> <a href="/blog/archives/2013/02/"> February 2013</a> (1)</li><li> <a href="/blog/archives/2012/12/"> December 2012</a> (2)</li><li> <a href="/blog/archives/2012/11/"> November 2012</a> (2)</li><li> <a href="/blog/archives/2012/09/"> September 2012</a> (1)</li><li> <a href="/blog/archives/2012/08/"> August 2012</a> (1)</li><li> <a href="/blog/archives/2012/07/"> July 2012</a> (1)</li><li> <a href="/blog/archives/2012/05/"> May 2012</a> (2)</li><li> <a href="/blog/archives/2012/04/"> April 2012</a> (1)</li><li> <a href="/blog/archives/2012/02/"> February 2012</a> (1)</li><li> <a href="/blog/archives/2011/12/"> December 2011</a> (2)</li><li> <a href="/blog/archives/2011/11/"> November 2011</a> (3)</li><li> <a href="/blog/archives/2011/10/"> October 2011</a> (1)</li><li> <a href="/blog/archives/2011/09/"> September 2011</a> (1)</li><li> <a href="/blog/archives/2011 /07/"> July 2011</a> (1)</li><li> <a href="/blog/archives/2011/06/"> June 2011</a> (1)</li><li> <a href="/blog/archives/2011/05/"> May 2011</a> (1)</li><li> <a href="/blog/archives/2011/02/"> February 2011</a> (1)</li><li> <a href="/blog/archives/2011/01/"> January 2011</a> (1)</li><li> <a href="/blog/archives/2010/10/"> October 2010</a> (1)</li><li> <a href="/blog/archives/2010/05/"> May 2010</a> (1)</li><li> <a href="/blog/archives/2010/02/"> February 2010</a> (1)</li> + <li> <a href="/blog/archives/2020/06/"> June 2020</a> (2)</li><li> <a href="/blog/archives/2020/04/"> April 2020</a> (2)</li><li> <a href="/blog/archives/2020/03/"> March 2020</a> (1)</li><li> <a href="/blog/archives/2020/01/"> January 2020</a> (2)</li><li> <a href="/blog/archives/2019/12/"> December 2019</a> (1)</li><li> <a href="/blog/archives/2019/11/"> November 2019</a> (1)</li><li> <a href="/blog/archives/2019/08/"> August 2019</a> (2)</li><li> <a href="/blog/archives/2019/05/"> May 2019</a> (1)</li><li> <a href="/blog/archives/2018/11/"> November 2018</a> (1)</li><li> <a href="/blog/archives/2018/06/"> June 2018</a> (1)</li><li> <a href="/blog/archives/2018/03/"> March 2018</a> (1)</li><li> <a href="/blog/archives/2017/12/"> December 2017</a> (1)</li><li> <a href="/blog/archives/2017/09/"> September 2017</a> (2)</li><li> <a href="/blog/archives/2017/07/"> July 2017</a> (1)</li><li> <a hre f="/blog/archives/2017/04/"> April 2017</a> (3)</li><li> <a href="/blog/archives/2016/12/"> December 2016</a> (1)</li><li> <a href="/blog/archives/2016/11/"> November 2016</a> (1)</li><li> <a href="/blog/archives/2016/10/"> October 2016</a> (1)</li><li> <a href="/blog/archives/2016/09/"> September 2016</a> (1)</li><li> <a href="/blog/archives/2016/07/"> July 2016</a> (1)</li><li> <a href="/blog/archives/2016/06/"> June 2016</a> (1)</li><li> <a href="/blog/archives/2016/04/"> April 2016</a> (2)</li><li> <a href="/blog/archives/2016/02/"> February 2016</a> (2)</li><li> <a href="/blog/archives/2016/01/"> January 2016</a> (4)</li><li> <a href="/blog/archives/2015/12/"> December 2015</a> (1)</li><li> <a href="/blog/archives/2015/11/"> November 2015</a> (1)</li><li> <a href="/blog/archives/2015/10/"> October 2015</a> (2)</li><li> <a href="/blog/archives/2015/08/"> August 2015</a> (1)</li><li> <a href="/blo g/archives/2015/03/"> March 2015</a> (1)</li><li> <a href="/blog/archives/2015/02/"> February 2015</a> (1)</li><li> <a href="/blog/archives/2014/12/"> December 2014</a> (1)</li><li> <a href="/blog/archives/2014/11/"> November 2014</a> (1)</li><li> <a href="/blog/archives/2014/07/"> July 2014</a> (2)</li><li> <a href="/blog/archives/2014/06/"> June 2014</a> (1)</li><li> <a href="/blog/archives/2014/05/"> May 2014</a> (1)</li><li> <a href="/blog/archives/2014/04/"> April 2014</a> (1)</li><li> <a href="/blog/archives/2014/02/"> February 2014</a> (8)</li><li> <a href="/blog/archives/2014/01/"> January 2014</a> (4)</li><li> <a href="/blog/archives/2013/12/"> December 2013</a> (3)</li><li> <a href="/blog/archives/2013/11/"> November 2013</a> (2)</li><li> <a href="/blog/archives/2013/09/"> September 2013</a> (1)</li><li> <a href="/blog/archives/2013/08/"> August 2013</a> (1)</li><li> <a href="/blog/archives /2013/07/"> July 2013</a> (1)</li><li> <a href="/blog/archives/2013/03/"> March 2013</a> (1)</li><li> <a href="/blog/archives/2013/02/"> February 2013</a> (1)</li><li> <a href="/blog/archives/2012/12/"> December 2012</a> (2)</li><li> <a href="/blog/archives/2012/11/"> November 2012</a> (2)</li><li> <a href="/blog/archives/2012/09/"> September 2012</a> (1)</li><li> <a href="/blog/archives/2012/08/"> August 2012</a> (1)</li><li> <a href="/blog/archives/2012/07/"> July 2012</a> (1)</li><li> <a href="/blog/archives/2012/05/"> May 2012</a> (2)</li><li> <a href="/blog/archives/2012/04/"> April 2012</a> (1)</li><li> <a href="/blog/archives/2012/02/"> February 2012</a> (1)</li><li> <a href="/blog/archives/2011/12/"> December 2011</a> (2)</li><li> <a href="/blog/archives/2011/11/"> November 2011</a> (3)</li><li> <a href="/blog/archives/2011/10/"> October 2011</a> (1)</li><li> <a href="/blog/archives/2011/09/" > September 2011</a> (1)</li><li> <a href="/blog/archives/2011/07/"> > July 2011</a> (1)</li><li> <a href="/blog/archives/2011/06/"> June > 2011</a> (1)</li><li> <a href="/blog/archives/2011/05/"> May 2011</a> > (1)</li><li> <a href="/blog/archives/2011/02/"> February 2011</a> > (1)</li><li> <a href="/blog/archives/2011/01/"> January 2011</a> > (1)</li><li> <a href="/blog/archives/2010/10/"> October 2010</a> > (1)</li><li> <a href="/blog/archives/2010/05/"> May 2010</a> > (1)</li><li> <a href="/blog/archives/2010/02/"> February 2010</a> > (1)</li> </ul> </div> </div>
