2. Agenda
• What is jclouds?
• What does it do?
• Relationship to other projects
• Code examples
• Extras
3. What is jclouds?
• Apache licensed Java multi-cloud SDK
• b 3/2009; ~525k loc; 110 contributors
• connects tools portably regardless of,
yet also availing backend
• Over 40 cloud providers supported
• next release is 1.6 (March)
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
7. API Approach
• Backend before abstraction
• proprietary features, multiple abstractions
• Async/Sync api mirroring
• scalably deal with 400ms-3m response time
• Guava
• Universal Testing Approach
• unit, “expect”, and live tests
12. java overview github jclouds/jclouds
// init
context = ContextBuilder.newBuilder(“openstack-nova”)
.endpoint(“https://keystone:5000/v2.0”)
.credentials(tenantUser, password)
.modules(singleton(new SshjSshClientModule()))
.buildView(ComputeServiceContext.class);
compute = context.getComputeService();
// create a couple nodes and open a couple ports
nodes = compute.createNodesInGroup(“hbase-master”, 1,
runScript(install).
inboundPorts(60000, 60010));
// gather my ip addresses
for (NodeMetadata node : nodes) {
node.getPublicAddresses();
node.getPrivateAddresses();
}
@jclouds 12
13. jclouds locations
Location helps
normalize placement
across resource types
All top-level resources listAssignableLocations
have a location US
Location metadata is IE
SG
extensible
14. jclouds modularity
APIs are software
focused jclouds-blobstore
Providers are offering s3
focused aws-s3
scality-ring walrus
API + location + googlestorage
scaleup-storage
defaults = Provider
eucaluptus-partnercloud-s3
15. New
Toys
• Fluent
Pagina,on
(1.5)
• Small
distribu,on
(1.6)
@jclouds
16. Fluent Pagination
• Many apis == pagination differences
• Desire ease, but also ability to “opt-out”
of lazy continuations
• Can we make it easier to filter/transform
resources?
17. FluentIterable
lazy advance through all your metrics:
FluentIterable<Metric> allMetrics = cloudwatch.getMetricApi().list().concat();
advance only until we find the load balancer we want:
Optional<LoadBalancer> firstInterestingLoadBalancer = elb
.getLoadBalancerApi().list()
.concat()
.firstMatch(isInterestingLB());
get only the first page of google instances
IterableWithMarker<Instance> firstPage =
gce.getInstanceApiForProject("myproject").listFirstPage();
18. Small Distribution
• Before 1.6 we had more deps
• We now have much less deps
• You can now make a <5MB cloud app!