2. Agenda
• What is jclouds?
• What does it do?
• Relationship to other projects
• Code examples
3. What is jclouds?
• OSS Java framework for cloud enablement
and inter-cloud integration
• b 3/2009; ~100k loc; 5 active devs
• API-based approach to connect tools to
services via a REST-based model
• Over 10 cloud services modeled
• BETA status
4. What does it do?
• Helps projects become cloud projects, and
developers become cloud developers.
• through consistency in
• Tools vs Services
• Services vs Model
• API approach
5. Tools vs Services
• jclouds helps existing tools connect to
cloud services
• a consistent integration pattern and
configuration
• adjustable library dependencies
• sample patterns, integrations, and
abstractions
6. Services vs Model
• jclouds simplifies modeling of cloud
services
• Standards focus with pragmatic
extensions. (JSR-330, 311)
• Clean means of addressing service quirks
• pluggable strategies for error/retry
handling
7. API Approach
• REST modeling before abstraction
• allows for proprietary features
• multiple abstractions are possible
• Async/Sync api mirroring
• scalably deal with 400ms-3m response time
8. Relationship to other
projects
• Alternatives to jclouds
• Tools we provide
• Projects who use us
• Project integrations in progress
9. Alternatives to jclouds
• Roll-your-own
• Jersey, RESTEasy
• EC2-based cloud apis
• typica,jets3t
• Dasein Cloud API
• Service provided SDKs
11. Projects who use
jclouds
• Infinispan • Makara
• persist the state of • application
the grid to many management of
clouds. Terremark
• Dasein Cloud • GigaSpaces
• rackspace, azure, and • integrate monitoring
terremark integration and management with
Terremark
12. Projects who use
jclouds
• Cargo • Pallet
• java over ssh • chef bootstrap and
integration. node management
• Crane
• multi-cloud hadoop
provisioning and data
access
14. VFS Example
vfs > open blobstore://user:key@cloudfiles/mycontainer
Opened blobstore://cloudfiles/mycontainer/
Current folder is blobstore://cloudfiles/mycontainer/
vfs > ls
Contents of blobstore://cloudfiles/mycontainer/
README.txt
0 Folder(s), 1 File(s)
vfs > close
15. Compute Example
// init
context = new ComputeServiceContextFactory().createContext(
"ec2",
accesskeyid,
secretaccesskey,
ImmutableSet.of(new Log4JLoggingModule(),
new JschSshClientModule()));
client = context.getComputeService();
// define the requirements of your node
template = client.templateBuilder().osFamily(UBUNTU).smallest().build();
// these nodes will be accessible via ssh when the call returns
nodes = client.runNodesWithTag("mycluster", 2, template);
16. Pallet Example
;; http://hugoduncan.github.com/pallet/
;; create a session by verifying credentials
(def cs (crane.compute/compute-context
cloudservers-compute-name cloudservers-user cloudservers-password
(crane.compute/modules :log4j :ssh :enterprise)))
;; Describe a user to be used for admin on the machine.
;; make-user uses current user's id_rsa key by default.
(def user (pallet/make-user "admin-user" "admin-password"))
;; Template for describing the node image to be used
(def server-template [:ubuntu :X86_32 :smallest :os-description-matches "[^J]+9.10[^64]+"])
;; map from tags to templates
(def templates { :combined server-template :monitor server-template})
;; declare the nodes required
(def required-nodes { :combined 2 :monitor 1})
;; create and provision the nodes
(pallet/with-chef-repository "path_to_your_chef_repository"
(pallet/with-node-templates templates
(pallet/converge cs required-nodes user)))
Notes de l'éditeur
ant, vfs, infinispan plugins;used by dasein cloud & gigaspaces
used by webappvm, gigaspaces, qlf4j, enstratus ( via dasein)
ant, vfs plugins, examples for spring, jruby, simple usage, google appengine