SlideShare ist ein Scribd-Unternehmen logo
1 von 32
OpenStack APIs: Present and
          Future
          OSCON Beta Talk

           H. Wade Minter
    Chief Architect, TeamSnap Inc.
               @minter
What Is OpenStack?

OpenStack is a global collaboration of developers and cloud
computing technologists producing the ubiquitous open source
cloud computing platform for public and private clouds. The
project aims to deliver solutions for all types of clouds by being
simple to implement, massively scalable, and feature rich. The
technology consists of a series of interrelated
projects delivering various components for a cloud
infrastructure solution.
Community Members And Sponsors

•   Rackspace Hosting (Storage)
•   NASA (Compute)
•   Citrix
•   Dell
•   Peer1
•   Over 70 others
Why Does OpenStack Matter?

"All of the code for OpenStack is freely available under the
Apache 2.0 license. Anyone can run it, build on it, or submit
changes back to the project. We strongly believe that an open
development model is the only way to foster badly-needed
cloud standards, remove the fear of proprietary lock-in for cloud
customers, and create a large ecosystem that spans cloud
providers."

Run your own API-driven internal cloud and get access to
a wealth of community resources already built on top of it.
OpenStack Technologies
The OpenStack Universe

•   Storage (Swift)
•   Compute (Nebula)
•   Image Service (Glance)
•   Authentication (Keystone)
OpenStack Storage

      "Swift"
OpenStack Storage

•   Terminology: "Containers" and "Storage Objects"
•   Scalable back-end storage for files
•   Replicates objects in software to multiple drives
•   Multi-tenant with integrated reseller support
•   Scales to multi-petabytes and billions of files
•   Stores objects of unlimited size (in 5GB chunks)
•   Software written in Python
•   API-driven access: Native API or S3-Compatible (under
    development)
OpenStack Storage Native API

• REST API
• Accepts data in either XML or JSON
• Returns data in either XML or JSON
• Authenticates with Username and API Key, returns access
  token.
• Well-documented.
CURL Example - Authentication

$ curl
  -H 'X-Auth-User: minter'
  -H 'X-Auth-Key: XXXX'
  -I
  -X GET  
  https://auth.api.rackspacecloud.com/v1.0
HTTP/1.1 204 No Content
Server: Apache/2.2.13 (Red Hat)
X-Storage-Url: https://storage101.dfw1.clouddrive.com/v1/
MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0e7f
Content-Type: application/octet-stream
Date: Sat, 18 Jun 2011 18:10:07 GMT
X-Auth-Token: 6312661f-1a18-41c8-a823-d28e44b6c2f9
X-Storage-Token: 6312661f-1a18-41c8-a823-d28e44b6c2f9
X-Server-Management-Url: https://servers.api.rackspacecloud.com/
v1.0/361291
Connection: Keep-Alive
X-CDN-Management-Url: https://cdn.clouddrive.com/v1/
MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0e7f
Content-Length: 0
CURL Example - List Containers

$ curl
  -H 'X-Auth-Token: 6312661f-1a18-41c8-a823-
d28e44b6c2f9'
  -X GET https://
storage101.dfw1.clouddrive.com/v1/
MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0
e7f
.CDN_ACCESS_LOGS
Books
CWX
Disk Images
Raw Video
[...]
CURL Example - List Containers (JSON)


$ curl
  -H 'X-Auth-Token: 6312661f-1a18-41c8-a823-
d28e44b6c2f9'
  -X GET
  https://storage101.dfw1.clouddrive.com/v1/
MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0
e7f?format=json
[{"name":".CDN_ACCESS_LOGS","count":
49,"bytes":31871},{"name":"Books","count":
9,"bytes":48055492},{"name":"CWX","count":
14,"bytes":37933163},{"name":"Disk
Images","count":4,"bytes":6062775740},
{"name":"Raw Video","count":399,"bytes":
29976077454},[....]]
CURL - Create Container

$ curl
  -I
  -H 'X-Auth-Token: 6312661f-1a18-41c8-a823-
d28e44b6c2f9'
  -X PUT
  https://storage101.dfw1.clouddrive.com/v1/
MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0
e7f/a_test_container
HTTP/1.1 201 Created
Content-Length: 18
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txaa7b23c0fb53437cb29b3720102c0528
Date: Sat, 18 Jun 2011 18:23:47 GMT
CURL - Create Object With Data
$ curl
  -T -
  -I
  -H 'Content-Length: 28'
  -H 'Content-Type: text/plain'
  -H 'X-Auth-Token: d17f67b1-13da-4352-b769-b9dfe9f06458'
  -X PUT
  https://storage101.dfw1.clouddrive.com/v1/
MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0e7f/
a_test_container/first_object.txt
HTTP/1.1 100 Continue

This is the body of my file
HTTP/1.1 201 Created
Content-Length: 118
Content-Type: text/html; charset=UTF-8
Etag: 4ca503d05d7e613d963fac927ac4ce3e
Last-Modified: Sat, 18 Jun 2011 20:02:59 GMT
X-Trans-Id: tx55427a97e6264ecc9c51edfa7bcf096c
Date: Sat, 18 Jun 2011 20:03:21 GMT
But There Has To Be An Easier Way

Language bindings for Rackspace Cloud Files are available.
Since OpenStack Storage is Cloud Files minus the CDN, you
can use those.

Official bindings (github.com/rackspace):
• Ruby
• Python
• PHP
• C#
• Java
Ruby Cloud Files Gem

https://github.com/rackspace/ruby-cloudfiles

gem install cloudfiles

require 'cloudfiles'

Patches welcome!
Ruby - OpenStack Authentication

irb(main):002:0> require 'cloudfiles'
=> true
irb(main):003:0> cf = CloudFiles::Connection.new(:auth_url
=> 'http://swift.chmouel.com:8080/auth/v1.0', :username =>
'test:tester', :api_key => 'XXXX')
=> #<CloudFiles::Connection:0x10194d700
@storagescheme="http", @authok=true, @retry_auth=true,
@authuser="test:tester", @storageport=8080, @proxy_host=nil,
@authtoken="AUTH_tkcb32965fb22c4108b0d8510bcbb86854",
@storagepath="/v1/AUTH_01835552-7bf4-4b00-9b90-
ab9b4e82e359", @proxy_port=nil, @auth_url="http://
swift.chmouel.com:8080/auth/v1.0", @http={},
@storagehost="127.0.0.1", @snet=nil, @authkey="XXX">
Ruby - Cloud Files Authentication

irb(main):001:0> require 'cloudfiles'
=> true
irb(main):002:0> cf = CloudFiles::Connection.new(:username
=> 'minter', :api_key => 'XXXX')
=> #<CloudFiles::Connection:0x10196d9b0 @http={},
@storagehost="storage101.dfw1.clouddrive.com",
@cdnmgmtscheme="https", @snet=nil, @cdn_available=true,
@proxy_port=nil, @authkey="XXXX", @storagescheme="https",
@authok=true, @cdnmgmtport=443, @retry_auth=true,
@authuser="minter", @storageport=443, @proxy_host=nil,
@cdnmgmtpath="/v1/
MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0e7f",
@authtoken="3f9a3610-beaf-488f-8270-5f54f42619af",
@storagepath="/v1/
MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0e7f",
@cdnmgmthost="cdn.clouddrive.com", @auth_url="https://
auth.api.rackspacecloud.com/v1.0">
Ruby - Containers

irb(main):003:0> cf.containers
=> [".CDN_ACCESS_LOGS", "Books", "CWX", "Disk
Images", "Raw Video", "a_test_container",...]

irb(main):004:0> c =
cf.create_container('another_container')
=> #<CloudFiles::Container:0x101924120
@name="another_container"....>

irb(main):006:0> cf.containers
=> [".CDN_ACCESS_LOGS", "Books", "CWX", "Disk
Images", "Raw Video", "a_test_container",
"another_container",...]
Ruby - Objects

irb(main):007:0> c =
cf.container('another_container')
=> #<CloudFiles::Container:0x1018be668
@name="another_container", ...>

irb(main):008:0> o = c.create_object('myfile.txt')
=> #<CloudFiles::StorageObject:0x1018ac170
@make_path=false, @name="myfile.txt",...>

irb(main):009:0> o.write("O HAI WORLD")
=> true

irb(main):010:0> o.data
=> "O HAI WORLD"
Ruby - Convenience Methods

irb(main):012:0> o = c.create_object("Code
Monkey.mp3")
=> #<CloudFiles::StorageObject:0x101849570
@make_path=false, @name="Code Monkey.mp3",...>

irb(main):014:0> o.load_from_filename('/Users/
minter/Music/iTunes
/iTunes Music/Jonathan Coulton/JoCo Looks
Back/01 Code Monkey.mp3')
=> true

irb(main):015:0> o.bytes
=> "7636175"
Other Notable API Operations

•   Set metadata for containers and objects
•   Server-side copy of objects
•   Create pseudo-hierarchical directory support
•   Offset/marker support for large collections
•   Fetching object data via byte offset and range
•   Chunked encoding for uploads
•   Manifest support for objects >5G
Changing The Content-Type

$ curl -I -H "X-Auth-Token: XXXXX" http://
swift.chmouel.com:8080/v1/AUTH_test/krack/H.
%20Wade%20Minter%20%2D%20RADIO%20H%20%2D
%20KRACK%20Live%20%281%2D15%2D2010%29.mp3
HTTP/1.1 200 OK
Last-Modified: Tue, 21 Jun 2011 14:56:05 GMT
Etag: 608cc90b0a516fed3e10b869e5c2cb6a
X-Object-Meta-Foo: bar
Accept-Ranges: bytes
Content-Length: 88434590
Content-Type: application/octet-stream
Date: Tue, 21 Jun 2011 15:02:04 GMT
Do A Copy To Itself

$ curl -I -X PUT -H "X-Auth-Token: XXX"
  -H "X-Copy-From: /krack/H.%20Wade%20Minter%20%2D%20RADIO
%20H%20%2D%20KRACK%20Live%20%281%2D15%2D2010%29.mp3"
  -H "Content-Type: audio/mpeg"
  -H "Content-Length: 0"
  http://swift.chmouel.com:8080/v1/AUTH_test/krack/H.%20Wade
%20Minter%20%2D%20RADIO%20H%20%2D%20KRACK%20Live
%20%281%2D15%2D2010%29.mp3
HTTP/1.1 201 Created
Content-Length: 118
Content-Type: text/html; charset=UTF-8
Etag: 608cc90b0a516fed3e10b869e5c2cb6a
X-Copied-From: krack/H.%20Wade%20Minter%20-%20RADIO%20H%20-
%20KRACK%20Live%20%281-15-2010%29.mp3
X-Copied-From-Last-Modified: Tue, 21 Jun 2011 14:56:05 GMT
X-Object-Meta-Foo: bar
Last-Modified: Tue, 21 Jun 2011 15:05:40 GMT
Date: Tue, 21 Jun 2011 15:05:42 GMT
Check The Results

$ curl -I
  -H "X-Auth-Token: XXXX"
  http://swift.chmouel.com:8080/v1/AUTH_test/
krack/H.%20Wade%20Minter%20%2D%20RADIO%20H
%20%2D%20KRACK%20Live20%281%2D15%2D2010%29.mp3
HTTP/1.1 200 OK
Last-Modified: Tue, 21 Jun 2011 15:05:40 GMT
Etag: 608cc90b0a516fed3e10b869e5c2cb6a
X-Object-Meta-Foo: bar
Accept-Ranges: bytes
Content-Length: 88434590
Content-Type: audio/mpeg
Date: Tue, 21 Jun 2011 15:05:53 GMT
Or Do It The Easy Way (git HEAD)

irb(main):012:0> o = c.object(c.objects.first)
=> #<CloudFiles::StorageObject:0x10174f4a8
@name="H. Wade Minter - RADIO H - KRACK Live
(1-15-2010).mp3", ...>
irb(main):013:0> o.content_type
=> "application/octet-stream"
irb(main):014:0> o.content_type = "audio/mpeg"
=> "audio/mpeg"
irb(main):015:0> o.refresh
=> true
irb(main):016:0> o.content_type
=> "audio/mpeg"
irb(main):017:0> 
Second-Level Tools

• Fog - Cloud abstraction library that supports both Cloud
  Files and Cloud Servers
• paperclip-cloudfiles - Fork of Thoughtbot's paperclip with
  support for Cloud Files and OpenStack
• Carrierwave - Rack/Rails asset storage
• Wordpress CDN Tools - Store assets on Cloud Files
• Safe - backup tool for local or cloud storage
Example Time

Simple Sinatra app interfacing with
           Cloud Files
OpenStack Compute

   Under Construction
OpenStack Compute API 1.0
              (Cloud Servers)
•   In production now on Rackspace Cloud Servers
•   Based on Slicehost technology and API
•   Integrated server image support
•   Hooks into Cloud Files for backup storage
•   IPV4 Only
OpenStack Compute API 2.0
             (NASA Nebula)
Enhancements:
• IPv6 Support
• Returns resources in full URLS (for accessing resources
  provided elsewhere)

Differences:
• No support for shared IP groups
• No support for backup schedules
• Image service soon to move to its own project (Glance)
• Adjustable limits (rates, personality files, etc)
References

OpenStack: http://openstack.org/

Rackspace Cloud APIs: http://docs.rackspace.com/api/

Rackspace Github: https://github.com/rackspace/

Me:
• Twitter: @minter
• Github: https://github.com/minter/
• Email: minter@lunenburg.org
• My Startup: http://teamsnap.com/

Weitere ähnliche Inhalte

Was ist angesagt?

Building scalable applications with hazelcast
Building scalable applications with hazelcastBuilding scalable applications with hazelcast
Building scalable applications with hazelcastFuad Malikov
 
Compliance as Code with terraform-compliance
Compliance as Code with terraform-complianceCompliance as Code with terraform-compliance
Compliance as Code with terraform-complianceEmre Erkunt
 
nuclio Overview October 2017
nuclio Overview October 2017nuclio Overview October 2017
nuclio Overview October 2017iguazio
 
OpenStack Tutorial For Beginners | OpenStack Tutorial | OpenStack Training | ...
OpenStack Tutorial For Beginners | OpenStack Tutorial | OpenStack Training | ...OpenStack Tutorial For Beginners | OpenStack Tutorial | OpenStack Training | ...
OpenStack Tutorial For Beginners | OpenStack Tutorial | OpenStack Training | ...Edureka!
 
Building Super Fast Cloud-Native Data Platforms - Yaron Haviv, KubeCon 2017 EU
Building Super Fast Cloud-Native Data Platforms - Yaron Haviv, KubeCon 2017 EUBuilding Super Fast Cloud-Native Data Platforms - Yaron Haviv, KubeCon 2017 EU
Building Super Fast Cloud-Native Data Platforms - Yaron Haviv, KubeCon 2017 EUYaron Haviv
 
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)Mirantis
 
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...Andrey Devyatkin
 
Intro to fog and openstack jp
Intro to fog and openstack jpIntro to fog and openstack jp
Intro to fog and openstack jpSatoshi Konno
 
Just one-shade-of-openstack
Just one-shade-of-openstackJust one-shade-of-openstack
Just one-shade-of-openstackRoberto Polli
 
iguazio - nuclio Meetup Nov 30th
iguazio - nuclio Meetup Nov 30thiguazio - nuclio Meetup Nov 30th
iguazio - nuclio Meetup Nov 30thiguazio
 
Ece2013 Java Advanced Memorymanagement
Ece2013 Java Advanced MemorymanagementEce2013 Java Advanced Memorymanagement
Ece2013 Java Advanced Memorymanagementda152
 
Apache LibCloud - Keeping up with the cloud market in 2016
Apache LibCloud - Keeping up with the cloud market in 2016Apache LibCloud - Keeping up with the cloud market in 2016
Apache LibCloud - Keeping up with the cloud market in 2016Anthony Shaw
 
Security model for a remote company
Security model for a remote companySecurity model for a remote company
Security model for a remote companyPierre Mavro
 
How to Use Cryptography Properly: Common Mistakes People Make When Using Cry...
How to Use Cryptography Properly:  Common Mistakes People Make When Using Cry...How to Use Cryptography Properly:  Common Mistakes People Make When Using Cry...
How to Use Cryptography Properly: Common Mistakes People Make When Using Cry...All Things Open
 
OpenStack Explained: Learn OpenStack architecture and the secret of a success...
OpenStack Explained: Learn OpenStack architecture and the secret of a success...OpenStack Explained: Learn OpenStack architecture and the secret of a success...
OpenStack Explained: Learn OpenStack architecture and the secret of a success...Giuseppe Paterno'
 
Data manipulation for configuration management using Ansible
Data manipulation for configuration management using AnsibleData manipulation for configuration management using Ansible
Data manipulation for configuration management using AnsibleJoel W. King
 
Third Party Auth in WebObjects
Third Party Auth in WebObjectsThird Party Auth in WebObjects
Third Party Auth in WebObjectsWO Community
 
iguazio - nuclio overview to CNCF (Sep 25th 2017)
iguazio - nuclio overview to CNCF (Sep 25th 2017)iguazio - nuclio overview to CNCF (Sep 25th 2017)
iguazio - nuclio overview to CNCF (Sep 25th 2017)Eran Duchan
 
Open stack architecture overview-meetup-6-6_2013
Open stack architecture overview-meetup-6-6_2013Open stack architecture overview-meetup-6-6_2013
Open stack architecture overview-meetup-6-6_2013Mirantis
 

Was ist angesagt? (20)

Building scalable applications with hazelcast
Building scalable applications with hazelcastBuilding scalable applications with hazelcast
Building scalable applications with hazelcast
 
Compliance as Code with terraform-compliance
Compliance as Code with terraform-complianceCompliance as Code with terraform-compliance
Compliance as Code with terraform-compliance
 
nuclio Overview October 2017
nuclio Overview October 2017nuclio Overview October 2017
nuclio Overview October 2017
 
OpenStack Tutorial For Beginners | OpenStack Tutorial | OpenStack Training | ...
OpenStack Tutorial For Beginners | OpenStack Tutorial | OpenStack Training | ...OpenStack Tutorial For Beginners | OpenStack Tutorial | OpenStack Training | ...
OpenStack Tutorial For Beginners | OpenStack Tutorial | OpenStack Training | ...
 
OpenStack Super Bootcamp.pdf
OpenStack Super Bootcamp.pdfOpenStack Super Bootcamp.pdf
OpenStack Super Bootcamp.pdf
 
Building Super Fast Cloud-Native Data Platforms - Yaron Haviv, KubeCon 2017 EU
Building Super Fast Cloud-Native Data Platforms - Yaron Haviv, KubeCon 2017 EUBuilding Super Fast Cloud-Native Data Platforms - Yaron Haviv, KubeCon 2017 EU
Building Super Fast Cloud-Native Data Platforms - Yaron Haviv, KubeCon 2017 EU
 
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)
 
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
 
Intro to fog and openstack jp
Intro to fog and openstack jpIntro to fog and openstack jp
Intro to fog and openstack jp
 
Just one-shade-of-openstack
Just one-shade-of-openstackJust one-shade-of-openstack
Just one-shade-of-openstack
 
iguazio - nuclio Meetup Nov 30th
iguazio - nuclio Meetup Nov 30thiguazio - nuclio Meetup Nov 30th
iguazio - nuclio Meetup Nov 30th
 
Ece2013 Java Advanced Memorymanagement
Ece2013 Java Advanced MemorymanagementEce2013 Java Advanced Memorymanagement
Ece2013 Java Advanced Memorymanagement
 
Apache LibCloud - Keeping up with the cloud market in 2016
Apache LibCloud - Keeping up with the cloud market in 2016Apache LibCloud - Keeping up with the cloud market in 2016
Apache LibCloud - Keeping up with the cloud market in 2016
 
Security model for a remote company
Security model for a remote companySecurity model for a remote company
Security model for a remote company
 
How to Use Cryptography Properly: Common Mistakes People Make When Using Cry...
How to Use Cryptography Properly:  Common Mistakes People Make When Using Cry...How to Use Cryptography Properly:  Common Mistakes People Make When Using Cry...
How to Use Cryptography Properly: Common Mistakes People Make When Using Cry...
 
OpenStack Explained: Learn OpenStack architecture and the secret of a success...
OpenStack Explained: Learn OpenStack architecture and the secret of a success...OpenStack Explained: Learn OpenStack architecture and the secret of a success...
OpenStack Explained: Learn OpenStack architecture and the secret of a success...
 
Data manipulation for configuration management using Ansible
Data manipulation for configuration management using AnsibleData manipulation for configuration management using Ansible
Data manipulation for configuration management using Ansible
 
Third Party Auth in WebObjects
Third Party Auth in WebObjectsThird Party Auth in WebObjects
Third Party Auth in WebObjects
 
iguazio - nuclio overview to CNCF (Sep 25th 2017)
iguazio - nuclio overview to CNCF (Sep 25th 2017)iguazio - nuclio overview to CNCF (Sep 25th 2017)
iguazio - nuclio overview to CNCF (Sep 25th 2017)
 
Open stack architecture overview-meetup-6-6_2013
Open stack architecture overview-meetup-6-6_2013Open stack architecture overview-meetup-6-6_2013
Open stack architecture overview-meetup-6-6_2013
 

Ähnlich wie OpenStack APIs: Present and Future (Beta Talk)

Efficient HTTP Apis
Efficient HTTP ApisEfficient HTTP Apis
Efficient HTTP ApisAdrian Cole
 
OpenStack Swift的性能调优
OpenStack Swift的性能调优OpenStack Swift的性能调优
OpenStack Swift的性能调优Hardway Hou
 
PhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cachePhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cacheAndré Rømcke
 
New and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profileNew and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profileEmily Jiang
 
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack Solution
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack SolutionWhy OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack Solution
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack SolutionElizabeth Sale
 
how to use openstack api
how to use openstack apihow to use openstack api
how to use openstack apiLiang Bo
 
Openstack - An introduction/Installation - Presented at Dr Dobb's conference...
 Openstack - An introduction/Installation - Presented at Dr Dobb's conference... Openstack - An introduction/Installation - Presented at Dr Dobb's conference...
Openstack - An introduction/Installation - Presented at Dr Dobb's conference...Rahul Krishna Upadhyaya
 
Openstack Fundamentals by CloudZone @Back2School
Openstack Fundamentals by CloudZone @Back2SchoolOpenstack Fundamentals by CloudZone @Back2School
Openstack Fundamentals by CloudZone @Back2SchoolAsaf Abres
 
OpenStack Winfest2011
OpenStack Winfest2011OpenStack Winfest2011
OpenStack Winfest2011Open Stack
 
Cisco Cloud Computing and Open Stack: Velocity 2011
Cisco Cloud Computing and Open Stack: Velocity 2011Cisco Cloud Computing and Open Stack: Velocity 2011
Cisco Cloud Computing and Open Stack: Velocity 2011Cisco Service Provider
 
Chef and OpenStack Workshop from ChefConf 2013
Chef and OpenStack Workshop from ChefConf 2013Chef and OpenStack Workshop from ChefConf 2013
Chef and OpenStack Workshop from ChefConf 2013Matt Ray
 
Kubernetes meetup bangalore december 2017 - v02
Kubernetes meetup bangalore   december 2017 - v02Kubernetes meetup bangalore   december 2017 - v02
Kubernetes meetup bangalore december 2017 - v02Kumar Gaurav
 
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Open stack ocata summit  enabling aws lambda-like functionality with openstac...Open stack ocata summit  enabling aws lambda-like functionality with openstac...
Open stack ocata summit enabling aws lambda-like functionality with openstac...Shaun Murakami
 
Zaragoza dev ops-activiti-khd-20181212
Zaragoza dev ops-activiti-khd-20181212Zaragoza dev ops-activiti-khd-20181212
Zaragoza dev ops-activiti-khd-20181212Angel Borroy López
 
Proto kubernetes onswitc_hengines_tue100418
Proto kubernetes onswitc_hengines_tue100418Proto kubernetes onswitc_hengines_tue100418
Proto kubernetes onswitc_hengines_tue100418inside-BigData.com
 
What is OpenStack and the added value of IBM solutions
What is OpenStack and the added value of IBM solutionsWhat is OpenStack and the added value of IBM solutions
What is OpenStack and the added value of IBM solutionsSasha Lazarevic
 
Jetstream: Accessible cloud computing for the national science and engineerin...
Jetstream: Accessible cloud computing for the national science and engineerin...Jetstream: Accessible cloud computing for the national science and engineerin...
Jetstream: Accessible cloud computing for the national science and engineerin...Matthew Vaughn
 
Openstack Pakistan intro
Openstack Pakistan introOpenstack Pakistan intro
Openstack Pakistan introAffan Syed
 
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloReal-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloJoe Stein
 

Ähnlich wie OpenStack APIs: Present and Future (Beta Talk) (20)

Efficient HTTP Apis
Efficient HTTP ApisEfficient HTTP Apis
Efficient HTTP Apis
 
OpenStack Swift的性能调优
OpenStack Swift的性能调优OpenStack Swift的性能调优
OpenStack Swift的性能调优
 
PhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cachePhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cache
 
New and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profileNew and smart way to develop microservice for istio with micro profile
New and smart way to develop microservice for istio with micro profile
 
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack Solution
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack SolutionWhy OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack Solution
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack Solution
 
how to use openstack api
how to use openstack apihow to use openstack api
how to use openstack api
 
Openstack - An introduction/Installation - Presented at Dr Dobb's conference...
 Openstack - An introduction/Installation - Presented at Dr Dobb's conference... Openstack - An introduction/Installation - Presented at Dr Dobb's conference...
Openstack - An introduction/Installation - Presented at Dr Dobb's conference...
 
Openstack Fundamentals by CloudZone @Back2School
Openstack Fundamentals by CloudZone @Back2SchoolOpenstack Fundamentals by CloudZone @Back2School
Openstack Fundamentals by CloudZone @Back2School
 
OpenStack Winfest2011
OpenStack Winfest2011OpenStack Winfest2011
OpenStack Winfest2011
 
Cisco Cloud Computing and Open Stack: Velocity 2011
Cisco Cloud Computing and Open Stack: Velocity 2011Cisco Cloud Computing and Open Stack: Velocity 2011
Cisco Cloud Computing and Open Stack: Velocity 2011
 
Chef and OpenStack Workshop from ChefConf 2013
Chef and OpenStack Workshop from ChefConf 2013Chef and OpenStack Workshop from ChefConf 2013
Chef and OpenStack Workshop from ChefConf 2013
 
Kubernetes meetup bangalore december 2017 - v02
Kubernetes meetup bangalore   december 2017 - v02Kubernetes meetup bangalore   december 2017 - v02
Kubernetes meetup bangalore december 2017 - v02
 
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Open stack ocata summit  enabling aws lambda-like functionality with openstac...Open stack ocata summit  enabling aws lambda-like functionality with openstac...
Open stack ocata summit enabling aws lambda-like functionality with openstac...
 
Zaragoza dev ops-activiti-khd-20181212
Zaragoza dev ops-activiti-khd-20181212Zaragoza dev ops-activiti-khd-20181212
Zaragoza dev ops-activiti-khd-20181212
 
Proto kubernetes onswitc_hengines_tue100418
Proto kubernetes onswitc_hengines_tue100418Proto kubernetes onswitc_hengines_tue100418
Proto kubernetes onswitc_hengines_tue100418
 
What is OpenStack and the added value of IBM solutions
What is OpenStack and the added value of IBM solutionsWhat is OpenStack and the added value of IBM solutions
What is OpenStack and the added value of IBM solutions
 
Jetstream: Accessible cloud computing for the national science and engineerin...
Jetstream: Accessible cloud computing for the national science and engineerin...Jetstream: Accessible cloud computing for the national science and engineerin...
Jetstream: Accessible cloud computing for the national science and engineerin...
 
Openstack Pakistan intro
Openstack Pakistan introOpenstack Pakistan intro
Openstack Pakistan intro
 
OpenStack Swift
OpenStack SwiftOpenStack Swift
OpenStack Swift
 
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloReal-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
 

Kürzlich hochgeladen

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Kürzlich hochgeladen (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

OpenStack APIs: Present and Future (Beta Talk)

  • 1. OpenStack APIs: Present and Future OSCON Beta Talk H. Wade Minter Chief Architect, TeamSnap Inc. @minter
  • 2. What Is OpenStack? OpenStack is a global collaboration of developers and cloud computing technologists producing the ubiquitous open source cloud computing platform for public and private clouds. The project aims to deliver solutions for all types of clouds by being simple to implement, massively scalable, and feature rich. The technology consists of a series of interrelated projects delivering various components for a cloud infrastructure solution.
  • 3. Community Members And Sponsors • Rackspace Hosting (Storage) • NASA (Compute) • Citrix • Dell • Peer1 • Over 70 others
  • 4. Why Does OpenStack Matter? "All of the code for OpenStack is freely available under the Apache 2.0 license. Anyone can run it, build on it, or submit changes back to the project. We strongly believe that an open development model is the only way to foster badly-needed cloud standards, remove the fear of proprietary lock-in for cloud customers, and create a large ecosystem that spans cloud providers." Run your own API-driven internal cloud and get access to a wealth of community resources already built on top of it.
  • 6. The OpenStack Universe • Storage (Swift) • Compute (Nebula) • Image Service (Glance) • Authentication (Keystone)
  • 8. OpenStack Storage • Terminology: "Containers" and "Storage Objects" • Scalable back-end storage for files • Replicates objects in software to multiple drives • Multi-tenant with integrated reseller support • Scales to multi-petabytes and billions of files • Stores objects of unlimited size (in 5GB chunks) • Software written in Python • API-driven access: Native API or S3-Compatible (under development)
  • 9. OpenStack Storage Native API • REST API • Accepts data in either XML or JSON • Returns data in either XML or JSON • Authenticates with Username and API Key, returns access token. • Well-documented.
  • 10. CURL Example - Authentication $ curl -H 'X-Auth-User: minter' -H 'X-Auth-Key: XXXX' -I -X GET   https://auth.api.rackspacecloud.com/v1.0 HTTP/1.1 204 No Content Server: Apache/2.2.13 (Red Hat) X-Storage-Url: https://storage101.dfw1.clouddrive.com/v1/ MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0e7f Content-Type: application/octet-stream Date: Sat, 18 Jun 2011 18:10:07 GMT X-Auth-Token: 6312661f-1a18-41c8-a823-d28e44b6c2f9 X-Storage-Token: 6312661f-1a18-41c8-a823-d28e44b6c2f9 X-Server-Management-Url: https://servers.api.rackspacecloud.com/ v1.0/361291 Connection: Keep-Alive X-CDN-Management-Url: https://cdn.clouddrive.com/v1/ MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0e7f Content-Length: 0
  • 11. CURL Example - List Containers $ curl -H 'X-Auth-Token: 6312661f-1a18-41c8-a823- d28e44b6c2f9' -X GET https:// storage101.dfw1.clouddrive.com/v1/ MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0 e7f .CDN_ACCESS_LOGS Books CWX Disk Images Raw Video [...]
  • 12. CURL Example - List Containers (JSON) $ curl -H 'X-Auth-Token: 6312661f-1a18-41c8-a823- d28e44b6c2f9' -X GET https://storage101.dfw1.clouddrive.com/v1/ MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0 e7f?format=json [{"name":".CDN_ACCESS_LOGS","count": 49,"bytes":31871},{"name":"Books","count": 9,"bytes":48055492},{"name":"CWX","count": 14,"bytes":37933163},{"name":"Disk Images","count":4,"bytes":6062775740}, {"name":"Raw Video","count":399,"bytes": 29976077454},[....]]
  • 13. CURL - Create Container $ curl -I -H 'X-Auth-Token: 6312661f-1a18-41c8-a823- d28e44b6c2f9' -X PUT https://storage101.dfw1.clouddrive.com/v1/ MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0 e7f/a_test_container HTTP/1.1 201 Created Content-Length: 18 Content-Type: text/html; charset=UTF-8 X-Trans-Id: txaa7b23c0fb53437cb29b3720102c0528 Date: Sat, 18 Jun 2011 18:23:47 GMT
  • 14. CURL - Create Object With Data $ curl -T - -I -H 'Content-Length: 28' -H 'Content-Type: text/plain' -H 'X-Auth-Token: d17f67b1-13da-4352-b769-b9dfe9f06458' -X PUT https://storage101.dfw1.clouddrive.com/v1/ MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0e7f/ a_test_container/first_object.txt HTTP/1.1 100 Continue This is the body of my file HTTP/1.1 201 Created Content-Length: 118 Content-Type: text/html; charset=UTF-8 Etag: 4ca503d05d7e613d963fac927ac4ce3e Last-Modified: Sat, 18 Jun 2011 20:02:59 GMT X-Trans-Id: tx55427a97e6264ecc9c51edfa7bcf096c Date: Sat, 18 Jun 2011 20:03:21 GMT
  • 15. But There Has To Be An Easier Way Language bindings for Rackspace Cloud Files are available. Since OpenStack Storage is Cloud Files minus the CDN, you can use those. Official bindings (github.com/rackspace): • Ruby • Python • PHP • C# • Java
  • 16. Ruby Cloud Files Gem https://github.com/rackspace/ruby-cloudfiles gem install cloudfiles require 'cloudfiles' Patches welcome!
  • 17. Ruby - OpenStack Authentication irb(main):002:0> require 'cloudfiles' => true irb(main):003:0> cf = CloudFiles::Connection.new(:auth_url => 'http://swift.chmouel.com:8080/auth/v1.0', :username => 'test:tester', :api_key => 'XXXX') => #<CloudFiles::Connection:0x10194d700 @storagescheme="http", @authok=true, @retry_auth=true, @authuser="test:tester", @storageport=8080, @proxy_host=nil, @authtoken="AUTH_tkcb32965fb22c4108b0d8510bcbb86854", @storagepath="/v1/AUTH_01835552-7bf4-4b00-9b90- ab9b4e82e359", @proxy_port=nil, @auth_url="http:// swift.chmouel.com:8080/auth/v1.0", @http={}, @storagehost="127.0.0.1", @snet=nil, @authkey="XXX">
  • 18. Ruby - Cloud Files Authentication irb(main):001:0> require 'cloudfiles' => true irb(main):002:0> cf = CloudFiles::Connection.new(:username => 'minter', :api_key => 'XXXX') => #<CloudFiles::Connection:0x10196d9b0 @http={}, @storagehost="storage101.dfw1.clouddrive.com", @cdnmgmtscheme="https", @snet=nil, @cdn_available=true, @proxy_port=nil, @authkey="XXXX", @storagescheme="https", @authok=true, @cdnmgmtport=443, @retry_auth=true, @authuser="minter", @storageport=443, @proxy_host=nil, @cdnmgmtpath="/v1/ MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0e7f", @authtoken="3f9a3610-beaf-488f-8270-5f54f42619af", @storagepath="/v1/ MossoCloudFS_012559c7-030d-4bbd-8538-7468896b0e7f", @cdnmgmthost="cdn.clouddrive.com", @auth_url="https:// auth.api.rackspacecloud.com/v1.0">
  • 19. Ruby - Containers irb(main):003:0> cf.containers => [".CDN_ACCESS_LOGS", "Books", "CWX", "Disk Images", "Raw Video", "a_test_container",...] irb(main):004:0> c = cf.create_container('another_container') => #<CloudFiles::Container:0x101924120 @name="another_container"....> irb(main):006:0> cf.containers => [".CDN_ACCESS_LOGS", "Books", "CWX", "Disk Images", "Raw Video", "a_test_container", "another_container",...]
  • 20. Ruby - Objects irb(main):007:0> c = cf.container('another_container') => #<CloudFiles::Container:0x1018be668 @name="another_container", ...> irb(main):008:0> o = c.create_object('myfile.txt') => #<CloudFiles::StorageObject:0x1018ac170 @make_path=false, @name="myfile.txt",...> irb(main):009:0> o.write("O HAI WORLD") => true irb(main):010:0> o.data => "O HAI WORLD"
  • 21. Ruby - Convenience Methods irb(main):012:0> o = c.create_object("Code Monkey.mp3") => #<CloudFiles::StorageObject:0x101849570 @make_path=false, @name="Code Monkey.mp3",...> irb(main):014:0> o.load_from_filename('/Users/ minter/Music/iTunes /iTunes Music/Jonathan Coulton/JoCo Looks Back/01 Code Monkey.mp3') => true irb(main):015:0> o.bytes => "7636175"
  • 22. Other Notable API Operations • Set metadata for containers and objects • Server-side copy of objects • Create pseudo-hierarchical directory support • Offset/marker support for large collections • Fetching object data via byte offset and range • Chunked encoding for uploads • Manifest support for objects >5G
  • 23. Changing The Content-Type $ curl -I -H "X-Auth-Token: XXXXX" http:// swift.chmouel.com:8080/v1/AUTH_test/krack/H. %20Wade%20Minter%20%2D%20RADIO%20H%20%2D %20KRACK%20Live%20%281%2D15%2D2010%29.mp3 HTTP/1.1 200 OK Last-Modified: Tue, 21 Jun 2011 14:56:05 GMT Etag: 608cc90b0a516fed3e10b869e5c2cb6a X-Object-Meta-Foo: bar Accept-Ranges: bytes Content-Length: 88434590 Content-Type: application/octet-stream Date: Tue, 21 Jun 2011 15:02:04 GMT
  • 24. Do A Copy To Itself $ curl -I -X PUT -H "X-Auth-Token: XXX" -H "X-Copy-From: /krack/H.%20Wade%20Minter%20%2D%20RADIO %20H%20%2D%20KRACK%20Live%20%281%2D15%2D2010%29.mp3" -H "Content-Type: audio/mpeg" -H "Content-Length: 0" http://swift.chmouel.com:8080/v1/AUTH_test/krack/H.%20Wade %20Minter%20%2D%20RADIO%20H%20%2D%20KRACK%20Live %20%281%2D15%2D2010%29.mp3 HTTP/1.1 201 Created Content-Length: 118 Content-Type: text/html; charset=UTF-8 Etag: 608cc90b0a516fed3e10b869e5c2cb6a X-Copied-From: krack/H.%20Wade%20Minter%20-%20RADIO%20H%20- %20KRACK%20Live%20%281-15-2010%29.mp3 X-Copied-From-Last-Modified: Tue, 21 Jun 2011 14:56:05 GMT X-Object-Meta-Foo: bar Last-Modified: Tue, 21 Jun 2011 15:05:40 GMT Date: Tue, 21 Jun 2011 15:05:42 GMT
  • 25. Check The Results $ curl -I -H "X-Auth-Token: XXXX" http://swift.chmouel.com:8080/v1/AUTH_test/ krack/H.%20Wade%20Minter%20%2D%20RADIO%20H %20%2D%20KRACK%20Live20%281%2D15%2D2010%29.mp3 HTTP/1.1 200 OK Last-Modified: Tue, 21 Jun 2011 15:05:40 GMT Etag: 608cc90b0a516fed3e10b869e5c2cb6a X-Object-Meta-Foo: bar Accept-Ranges: bytes Content-Length: 88434590 Content-Type: audio/mpeg Date: Tue, 21 Jun 2011 15:05:53 GMT
  • 26. Or Do It The Easy Way (git HEAD) irb(main):012:0> o = c.object(c.objects.first) => #<CloudFiles::StorageObject:0x10174f4a8 @name="H. Wade Minter - RADIO H - KRACK Live (1-15-2010).mp3", ...> irb(main):013:0> o.content_type => "application/octet-stream" irb(main):014:0> o.content_type = "audio/mpeg" => "audio/mpeg" irb(main):015:0> o.refresh => true irb(main):016:0> o.content_type => "audio/mpeg" irb(main):017:0> 
  • 27. Second-Level Tools • Fog - Cloud abstraction library that supports both Cloud Files and Cloud Servers • paperclip-cloudfiles - Fork of Thoughtbot's paperclip with support for Cloud Files and OpenStack • Carrierwave - Rack/Rails asset storage • Wordpress CDN Tools - Store assets on Cloud Files • Safe - backup tool for local or cloud storage
  • 28. Example Time Simple Sinatra app interfacing with Cloud Files
  • 29. OpenStack Compute Under Construction
  • 30. OpenStack Compute API 1.0 (Cloud Servers) • In production now on Rackspace Cloud Servers • Based on Slicehost technology and API • Integrated server image support • Hooks into Cloud Files for backup storage • IPV4 Only
  • 31. OpenStack Compute API 2.0 (NASA Nebula) Enhancements: • IPv6 Support • Returns resources in full URLS (for accessing resources provided elsewhere) Differences: • No support for shared IP groups • No support for backup schedules • Image service soon to move to its own project (Glance) • Adjustable limits (rates, personality files, etc)
  • 32. References OpenStack: http://openstack.org/ Rackspace Cloud APIs: http://docs.rackspace.com/api/ Rackspace Github: https://github.com/rackspace/ Me: • Twitter: @minter • Github: https://github.com/minter/ • Email: minter@lunenburg.org • My Startup: http://teamsnap.com/

Hinweis der Redaktion

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n