Introduction to 
Apache jclouds 
Everett Toews 
Developer Advocate 
@everett_toews 
NYJavaSIG 
August 20, 2014 @ 6:00 pm
Intro 
Developer
PMC and Committer on Apache jclouds
Intro 
Advocate
Intro 
Operations
Co-author of The OpenStack Ops Guide 
docs.openstack.org/ops
Cloud 
Flavour
Cloud 
IaaS
Cloud 
Private
Cloud 
Public
Green == Your Problem
Cloud 
Infrastructure 
with an API
OpenStack 
and 
Rackspace
“To produce the ubiquitous Open Source 
Cloud Computing platform that will meet 
the needs of public and private clouds 
regardless of size, by being simple to 
implement and massively scalable.”
OpenStack
OpenStack 
Identity 
(Keystone)
OpenStack
OpenStack 
Object Storage 
(Swift)
OpenStack
OpenStack 
Compute 
(Nova)
OpenStack
OpenStack 
Block Storage 
(Cinder)
OpenStack
OpenStack 
Networks 
(Neutron)
OpenStack
OpenStack 
Databases 
(Trove)
OpenStack
OpenStack 
Images 
(Glance)
OpenStack
OpenStack 
Orchestration 
(Heat)
OpenStack
OpenStack 
Dashboard 
(Horizon)
OpenStack
“We work with you to create the infrastructure 
that performs best for your business, built on 
open-source technologies and fueled by our 
unparalleled expertise—so you can move at 
the speed your business and your customers 
demand.”
OpenStack
Rackspace
Rackspace 
And
Rackspace 
• Load Balancers 
• Auto Scale 
• Monitoring 
• DNS 
• Big Data 
• Backup
Multi-Cloud
Multi-Cloud 
Application 
Portability
Multi-Cloud 
Why?
Multi-Cloud 
Disaster Recovery
Multi-Cloud 
Privacy
Multi-Cloud 
Cost
Multi-Cloud 
Performance
Multi-Cloud 
Support
Multi-Cloud 
Hybrid
Multi-Cloud 
Eggs In 
One Basket
Multi-Cloud 
One Size 
Fits All
Multi-Cloud 
Avoid Lock-in
Introduction to 
Apache jclouds
jclouds
jclouds 
Apache jclouds is an open source 
multi-cloud toolkit for the Java 
platform that gives you the freedom to 
create applications that are portable 
across clouds while giving you full 
control to use cloud-specific features.
jclouds 
Open Source
jclouds 
Multi-Cloud
jclouds 
Toolkit
jclouds 
Java platform
jclouds 
Portable
jclouds 
Full Control
jclouds 
Cloud-Specific
jclouds 
Freedom
jclouds 
Use Case
User Application
App
Concepts 
and 
Code
Concept 
API 
Resources 
Web Service Calls 
Defaults
Code 
Context 
1 NovaApi novaApi = ContextBuilder.newBuilder("openstack-nova") 
Defaults 
Top Level API 
2 .credentials("myUsername", "myPassword") 
3 .endpoint("http://myOpenStack.com:5000/v2.0/") 
4 .buildApi(NovaApi.class); 
Resource API 
5 ServerApi serverApi = novaApi.getServerApi("region"); 
6 ServerCreated server = serverApi.create("serverName", "imageId", "flavorId"); 
Resource Web Service Call (cloud-specific)
Concept 
Provider 
Endpoint 
Overrides 
Configuration 
API 
…
Code 
1 NovaApi novaApi = ContextBuilder.newBuilder("rackspace-cloudservers-us”) 
2 .credentials("myUsername", "myPassword") 
3 .buildApi(NovaApi.class); 
4 ServerApi serverApi = novaApi.getServerApi("region"); 
Provider: 
• Endpoint 
• Overrides 
• Configuration 
5 ServerCreated server = serverApi.create("serverName", "imageId", "flavorId");
Concept 
Portable Abstraction (View) 
API 
… 
Provider 
… 
OR
Code 
1 ComputeServiceContext context = ContextBuilder.newBuilder("rack-cs-us") 
2 .credentials("myUsername", "myPassword") 
3 .buildView(ComputeServiceContext.class); 
4 ComputeService computeService = context.getComputeService(); 
Portable Abstraction (View)
Code 
1 Template template = computeService.templateBuilder() 
2 .locationId("locationId") 
3 .osFamily(OsFamily.UBUNTU) 
4 .minRam(2048) 
5 .options(inboundPorts(22, 80)) 
6 .build(); 
Web Service Call (portable) 
7 computeService.createNodesInGroup("groupName", 3, template);
Community
Community 
Clouds
Community 
Users
Users 
YOU?
jclouds’ Top Contributors 
•Abiquo 
•Cloudera 
•CloudSoft 
•HP 
•Maginatics 
•Rackspace 
•XebiaLabs
Community 
github.com/jclouds/jclouds 
•8,500+ commits 
•100+ contributors 
•80+ releases
Community 
repository.apache.org 
•12,000+ downloads (July 2014)
jclouds 
jclouds.apache.org/community/
User Application
App
App 
Jenkins 
Master 
jclouds plugin
Where Does 
jclouds Live?
Deployment 
Your 
System 
The Cloud 
A 
P 
I 
User
Deployment 
Your 
System 
The Cloud 
A 
P 
I 
User
Deployment 
Your 
System 
The Cloud 
A 
P 
I 
User
Deployment 
A 
P 
I 
The Cloud 
Your 
System 
User
What Can jclouds 
Do For You?
jclouds 
Plumbing
jclouds 
(Re)Authentication
jclouds 
Pagination
jclouds 
State Polling
jclouds 
Rate Limiting
jclouds 
Retry
jclouds 
Smoothing 
Rough Edges
jclouds 
Packaged
jclouds 
All-in-one
jclouds 
Production Code
jclouds 
Sample Code
jclouds 
Documentation
User Application
App
App
Demo
Demo 
jclouds.apache.org
Demo 
jclouds.apache.org/start/install
All the JARs!
Demo 
jclouds.apache.org/guide 
s/rackspace/
Subset the JARs!
What’s New? 
What’s Next?
What’s New? 
•jclouds 1.8.0 
•Docker
What’s Next? 
•jclouds 2.0.0 
•Java 7 in 2.0.0 !!! 
•Release every 6 weeks
Thank You 
jclouds.apache.org 
Everett Toews 
Developer Advocate 
@everett_toews

Introduction to Apache jclouds at NYJavaSIG

Editor's Notes

  • #18 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • #20 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • #22 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • #24 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • #26 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • #28 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • #30 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • #32 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • #34 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • #36 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • #38 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • #39 Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in