Más contenido relacionado La actualidad más candente (20) Similar a Solve the Cross-Cloud Conundrum with jclouds at Gluecon 2013 (20) Más de Everett Toews (20) Solve the Cross-Cloud Conundrum with jclouds at Gluecon 20131. 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
7. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Co-author of The OpenStack Operation Guide
7docs.openstack.org/ops
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
11. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
The Workshop
•Introduction
•jclouds Overview
•Cloud Accounts
•Installation
•Compute Example
•Next Steps
•Wrap Up
11
15. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDK Deployment
15
Your
System
S
D
K
Cloud
A
P
I
VM
VM
VM
User
System
16. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDK Deployment
16
A
P
I
Cloud
Your
System
S
D
K
User
System
VM
VM
VM
VM
18. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
jclouds
18
• Cross-cloud toolkit
• Open Source (Apache v2)
• Community
• Portable APIs
• Ecosystem APIs
• Provider APIs
• Java
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
21. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
jclouds Compute Layers (APIs)
•ComputeService
•OpenStack
•Rackspace
•HP, AWS, etc.
•NovaApi (*Api)
•OpenStack
•Rackspace
•HP
21
Portable
Ecosystem
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. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
24
jclouds Storage Venn (APIs)
Portable
Ecosystem
Provider
25. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
jclouds Community
25
After 3 beer I
can able use
any of cloud
API.
@DevOps_Borat
35. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
SDKs
35
In devops
nobody is get
fire for buy
open source.
@DevOps_Borat
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
51. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Rackspace
•BYOB?
•rackspacecloudtrial.com
•mycloud.rackspace.com
•Note: Username, Password
51
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
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
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. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Ivy
•mkdir jclouds-workshop
•cd jclouds-workshop
•gist.github.com/everett-toews/5242573
57
59. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Logging
•Create logback.xml
•gist.github.com/everett-toews/3862553
•Full logback.xml example
59
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. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
main() and skeleton
•gist.github.com/everett-toews/3862453
•javac -cp ".:lib/*" JCloudsWorkshop.java
61
62. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
init()
•gist.github.com/everett-toews/3862575
•javac -cp ".:lib/*" JCloudsWorkshop.java
•Note: Authentication
62
63. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
createNodes()
•gist.github.com/everett-toews/3862480
•javac -cp ".:lib/*" JCloudsWorkshop.java
63
64. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
configureAndStartWebservers()
•gist.github.com/everett-toews/3862485
•javac -cp ".:lib/*" JCloudsWorkshop.java
•Note: Patterns
64
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. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
awaitSsh()
•gist.github.com/everett-toews/3862516
•javac -cp ".:lib/*" JCloudsWorkshop.java
66
67. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
detectExtensions()
•gist.github.com/everett-toews/3867123
•javac -cp ".:lib/*" JCloudsWorkshop.java
67
68. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
printResults()
•gist.github.com/everett-toews/3862499
•javac -cp ".:lib/*" JCloudsWorkshop.java
68
69. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
deleteNodes() and close()
•gist.github.com/everett-toews/3862504
•javac -cp ".:lib/*" JCloudsWorkshop.java
69
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. 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. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Potpourri
•Command Line Interface
•Jenkins Plugin
•jclouds-chef
73
74. RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Who Uses jclouds?
•CloudBees
•Cloudify
•EnterpriseDB
•Pallet
•Whirr
•...
•You?
74
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
Notas del editor 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?