Your SlideShare is downloading. ×
0
with jclouds
Solve the Cross-
Cloud Conundrum
Everett Toews
Developer Advocate
@everett_toews
You need:
JDK 1.6+
Maven 3+
...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Intro
2
Developer
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Committer on jclouds
3
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Intro
4
Advocate
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Intro
5
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Intro
6
Operations
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Co-author of The OpenStack Operation Guide
7docs.openstack.org/ops
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Intro
8
In startup we
are not allow
dev team for
talk to ops team
except by API.
@D...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Intro
9
rackspacecloudtrial.com
hpcloud.com/sign_up
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Agenda
10
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
The Workshop
•Introduction
•jclouds Overview
•Cloud Accounts
•Installation
•Compute...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Introduction
12
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Rackspace
13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
The Cloud
14
Infrastructure
with an API
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDK Deployment
15
Your
System
S
D
K
Cloud
A
P
I
VM
VM
VM
User
System
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDK Deployment
16
A
P
I
Cloud
Your
System
S
D
K
User
System
VM
VM
VM
VM
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Introduction to jclouds
17
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
jclouds
18
• Cross-cloud toolkit
• Open Source (Apache v2)
• Community
• Portable A...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
jclouds’ Supported Clouds
•Compute
•Rackspace Cloud
Servers
•HP Cloud Compute
•AWS ...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
jclouds Community
20
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
jclouds Compute Layers (APIs)
•ComputeService
•OpenStack
•Rackspace
•HP, AWS, etc.
...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
22
jclouds Compute Venn (APIs)
Portable
Ecosystem
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
jclouds Storage Layers (APIs)
23
•BlobStore
•OpenStack
•Rackspace
•HP, AWS, etc.
•S...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
24
jclouds Storage Venn (APIs)
Portable
Ecosystem
Provider
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
jclouds Community
25
After 3 beer I
can able use
any of cloud
API.
@DevOps_Borat
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
What Can jclouds
Do For You Today?
26
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
27
Plumbing
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
28
(Re)Authentication
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
29
Pagination
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
30
State Polling
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
31
Rate Limiting
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
32
Retry
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
33
Smoothing
Rough Edges
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
34
Open Source
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
35
In devops
nobody is get
fire for buy
open source.
@DevOps_Borat
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
36
Community
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
37
Packaged
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
38
All-in-one
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
39
Extensions
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
40
No lock-in
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
41
OpenStack
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
42
Battle Tested Code
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
43
Sample Code
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
44
Documentation
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
45
Support
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
46
Survey is show
junior devops
are still believe
in Tooth Fairy,
Santa Claus ...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Code
47
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Code
48
j.mp/jcldsglue2013
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Code
49
Zack Shoylev
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Cloud Accounts
50
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Rackspace
•BYOB?
•rackspacecloudtrial.com
•mycloud.rackspace.com
•Note: Username, P...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
HP
•hpcloud.com/sign_up
•console.hpcloud.com/compute
•Activate AZ1 and AZ2
•Top rig...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Terminology
53
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Terminology
jclouds Rackspace/OpenStack
Compute Cloud Servers/Nova
Node Server
Loca...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Installation
55
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Maven
•mkdir jclouds-workshop
•cd jclouds-workshop
•Create pom.xml
•gist.github.com...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Ivy
•mkdir jclouds-workshop
•cd jclouds-workshop
•gist.github.com/everett-toews/524...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Compute Example
58
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Logging
•Create logback.xml
•gist.github.com/everett-toews/3862553
•Full logback.xm...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Imports and Class
•Create JCloudsWorkshop.java
•gist.github.com/everett-toews/38615...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
main() and skeleton
•gist.github.com/everett-toews/3862453
•javac -cp ".:lib/*" JCl...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
init()
•gist.github.com/everett-toews/3862575
•javac -cp ".:lib/*" JCloudsWorkshop....
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
createNodes()
•gist.github.com/everett-toews/3862480
•javac -cp ".:lib/*" JCloudsWo...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
configureAndStartWebservers()
•gist.github.com/everett-toews/3862485
•javac -cp ".:...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
JCloudsWorkshop.java
65
Number of cloud
instance launch by
ops team is direct
propo...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
awaitSsh()
•gist.github.com/everett-toews/3862516
•javac -cp ".:lib/*" JCloudsWorks...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
detectExtensions()
•gist.github.com/everett-toews/3867123
•javac -cp ".:lib/*" JClo...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
printResults()
•gist.github.com/everett-toews/3862499
•javac -cp ".:lib/*" JCloudsW...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
deleteNodes() and close()
•gist.github.com/everett-toews/3862504
•javac -cp ".:lib/...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Run!
•java -cp ".:lib/*" JCloudsWorkshop
70
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
JCloudsWorkshop.java
71
Hello World in
cloud is involve
1 load balancer,
3 web serv...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Potpourri
•Moved to Apache Software Foundation
•groupId change
• 1.6.0: <groupId>or...
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Potpourri
•Command Line Interface
•Jenkins Plugin
•jclouds-chef
73
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Who Uses jclouds?
•CloudBees
•Cloudify
•EnterpriseDB
•Pallet
•Whirr
•...
•You?
74
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Next Steps
75
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Next Steps
•Full Example
•Terminate your VMs!
•Load Balancing
•More examples
•jclou...
Thank You
Everett Toews
Developer Advocate
@everett_toews
And don’t forget to terminate your VMs
developer.rackspace.com
j...
Upcoming SlideShare
Loading in...5
×

