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

Getting ready for the enterprise: Shipping GitH...

Getting ready for the enterprise: Shipping GitHub Enterprise Server-compatible integrations

In this 50 minute workshop we’ll show you how to ship integrations for GitHub Enterprise Server—including developer licensing and code modifications, as well as common packaging, distribution, and installation patterns for on-premises GitHub Apps. We’ll also share best practices and helpful resources to get you started. In the end, you’ll leave knowing how to share developer tools with Enterprise Server teams, whether for code quality, developer productivity, project management, or automation.

More information: https://github.com/satelliteworkshops/integrate-4-getting-ready-for-the-enterprise

Steve Winton

May 22, 2019
Tweet

More Decks by Steve Winton

Other Decks in Technology

Transcript

  1. May 2019 GitHub Getting ready for the enterprise: Shipping GitHub

    Enterprise Server-compatible integrations
  2. GitHub GitHub Satellite Workshop Day Quick poll (1 of 3):

    Who has used the GitHub APIs before?
  3. GitHub GitHub Satellite Workshop Day Quick poll (2 of 3):

    Who has built a GitHub integration?
  4. GitHub GitHub Satellite Workshop Day Quick poll (3 of 3):

    Who knew there was a self- hosted version of GitHub.com?
  5. GitHub.com GitHub Enterprise Server Release cadence Multiple times per day

    Patches: ~every 2 weeks Features: ~every 3 months REST API https://api.github.com https://$GHE_HOST/api/v3 e.g. https://github.example.org/api/v3 GraphQL API https://api.github.com/graphql https://$GHE_HOST/api/graphql e.g. https://github.example.org/api/graphql OAuth 1. https://github.com/login/oauth/ authorize 2. https://github.com/login/oauth/ access_token 1. https://$GHE_HOST/login/oauth/ authorize e.g. https://github.example.org/login/oauth/authorize 2. https://$GHE_HOST/login/oauth/ access_token e.g. https://github.example.org/login/oauth/access_token Rate limiting Fixed set of rules Configurable set of rules, disabled by default
  6. GitHub Satellite Workshop Day GitHub curl --head https://$GHE_HOST/api/v3/zen HTTP/1.1 401

    Unauthorized Server: GitHub.com Content-Type: application/json; charset=utf-8 Content-Length: 131 Status: 401 Unauthorized X-GitHub-Enterprise-Version: 2.16.8 Access-Control-Allow-Origin: * X-GitHub-Request-Id: 0d2b95cc-7993-4103- ac69-9700ae105b00 curl --head https://api.github.com/zen HTTP/1.1 200 OK Server: GitHub.com Content-Type: text/plain;charset=utf-8 Content-Length: 31 Status: 200 OK X-RateLimit-Limit: 60 X-RateLimit-Remaining: 57 X-RateLimit-Reset: 1558043863 Access-Control-Allow-Origin: * X-GitHub-Request-Id: E983:1139:D4C84D: 1BEA763:5CDDCEC7
  7. GitHub Satellite Workshop Day GitHub content-type: application/json User-Agent: GitHub-Hookshot/632ecda X-GitHub-Delivery:

    eb1face0-7ba6-11e9-9e4c-19bbe24720c6 X-GitHub-Enterprise-Host: 13.90.100.179 X-GitHub-Enterprise-Version: 2.16.8 X-GitHub-Event: issues X-Hub-Signature: sha1=4e08038209eec7ad47ba58b070bac1c79d0e 6614 content-type: application/json User-Agent: GitHub-Hookshot/ae20175 X-GitHub-Delivery: 8e4d9ef0-7ba6-11e9-9d1b-329bca45a219 X-GitHub-Event: issues X-Hub-Signature: sha1=959e30ada1020bfc63b6ff1e573fdcbe5283 6ec9 https://developer.github.com/webhooks/#delivery-headers
  8. GitHub Satellite Workshop Day GitHub WIP: Our mission: Take an

    existing integration and make it compatible with GitHub Enterprise Server https://github.com/wip/app/ DO NOT MERGE – as a service.
  9. GitHub Satellite Workshop Day GitHub WIP: Our mission: Take an

    existing integration and make it compatible with GitHub Enterprise Server https://github.com/wip/app/ DO NOT MERGE – as a service. We did it!
  10. GitHub Satellite Workshop Day GitHub 1. Direct people to create

    specified app 2. GitHub redirects back to app with temporary code 3. Exchange temporary code for app credentials The App Manifest Flow https://git.io/github-app-manifest-flow
  11. GitHub Satellite Workshop Day GitHub We modified our code to

    handle differences between GitHub.com and GitHub Enterprise Server
  12. GitHub Satellite Workshop Day GitHub Inside the firewall In this

    scenario, the customer will self-host a packaged instance of your integration
  13. GitHub Satellite Workshop Day GitHub Disadvantages - less visibility into

    how app is performing - releases become more difficult - dependent on customer providing infrastructure and setting things up correctly Advantages - likely to be a better fit with customer’s security posture - no need to isolate data - packaging formats are freely available (e.g. Docker)
  14. GitHub Satellite Workshop Day GitHub In this scenario, you will

    continue to host your integration, but will need “special sauce” that allows communication through the firewall to the customer-hosted appliance Outside the firewall
  15. GitHub Satellite Workshop Day GitHub Disadvantages - need to communicate

    “through the firewall” - need to partition customer data, e.g. by App ID - need to handle multiple keys, conflicting installation IDs Advantages - better visibility, monitoring of your app - control over infrastructure choices - control over release cadence
  16. GitHub GitHub Satellite Workshop Day Inside the firewall Outside the

    firewall So… Which is the better option?
  17. GitHub Satellite Workshop Day GitHub In sum • Sign up

    for GitHub Enterprise Server developer license • Strive for a single codebase • Store config in environment • Implement the manifest flow to ease setup • Use existing libraries, frameworks where possible • Consider deployment strategies based on needs of your integration Key takeaways