Shiny in Production: Building bridges from data science to IT

Fd59f90efdaa9dea8f7d9c2f0c930a2b?s=47 kellobri
August 23, 2019

Shiny in Production: Building bridges from data science to IT

Start your Shiny-DevOps Journey: steal existing strategies for managing code handoffs and define shared goals.
Shiny in Production Supplement "Book": http://bit.ly/shiny-prod-book

Fd59f90efdaa9dea8f7d9c2f0c930a2b?s=128

kellobri

August 23, 2019
Tweet

Transcript

  1. Shiny in Production: Building bridges from data science to IT

    RStudio Solutions Engineering
  2. Production is... CUSTOMER/USER FACING - Ready to use - Software

    that end users are using - An app that is live and available to the end user - Apps on our production server are available to our clients - Client facing Credibility AT SCALE - Scaled to a larger audience - Bulletproof, scalable, fails predictably - Live to 1000 of users with production vehicle data SERVICE LEVEL AGREEMENTS - Required for mission-critical operations; downtime affects the ability to serve customers - Deployed for end users to have continual access without performance issues ENVIRONMENTAL REQUIREMENTS - An area where validated applications are deployed in a locked down environment - The main part of a company that handles all process - Application or system operates effectively without much maintaining effects - A server or environment that runs the “final” applications that your ultimate end-users (often external customers) use to get stuff down DOCUMENTATION - TESTING & MONITORING - Creating apps that can reach a wider audience and are deployed/tested in a consistent manner - Running in a way that is stable to use, documented and monitored
  3. Everyone’s Production is Different And Evolving at a Different Rate

  4. None
  5. YOUR DOMAIN

  6. YOUR DOMAIN THE DOMAIN OF OTHERS

  7. YOUR DOMAIN THE DOMAIN OF OTHERS Sink or Float??

  8. YOUR DOMAIN THE DOMAIN OF OTHERS (BUILD BRIDGE HERE)

  9. Strategies for Managing Code Handoffs Steal Existing & Define Shared

    Goals
  10. Strategies for Managing Code Handoffs Steal Existing & Define Shared

    Goals DevOps: Self-help philosophy for IT and software development teams
  11. How to wade in … with Empathy and Strategery! Does

    DevOps Exist in Your Org? Yes Maybe? Nope. Is IT/Ops comfortable helping you bring Shiny to production? ! . Best case scenario! Get ready to help implement some novelty Make a checklist, answer questions, build a POC, be prepared to take it slow This is your chance to meet some people! Talk to a developer or IT Human! Are you comfortable bringing DevOps to your Org? ! . Cool Beans! Figure out who else needs convincing Noodle on it! Maybe it’s worth it? Make a communication plan and come with an open mind. Read Books!
  12. Production Building Blocks Code Profiling Version Control Testing Deployment/Release Access/Security

    Performance Tuning
  13. Case Study: Deploy the AppendTab App - Testing - Development

    Environments - Advocating for Analytic Infrastructure
  14. Testing: Why Test Shiny Apps? • You’ve developed a nice

    app • You want to be confident that it will keep running in the future Things that can change/break a Shiny application • Modifying code • Upgrading the shiny package • Upgrading other packages • Upgrading R • External data source changes or fails Shared Goal: Reduce the risk of deploying a breaking change
  15. Snapshot testing with shinytest The shinytest package provides tools for

    creating and running automated tests on Shiny applications. • Easier to create tests • Can test an entire application • More sensitive to spurious changes
  16. RStudio IDE 1.2+

  17. Target Application and Test Recorder

  18. Automation! • I don’t want to remember to run this

    testing procedure • I don’t want to have to assure someone from IT that I ran it • I certainly don’t want to hand the job off to them GIVE IT TO THE MACHINES Shared Goal: The improvement of daily work
  19. How to set up shinytest with Travis CI 1. Read

    this Vignette 2.
  20. GitHub Templates https://github.com/kellobri/shinytest-travis-ci

  21. Shiny Ship it! RStudio Connect deployment strategies for all types

    of code handoffs - Push-button deployment - Git-backed automated deployment - Content creation API - Content promotion API
  22. AppendTab App Fails in the Production Environment

  23. Shared Goal: Shorten the distance between development and production ADVOCATE

    FOR A SANDBOX PUBLISHING ENVIRONMENT B. User Acceptance Testing A. Automated Snapshot Testing
  24. Even this can work Development Environment Production Environment

  25. What do you do when you find a bug? Contribute

    to Open Source! - Capture an example - GitHub - Community - Customer Success Rep
  26. What do you do when you find a bug? Contribute

    to Open Source! - Capture an example - GitHub - Community - Customer Success Rep
  27. When developers begin to think of infrastructure as part of

    their application, stability and performance become normative. - Jeff Geerling “Ansible for DevOps”
  28. Shiny in Production Journey Code Profiling Version Control Testing Deployment/Release

    Access/Security Performance Tuning Shared Goal: Shorten the distance between development and production Shared Goal: The improvement of daily work Shared Goal: Reduce the risk of deploying a breaking change
  29. bit.ly/shiny-prod-book

  30. DevOps Recommended Reading List bit.ly/devops-bookshelf