Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro to Rubrik's REST API - How to automate th...

Ed Morgan
March 22, 2018

Intro to Rubrik's REST API - How to automate the boring out of backup.

I did a loose Rubrik pitch at the London VMUG in May 2018, focussing on the benefits an API first architecture can bring to an IT department, and how Rubrik's approach to data management can enable you to get value out of your dataset, even when it's no longer in production.

Ed Morgan

March 22, 2018
Tweet

More Decks by Ed Morgan

Other Decks in Technology

Transcript

  1. Intro to Rubrik’s REST API How to automate the boring

    out of backup… Ed Morgan | Sales Engineer @mo6020
  2. 4 Data Management Complexity and Challenges Backup Master Server Media

    Server Search Server Disk-Based Backup Tape Archival & Compliance Catalog DB Test/Dev Offsite Backup NAS Replication Prof. Services Time Money
  3. 5 Policy Based Doesn’t rely on manual jobs, but instead

    leverages intent based policies to autonomously manage your data. A brighter approach to Data Protection Open Gain access to any of the operations that are available through the Rubrik web UI; we use the same RESTful API that you do. Extensible Integrate with your favorite toolsets and easily extend the system to fir your particular use-case.
  4. Rubrik Delivers… 6 Cloud Mobility Move applications from private clouds

    to public clouds (AWS/Azure) and replicate between clouds for resiliency and cost savings Data Protection & Disaster Recovery SLA policy-driven data protection of public and private clouds, including instant recovery of servers in <60 seconds Automation via API-first Architecture Automate protection, recovery, reporting, and analytics with ServiceNow, vRealize, Puppet, and other DevOps tools Application Migration Automate Rubrik’s Live Mount feature to migrate applications from old to new infrastructure with minimal downtime Self-Service Enable end-users to create, protect, and restore their applications and files without consuming operations staff time/resources Data Security & Immutability Ransomware-proof immutable backups, role- based access control, AES 256-bit encryption in-flight, at-rest, and in-cloud
  5. 7 How It Works Quick Start: Rack and go. Auto-discovery.

    Rapid Ingest: Flash-optimized, parallel ingest accelerates snapshots and eliminates stun. Content-aware dedupe. One global namespace. Automate: Intelligent SLA policy engine for effortless management. Instant Recovery: Live Mount VMs & SQL. Instant search and file restore. Secure: End-to-end encryption. Immutability to fight Ransomware. Cloud: “CloudOut” instantly accessible with global search. Launch apps with “CloudOn” for DR or test/dev. Run apps in cloud. Primary Environment SLA Policy Engine Log Management Private Public NAS AHV Hyper-V VMware VMware VMware VMware VMware VMware
  6. 8 Two Sides to the Force… Backup Master Server Media

    Server Search Server Disk-Based Backup Tape Archival & Compliance Catalog DB Test/Dev Offsite Backup NAS Replication SLA Policy Engine Log Management Private Public
  7. 9 Automate? Java based GUI Proprietary Regex SMI-S SNMP Human

    Interface SQL Batch files SRDF NAS Log shipping Prof. Services Time Money
  8. Death of the specialized admin 11 • Value is shifting

    up the stack • i.e. “SW is eating the world” • Nerds knobs are fun for us • What is the business value? • Abstractions enable automation • You don’t need to know how the sausage is made, just decide to eat it • One-to-one à one-to-many • Do more with less
  9. The best tools… 12 1. Get out of the way

    2. Adapt to you 3. Make the powerful simple Solomon Hykes – DockerCon 2017
  10. 13 Rubrik REST API Architecture REST API Rubrik UI *OpenAPI

    Spec Custom Scripts Same logic applies * (fka Swagger RESTful API Documentation Specification) - Leverage best practices - Build scalable APIs - Leverage OS tools to generate code / SDKs - Google - PayPal - Salesforce - … Resource centric; /hyper-v /vmware /mssql /… Consumes 3rd party APIs - (Amazon) S3 API - Blob Service REST API ReDoc OpenAPI-generated API Reference Documentation
  11. The Choice is Yours World Class UI Experience Full Featured

    RESTful API • Simple to learn and consume regardless of background experience • Consumer grade polish and feel • Great for ad-hoc activities run by administrators or end users • Most activities require only a few clicks • Simple to learn and consume with only a small amount of REST API knowledge • Gracefully integrate with your existing toolset using a small number of calls • Tested and validated by the core engineering team – we use it, too! 14
  12. 16 API First Architecture All features and functions of Rubrik

    are exposed via our RESTful API, fully documented via ReDoc, and accessible via Swagger PowerShell: Rubrik makes certain wrappers around our RESTful API, like our PowerShell Module available via Github. (Other “wrappers” include a.o. Puppet, Chef, and Python) vRO Package: Rubrik makes a vRO package available on Github, this allows customers to automate most Rubrik functions and integrate with vRealize Automation. ServiceNow Module: Rubrik makes a ServiceNow Module available that you can install as an Import Set using the MID server. REST API GUI (HTML5) PowerShell* vRO / vRA*
  13. Example – Backup validation using PowerShell 18 STEP TWO TEST

    ü Network Ping ü Service Validation ü Application Query STEP THREE CLEANUP ü Delete Live Mount ü Release IP Address STEP ONE STAGE ü Connect to vCenter ü Connect to Rubrik ü Request a Live Mount ü Network Setup STEP FOUR REPORT ü Send Test Report ü Email on Drift
  14. Staging Tasks 19 Establish Sessions with Required Endpoints Build a

    Live Mount Network Configuration and IP Address Settings Sessions are authenticated relationships with management endpoints needed to perform work. In this case, Rubrik CDM and VMware vSphere are being asked to execute tasks on behalf of the workflow. Rubrik’s Live Mount capability instantiates an entire virtual machine from any backup, which we call a snapshot, in a matter of seconds. This has zero impact on the production workload or backup data. An isolated “black hole” network will be used to allow a complex set of workloads to be run and talk to one another. This is commonly a VLAN behind a proxy, NAT device, or flat network with a dual-homed test server. STEP ONE STAGE ü Connect to vCenter ü Connect to Rubrik ü Request a Live Mount ü Network Setup
  15. 20

  16. 21

  17. Testing Tasks 22 Network Ping Service Validation Application Query Before

    using advanced testing, it’s wise to make sure that the server is reachable with a simple ping test. This assumes that ICMP Echo is allowed on the test network. For many use cases, simply making sure that the proper services or daemons are running and reachable is enough to provide evidence against partition corruption, filesystem issues, dependency failures, and other single-stack problems. The holy grail of testing is to validate that the application stack is alive. This could be a single workload or combination of several workloads. By querying the application for data, full end- to-end testing has been performed. STEP TWO TEST ü Network Ping ü Service Validation ü Application Query
  18. 23

  19. 24

  20. Cleanup Tasks 25 Live Mount Removal Release IP Address A

    request to Rubrik CDM to remove the Live Mount will result in the virtual machine being powered off, removed from inventory, and all changes being discarded from the cluster. The test IP address is placed back into the pool of available test addresses for any other workload to consume. STEP THREE CLEANUP ü Delete Live Mount ü Release IP Address
  21. 26

  22. Reporting Tasks 27 Save Reporting Data Reporting Drift Each task

    – from staging, testing, and final cleanup – should be reported to a system that is collecting metrics and telemetry. This aids in remediation of workflow issues, failed tests, and helps in building new tests. It’s important to report when a test fails due to configuration drift. If this is a new system, it may be a good idea to send an email, post a Slack message, or create a ticket. Having a human operator involved to enhance the workflow builds a body of knowledge. STEP FOUR REPORT ü Send Test Report ü Email on Drift
  23. 28

  24. Automate Dev/Test with Rubrik Clone PIT copy of VM, Power

    ON Automate change of IP Dev/Test Env Online!
  25. Automate Disaster Recovery with Rubrik Clone PIT copy of VM

    @ DR Site Automate change config Services Online @ DR!
  26. Rubrik vRO/vRA Integration VM VM Hypervisor VM vCenter REST API

    Rubrik vRO workflow package User requests new app VADP vCenter SDK Rubrik auto-discovers new VMDK – applies SLA
  27. Rubrik ServiceNow Integration User requests item from catalog VM VM

    Hypervisor VM vCenter REST API VADP VM Instances Templates MID Server HTTPS / SOAP Resource Pools ServiceNow Instance Service Catalog Dashboard Rubrik ServiceNow Module (Import Set)