1 / 0

Solve the Cross-Cloud Conundrum with jclouds HOL6628 http://j.mp/16nH6a0

Solve the Cross-Cloud Conundrum with jclouds HOL6628 http://j.mp/16nH6a0. Zack Shoylev irc : zacksh twitter: @ zackshoylev Jeremy Daggett i rc : jdaggett twitter : @ jeremy_daggett Everett Toews i rc : etoews twitter : @ everett_toews # jclouds Also email!. Introductions.

feivel
Télécharger la présentation

Solve the Cross-Cloud Conundrum with jclouds HOL6628 http://j.mp/16nH6a0

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Solve the Cross-Cloud Conundrum with jclouds HOL6628 http://j.mp/16nH6a0
  2. Zack Shoylev irc: zackshtwitter: @zackshoylev Jeremy Daggett irc: jdaggett twitter: @jeremy_daggett Everett Toews irc: etoews twitter: @everett_toews #jclouds Also email! Introductions Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  3. Introductions Developer Relations Group sdk-support@rackspace.com Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  4. Goals jclouds Create a cloud server SSH Apache HTTP Server Cleanup Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  5. //TODO: This workshop code will use either: Devstack (local OpenStack deployment on the HOL VM) Rackspace (more features will be demonstrated) This will require sign-up. Start here: https://cart.rackspace.com/cloud/ Free developer tier available Workshop VM - HOL6628 (this VM) http://tinyurl.com/obql73s Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  6. Buzzword Networked and distributed computing Variety of services Compute (servers) Storage (files) Databases Email … The Cloud Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  7. The Cloud Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  8. The Cloud Cloud VM VM Your System AP I VM SDK This can be an application server Or your home machine Or belong to one of your end users Or a cloud VM Or a smartphone Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  9. Advantages Metered pricing (pay as you go) Project scalability (unlimited) Safer (offsite/redundant) Economies of scale Expertise Support The Cloud Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  10. Disadvantages Less hardware control Provider-controlled downtime Virtualization (efficiency) Provider lock-in Provider-specific apis/sdks/features Expensive to switch clouds or deploy locally jclouds minimizes this disadvantage The Cloud Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  11. Cloud OS Open-sourced by Rackspace and NASA (2010) Free Supported AT&T, HP, IBM, Red Hat, Rackspace, Dell, Cisco, Intel, Vmware, … OpenStack Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  12. Cloud SDK Java (and Clojure) Easy Portable and cloud-agnostic Dozens of contributors Open source jclouds Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  13. HTTP calls Authentication and re-authentication Pagination Polling Rate limits Retries Abstractions Logging Less code jclouds Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  14. Services Storage Compute VM Images Load Balancers DNS Databases … Providers Openstack Rackspace HP Amazon Azure … jclouds Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  15. jclouds Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  16. We will: Use devstack Local deployment of OpenStack Used for testing No providers needed, everything is local Default image good for testing, fast, lacks features Solutions! Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  17. Alternatively: Use Rackspace Openstack-compatible Fast, easy, and it works! Credit card needed, free tier available Many images supported https://cart.rackspace.com/cloud/ Solutions! Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  18. Also: Use jclouds in cloud-agnostic way Showcase compute code Best practices Gotchas and workarounds Solutions! Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  19. Workshop VM - HOL6628 http://tinyurl.com/obql73s Devstack http://devstack.org/ VMs Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  20. Devstack grizzly on the VM Start it up ./start.sh source devstack/openrc Test it nova image-list Displays a list of three images nova list nova delete <id>/<name> nova help boot https://gist.github.com/zack-shoylev/6568804 VMs Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  21. VM has gedit, gedit, and vi Folder structure mkdir -p workshop/src/main/java/org/jclouds/workshop mkdirworkshop/src/main/resources cd workshop gedit pom.xml https://gist.github.com/zack-shoylev/6568813 Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  22. Maven Maven is already on the VM! POM file to easily get all dependencies: https://gist.github.com/zack-shoylev/6516988 Download dependencies mvndependency:copy-dependencies "-DoutputDirectory=./lib" Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  23. Maven Dependencies Selective subset Versioning jclouds-labs Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  24. Logging https://gist.github.com/zack-shoylev/6517225 Create resource folder and xml file cd src/main/resources geditlogback.xml Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  25. Credentials cd ~/workshop geditcredentials.txt If using devstack: demo:demo;devstack If using Rackspace: username;password Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  26. Java file! geditsrc/main/java/org/jclouds/workshop/JCloudsWorkshop.java https://gist.github.com/zack-shoylev/6568851 Skeleton https://gist.github.com/zack-shoylev/6517742 Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  27. Terminology Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  28. Compile javac -classpath "lib/*:src/main/java/:src/main/resources/" src/main/java/org/jclouds/workshop/*.java Run java -classpath "lib/*:src/main/java/:src/main/resources/" org.jclouds.workshop.JCloudsWorkshop https://gist.github.com/zack-shoylev/6568851 Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  29. Initialize SDK https://gist.github.com/zack-shoylev/6517805 Some notes: More code to get the credentials out of the file! Gotcha: Explicitly setting endpoint (providers!) Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  30. Java Project Compute Abstractions Nova Provider code Increasing level of abstraction Cloudfiles Endpoint, etc. Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  31. Create a node https://gist.github.com/zack-shoylev/6517873 Some notes: Gotcha: cirros Gotcha: RAM Gotcha: v2 Saves a lot of coding (don’t use): https://gist.github.com/zack-shoylev/6517903 Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  32. Start a webserver: https://gist.github.com/zack-shoylev/6517986 Some notes: Will not work on the cirros image Await SSH: https://gist.github.com/zack-shoylev/6517959 Would work on a custom image: https://gist.github.com/zack-shoylev/6517928 Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  33. Detect extensions https://gist.github.com/zack-shoylev/6517997 Notes: Provider-specific Multiple providers can support the same extensions Example: Security groups Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  34. Print results https://gist.github.com/zack-shoylev/6518025 Notes: Gotcha: jclouds cannot authorize public key on cirros Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  35. Cleanup (auto-delete node) https://gist.github.com/zack-shoylev/6518031 Notes: It will pause before it deletes. Check out your server! Ctrl-C if you want, to cleanup later: nova list nova delete <id> Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  36. Full code, if needed https://gist.github.com/zack-shoylev/6542561 Compile javac -classpath "lib/*:src/main/java/:src/main/resources/" src/main/java/org/jclouds/workshop/*.java Run java -classpath "lib/*:src/main/java/:src/main/resources/" org.jclouds.workshop.JCloudsWorkshop https://gist.github.com/zack-shoylev/6568851 Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  37. Check out the server! Devstack ssh cirros@10.0.0.2 Password is “cubswin:)” exit # to disconnect Rackspace chmod 400 jclouds.pem ssh-ijclouds.pem root@<public ip> Private key authentication http://<public ip> Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  38. More cleanup Delete any credential files Kill any running instances if using Rackspace https://mycloud.rackspace.com/ Java Project Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  39. Multiple compute nodes Load balancing DNS Databases Storage and CDN Going forward Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  40. jclouds examples https://github.com/jclouds/jclouds-examples More docs http://jclouds.incubator.apache.org/documentation/ http://javadocs.jclouds.cloudbees.net/ Maven alternatives? http://jclouds.incubator.apache.org/documentation/userguide/installation-guide/ Contribute! http://jclouds.incubator.apache.org/documentation/devguides/ Going forward Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
  41. Thank you! http://developer.rackspace.com sdk-support@rackspace.com Zack Shoylev Software Developer zacksh #jclouds @zackshoylev Solve the Cross-Cloud Conundrum with jclouds http://j.mp/16nH6a0
More Related