9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] Avoiding Vendor Lock-In Avoiding Vendor Lock-In Using Apache Libcloud Using Apache Libcloud Tomaz Muraus Tomaz Muraus tomaz@apache.org tomaz@apache.org Cloud Open 2012, San Diego, CA Cloud Open 2012, San Diego, CA Agenda Agenda · Who am I? · Who am I? www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 1/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] · What is Libcloud? · What is Libcloud? · Why? · Why? · History · History · · Project info Project info · Libcloud APIs · Libcloud APIs · · What is currently going on & plans for the future What is currently going on & plans for the future · Questions · Questions Who am I? Who am I? · · Tomaz Muraus, Tomaz Muraus, @KamiSLO @KamiSLO, , +Tomaz Muraus +Tomaz Muraus · Github: github.com/Kami github.com/Kami · Github: · · · · Libcloud Project chair & committer Libcloud Project chair & committer · Engineer at Rackspace · Engineer at Rackspace www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 2/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] · · Dude who likes open standards and open source Dude who likes open standards and open source What is Libcloud? What is Libcloud? “Libcloud is a Python library which abstracts differences “Libcloud is a Python library which abstracts differences between cloud provider APIs and allows users to manage between cloud provider APIs and allows users to manage their cloud resources (servers, storage, load balancers, DNS) their cloud resources (servers, storage, load balancers, DNS) using a unified and easy to use interface.” using a unified and easy to use interface.” www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 3/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] What is Libcloud? What is Libcloud? Turns this: Turns this: 1 1 libcloud.compute.types Provider from from libcloud.compute.types import import Provider ? ? 2 2 libcloud.compute.providers get_driver from from libcloud.compute.providers import import get_driver 3 3 4 4 get_driver(Provider.RACKSPACE) Cls Cls = = get_driver(Provider.RACKSPACE) 5 5 driver = = Cls( Cls('username' 'username', , 'api key' 'api key') ) driver 6 6 7 7 size = = driver.list_sizes()[ driver.list_sizes()[0 0] ] size 8 8 images = = driver.list_images()[ driver.list_images()[0 0] ] images 9 9 10 10 node = = driver.create_node(name driver.create_node(name = = 'icanhasaserver' 'icanhasaserver', size , size = = size, size, node 11 11 image = = image) image) image www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 4/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] What is Libcloud? What is Libcloud? Into this: Into this: www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 5/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] Why? Why? · Cloud interoperability and standards are (mostly) a lie · Cloud interoperability and standards are (mostly) a lie · Need for standardization · Need for standardization · · Different APIs Different APIs · Different response formats (XML, JSON, text) · Different response formats (XML, JSON, text) · · Different authentication methods Different authentication methods · Different request signing mechanisms · Different request signing mechanisms Why - different response formats (XML) Why - different response formats (XML) <DescribeInstancesResponse <DescribeInstancesResponse www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 6/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] xmlns="http://ec2.amazonaws.com/doc/2010-08-31/"> xmlns="http://ec2.amazonaws.com/doc/2010-08-31/"> <requestId>56d0fffa-8819-4658-bdd7-548f143a86d2</requestId> <requestId>56d0fffa-8819-4658-bdd7-548f143a86d2</requestId> <reservationSet> <reservationSet> <item> <item> <reservationId>r-07adf66e</reservationId> <reservationId>r-07adf66e</reservationId> <instancesSet> <instancesSet> <item> <item> <instanceId>i-4382922a</instanceId> <instanceId>i-4382922a</instanceId> <imageId>ami-0d57b264</imageId> <imageId>ami-0d57b264</imageId> <instanceState> <instanceState> <code>0</code> <code>0</code> <name>pending</name> <name>pending</name> </instanceState> </instanceState> <privateDnsName/> <privateDnsName/> Why - different response formats (text) Why - different response formats (text) de:0:0:write:requests 466 de:0:0:write:requests 466 rx 760681 rx 760681 vnc:password testpass vnc:password testpass ide:0:0 f0202f1c-0b4f-4cfc-8ae3-e30951d09ef0 ide:0:0 f0202f1c-0b4f-4cfc-8ae3-e30951d09ef0 ide:0:0:read:requests 7467 ide:0:0:read:requests 7467 ide:0:0:read:bytes 165395968 ide:0:0:read:bytes 165395968 vnc:ip 178.22.66.28 vnc:ip 178.22.66.28 boot ide:0:0 boot ide:0:0 www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 7/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] smp 1 smp 1 started 1286568422 started 1286568422 nic:0:model virtio nic:0:model virtio status active status active user 93b34fd9-7986-4b25-8bfd-98a50383605d user 93b34fd9-7986-4b25-8bfd-98a50383605d ide:0:0:media disk ide:0:0:media disk name cloudsigma node name cloudsigma node Why - different response formats (JSON) Why - different response formats (JSON) [ [ { { "ips": [ "ips": [ { { "address": "67.214.214.212" "address": "67.214.214.212" } } ], ], "memory": 1073741824, "memory": 1073741824, "id": "99df878c-6e5c-4945-a635-d94da9fd3146", "id": "99df878c-6e5c-4945-a635-d94da9fd3146", "storage": 21474836480, "storage": 21474836480, "hostname": "foo.apitest.blueboxgrid.com", "hostname": "foo.apitest.blueboxgrid.com", "description": "1 GB RAM + 20 GB Disk", "description": "1 GB RAM + 20 GB Disk", "cpu": 0.5, "cpu": 0.5, "status": "running" "status": "running" www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 8/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] } } ] ] Why - different authentication methods Why - different authentication methods · Shared token / secret · Shared token / secret · · HMAC based HMAC based · HTTP basic / digest auth · HTTP basic / digest auth · · X509 certificate-based X509 certificate-based www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 9/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] Apache Libcloud Apache Libcloud · Python library (pip install apache-libcloud) · Python library (pip install apache-libcloud) · · Originally developed at Cloudkick in 2009 Originally developed at Cloudkick in 2009 · Later this year project joined Apache Incubator · Later this year project joined Apache Incubator · Graduated to Apache TLP in May 2011 · Graduated to Apache TLP in May 2011 · Current stable release is 0.11.1 0.11.1 · Current stable release is · Similar libraries in other languages: · Similar libraries in other languages: · · Fog (Ruby) Fog (Ruby) · jclouds (Java) (Java) · jclouds · deltacloud · deltacloud www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 10/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] Apache Libcloud Apache Libcloud · 8 committers · 8 committers · · A decent amount of contributions from the community A decent amount of contributions from the community · Mailing list: {users,dev}@libcloud.apache.org · Mailing list: {users,dev}@libcloud.apache.org · IRC channel: #libcloud on irc.freenode.net · IRC channel: #libcloud on irc.freenode.net Apache Libcloud - who is using it Apache Libcloud - who is using it · Rackspace · Rackspace www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 11/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] · · Server Density Server Density · CollabNet · CollabNet · · Salt Stack Salt Stack Libcloud APIs Libcloud APIs · Compute · Compute · · Storage Storage · DNS · DNS · Load balancers · Load balancers www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 12/26
9/7/12 Avoiding Vendor Lock-in Using Apache Libcloud [www.tomaz.me] Libcloud APIs - Supported providers Libcloud APIs - Supported providers www.tomaz.me/slides/avoiding_vendor_lock_in_using_apache_libcloud/#1 13/26
Recommend
More recommend