RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute 2013


Published on

Speaker: Ryan Geyer, Cloud Solutions Engineer, RightScale

Want to implement a simple, yet powerful self-service interface on top of RightScale? This talk is for you. We will demo our work on the IT Vending Machine and cover how to customize it for your needs. You will leave with our code to begin using in your environment.

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • RightScale API is Powerful and Simple
  • Plug for automating with CloudFlowAutomate Deployment & Operations Track 2:30PM Friday “CloudFlow Deployment Orchestration: Automate all the things” – This slide will be shown!RightScale API is Poweful and Simple
  • Watch the video!Demo one of the examples with right_api_client running in IRB
  • Watch the video!LoginShow Admin/Users, authorized usersProvision ProductShow Provisioned ProductStatusActionsIPShow previously provisioned product runningStatusActionsIPDestroyShow RIDEAsk audience for components to provisionCreate productProvision productReturn to terminating product & complete destruction
  • Also see “CloudFlow Deployment Orchestration: Automate all the things”
  • RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute 2013

    1. 1. april25-26sanfranciscocloud success starts hereHow to Build Your Own ITVending MachineRyan J. Geyer, Cloud Solutions Engineer - @rjgeyer
    2. 2. #2#2#RightscaleComputeAgenda• RightScale API is Powerful• RightScale API is Simple• Vending Machine Demo
    3. 3. #RightscaleCompute#3#3RightScale API is Powerful and SimplePowerful
    4. 4. #4#4#RightscaleComputeRightScale API is Powerful
    5. 5. #5#5#RightscaleComputeAbout the MultiCloud API• RESTful: Resource URLs, HTTP Verbs, Error Codes, …• Versioned: 1.5+ is our MultiCloud API• Supports JSON and XML Response Formats• Flexible Authorization: Account (user/pass, OAuth2) or from Instance (token)• Simple resource queries through filters• Customer control of detail level through views• MediaTypes support and annotated responses• Extensive documentation, examples, and a Ruby clientA Common Programmatic Interface Across Multiple Clouds
    6. 6. #6#6#RightscaleComputeMediaTypes and Annotated Responses• Each Resource has an associated MediaType that includes:• Attributes• Links (navigation hrefs to related resources)• Actions (possible actions to perform to the specific resource)• Example response for an instance resource (simplified):Content-Type: application/vnd.rightscale.instance<instance><name>name_361342744</name><state>operational</state><links><link rel="self” href="/api/clouds/479517647/instances/ABC2383349127DEF”/><link rel="deployment” href="/api/deployments/1181”/><link rel="server_template” href="/api/server_templates/1223”/></links><actions><action rel="terminate"/><action rel="run_executable"/></actions></instance>
    7. 7. #7#7#RightscaleComputeExample from the RightScale Ops TeamPOST /api/tags/by_tag(resource_type=instances,tags=[svc:app=true])foreach instance_href as i {POST {i}/run_executable(recipe_name=pull_code)// get 202 & task-iddoGET /…/task/{task-id}until(status == completed)POST {i}/run_executable(recipe_name=web_restart)}Get all servers by app tagFor each Server in resultGet new codeWait for code to downloadRestart Web server• Rolling upgrade of your app servers:
    8. 8. #RightscaleCompute#8#8RightScale API is Powerful and SimpleSimple
    9. 9. #9#9#RightscaleComputeSimple
    10. 10. #10#10#RightscaleComputeRuby Library• Handles authentication• Simple access to MediaType actions & References• http://bit.ly/15LyfQi
    11. 11. #11#11#RightscaleComputeWell Documented
    12. 12. #RightscaleCompute#12#12RightScale API is Powerful and SimpleDemo
    13. 13. #13#13#RightscaleComputeVending Machine
    14. 14. #14#14#RightscaleComputeSummary• RightScale API is Powerful• RESTful• JSON or XML• Descriptive MediaTypes• RightScale API is Simple• Documented• API Libraries• Vending Machine• Example of what you can do with the API
    15. 15. #15#15#RightscaleComputeWhat Now?• Think about business problems you can automate with the API• Try out the Vending Machine or use it as an example for yourown• Ask me questions• Email: ryan.geyer@rightscale.com• Twitter: @rjgeyer
    16. 16. april25-26sanfranciscocloud success starts hereQuestions?