Solve the Cross-Cloud Conundrum with jclouds at Gluecon 2013

678

Published on

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
678
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in
  • Recommend split screen
  • Recommend split screen
  • What haven't I specified explicitly?
  • What haven't I specified explicitly?
  • What haven't I specified explicitly?
  • Transcript of "Solve the Cross-Cloud Conundrum with jclouds at Gluecon 2013"

    1. 1. with jclouds Solve the Cross- Cloud Conundrum Everett Toews Developer Advocate @everett_toews You need: JDK 1.6+ Maven 3+ Rackspace and/or HP cloud accounts Gluecon May 22, 2013 at 10:30 pm
    2. 2. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Intro 2 Developer
    3. 3. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Committer on jclouds 3
    4. 4. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Intro 4 Advocate
    5. 5. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Intro 5
    6. 6. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Intro 6 Operations
    7. 7. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Co-author of The OpenStack Operation Guide 7docs.openstack.org/ops
    8. 8. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Intro 8 In startup we are not allow dev team for talk to ops team except by API. @DevOps_Borat
    9. 9. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Intro 9 rackspacecloudtrial.com hpcloud.com/sign_up
    10. 10. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Agenda 10
    11. 11. RACKSPACE® HOSTING | WWW.RACKSPACE.COM The Workshop •Introduction •jclouds Overview •Cloud Accounts •Installation •Compute Example •Next Steps •Wrap Up 11
    12. 12. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Introduction 12
    13. 13. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Rackspace 13
    14. 14. RACKSPACE® HOSTING | WWW.RACKSPACE.COM The Cloud 14 Infrastructure with an API
    15. 15. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDK Deployment 15 Your System S D K Cloud A P I VM VM VM User System
    16. 16. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDK Deployment 16 A P I Cloud Your System S D K User System VM VM VM VM
    17. 17. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Introduction to jclouds 17
    18. 18. RACKSPACE® HOSTING | WWW.RACKSPACE.COM jclouds 18 • Cross-cloud toolkit • Open Source (Apache v2) • Community • Portable APIs • Ecosystem APIs • Provider APIs • Java
    19. 19. RACKSPACE® HOSTING | WWW.RACKSPACE.COM jclouds’ Supported Clouds •Compute •Rackspace Cloud Servers •HP Cloud Compute •AWS EC2 •ElasticHosts •GoGrid •All Clouds 19 •Storage •Rackspace Cloud Files •HP Cloud Storage •AWS S3 •Azure •CloudOne •All Clouds
    20. 20. RACKSPACE® HOSTING | WWW.RACKSPACE.COM jclouds Community 20
    21. 21. RACKSPACE® HOSTING | WWW.RACKSPACE.COM jclouds Compute Layers (APIs) •ComputeService •OpenStack •Rackspace •HP, AWS, etc. •NovaApi (*Api) •OpenStack •Rackspace •HP 21 Portable Ecosystem
    22. 22. RACKSPACE® HOSTING | WWW.RACKSPACE.COM 22 jclouds Compute Venn (APIs) Portable Ecosystem
    23. 23. RACKSPACE® HOSTING | WWW.RACKSPACE.COM jclouds Storage Layers (APIs) 23 •BlobStore •OpenStack •Rackspace •HP, AWS, etc. •SwiftApi •OpenStack •Rackspace •HP •CloudFilesClient •Rackspace Portable Ecosystem Provider
    24. 24. RACKSPACE® HOSTING | WWW.RACKSPACE.COM 24 jclouds Storage Venn (APIs) Portable Ecosystem Provider
    25. 25. RACKSPACE® HOSTING | WWW.RACKSPACE.COM jclouds Community 25 After 3 beer I can able use any of cloud API. @DevOps_Borat
    26. 26. RACKSPACE® HOSTING | WWW.RACKSPACE.COM What Can jclouds Do For You Today? 26
    27. 27. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 27 Plumbing
    28. 28. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 28 (Re)Authentication
    29. 29. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 29 Pagination
    30. 30. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 30 State Polling
    31. 31. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 31 Rate Limiting
    32. 32. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 32 Retry
    33. 33. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 33 Smoothing Rough Edges
    34. 34. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 34 Open Source
    35. 35. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 35 In devops nobody is get fire for buy open source. @DevOps_Borat
    36. 36. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 36 Community
    37. 37. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 37 Packaged
    38. 38. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 38 All-in-one
    39. 39. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 39 Extensions
    40. 40. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 40 No lock-in
    41. 41. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 41 OpenStack
    42. 42. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 42 Battle Tested Code
    43. 43. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 43 Sample Code
    44. 44. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 44 Documentation
    45. 45. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 45 Support
    46. 46. RACKSPACE® HOSTING | WWW.RACKSPACE.COM SDKs 46 Survey is show junior devops are still believe in Tooth Fairy, Santa Claus and documentation. @DevOps_Borat
    47. 47. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Code 47
    48. 48. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Code 48 j.mp/jcldsglue2013
    49. 49. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Code 49 Zack Shoylev
    50. 50. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Cloud Accounts 50
    51. 51. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Rackspace •BYOB? •rackspacecloudtrial.com •mycloud.rackspace.com •Note: Username, Password 51
    52. 52. RACKSPACE® HOSTING | WWW.RACKSPACE.COM HP •hpcloud.com/sign_up •console.hpcloud.com/compute •Activate AZ1 and AZ2 •Top right > View API Keys •Note: Tenant Name, Username, Password 52
    53. 53. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Terminology 53
    54. 54. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Terminology jclouds Rackspace/OpenStack Compute Cloud Servers/Nova Node Server Location Region Hardware Flavor NodeMetadata Server details User Metadata Metadata BlobStore Cloud Files/Swift Blob File/Object 54
    55. 55. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Installation 55
    56. 56. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Maven •mkdir jclouds-workshop •cd jclouds-workshop •Create pom.xml •gist.github.com/everett-toews/3861545 •mvn dependency:copy-dependencies "-DoutputDirectory=./lib" 56
    57. 57. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Ivy •mkdir jclouds-workshop •cd jclouds-workshop •gist.github.com/everett-toews/5242573 57
    58. 58. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Compute Example 58
    59. 59. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Logging •Create logback.xml •gist.github.com/everett-toews/3862553 •Full logback.xml example 59
    60. 60. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Imports and Class •Create JCloudsWorkshop.java •gist.github.com/everett-toews/3861596 •javac -cp ".:lib/*" JCloudsWorkshop.java •Windows: Use ‘;’ for path separator •Note: Guice, Guava 60
    61. 61. RACKSPACE® HOSTING | WWW.RACKSPACE.COM main() and skeleton •gist.github.com/everett-toews/3862453 •javac -cp ".:lib/*" JCloudsWorkshop.java 61
    62. 62. RACKSPACE® HOSTING | WWW.RACKSPACE.COM init() •gist.github.com/everett-toews/3862575 •javac -cp ".:lib/*" JCloudsWorkshop.java •Note: Authentication 62
    63. 63. RACKSPACE® HOSTING | WWW.RACKSPACE.COM createNodes() •gist.github.com/everett-toews/3862480 •javac -cp ".:lib/*" JCloudsWorkshop.java 63
    64. 64. RACKSPACE® HOSTING | WWW.RACKSPACE.COM configureAndStartWebservers() •gist.github.com/everett-toews/3862485 •javac -cp ".:lib/*" JCloudsWorkshop.java •Note: Patterns 64
    65. 65. RACKSPACE® HOSTING | WWW.RACKSPACE.COM JCloudsWorkshop.java 65 Number of cloud instance launch by ops team is direct proportional with LOC write by dev team. @DevOps_Borat
    66. 66. RACKSPACE® HOSTING | WWW.RACKSPACE.COM awaitSsh() •gist.github.com/everett-toews/3862516 •javac -cp ".:lib/*" JCloudsWorkshop.java 66
    67. 67. RACKSPACE® HOSTING | WWW.RACKSPACE.COM detectExtensions() •gist.github.com/everett-toews/3867123 •javac -cp ".:lib/*" JCloudsWorkshop.java 67
    68. 68. RACKSPACE® HOSTING | WWW.RACKSPACE.COM printResults() •gist.github.com/everett-toews/3862499 •javac -cp ".:lib/*" JCloudsWorkshop.java 68
    69. 69. RACKSPACE® HOSTING | WWW.RACKSPACE.COM deleteNodes() and close() •gist.github.com/everett-toews/3862504 •javac -cp ".:lib/*" JCloudsWorkshop.java 69
    70. 70. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Run! •java -cp ".:lib/*" JCloudsWorkshop 70
    71. 71. RACKSPACE® HOSTING | WWW.RACKSPACE.COM JCloudsWorkshop.java 71 Hello World in cloud is involve 1 load balancer, 3 web server and 2 database server. @DevOps_Borat
    72. 72. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Potpourri •Moved to Apache Software Foundation •groupId change • 1.6.0: <groupId>org.jclouds.X</groupId> • 1.6.1: <groupId>org.apache.jclouds.X</groupId> •Package change •1.6.0: import org.jclouds •1.7 (2.0?): import org.apache.jclouds 72
    73. 73. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Potpourri •Command Line Interface •Jenkins Plugin •jclouds-chef 73
    74. 74. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Who Uses jclouds? •CloudBees •Cloudify •EnterpriseDB •Pallet •Whirr •... •You? 74
    75. 75. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Next Steps 75
    76. 76. RACKSPACE® HOSTING | WWW.RACKSPACE.COM Next Steps •Full Example •Terminate your VMs! •Load Balancing •More examples •jclouds doc and Javadoc •Join jclouds-user-subscribe@apache.org •jclouds and OpenStack •Contributing OpenStack Support to jclouds 76
    77. 77. Thank You Everett Toews Developer Advocate @everett_toews And don’t forget to terminate your VMs developer.rackspace.com j.mp/jcldsglue2013
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×