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

NodeConf.eu Atlassian Connect Workshop

NodeConf.eu Atlassian Connect Workshop

Equip Successful Teams with a NodeJS Microservice

93533aa927a1c348f12903b5ba65aa80?s=128

Ralph Whitbeck

September 07, 2015
Tweet

Transcript

  1. RALPH WHITBECK • DEVELOPER EVANGELIST • ATLASSIAN • @REDWOLVES Equip

    Successful Teams with a NodeJS Micro-service
  2. ATLASSIAN CONNECT WHAT? WHY? HOW? CODE UP A HIPCHAT ADD-ON

    REVIEW OTHER PRODUCTS Agenda
  3. What? Why? How?

  4. Unleash the power of teams … through the power of

    software ATLASSIAN MISSION STATEMENT “ ”
  5. How many of you use…

  6. None
  7. None
  8. 50,000 Customers A Thriving Ecosystem

  9. ~$100M Revenue 50,000 Customers A Thriving Ecosystem

  10. 1,800+ Add-ons ~$100M Revenue 50,000 Customers A Thriving Ecosystem

  11. A little history https://www.flickr.com/photos/jsjgeology/15340794381

  12. In 2001 - Open[ish] Source Downloadable Source Modifying Directly

  13. 2004 - Atlassian Plugins Plugin Architecture written from scratch Service

    Provider Interface
  14. 2008 - Plugins 2 OSGi based Dependency Isolation Dynamic Loading

  15. 2014 - Atlassian Connect Language Agnostic Web APIs Cloud Integration

  16. Atlassian Connect 101

  17. Extending Atlassian Products

  18. Extending Atlassian Products Ease of upgradability

  19. Extending Atlassian Products Open Technology Stack Ease of upgradability

  20. Extending Atlassian Products Atlassian SDK Open Technology Stack Ease of

    upgradability Only needed for JIRA and Confluence
  21. Introducing Atlassian Connect

  22. Introducing Atlassian Connect Insert Web Content

  23. Introducing Atlassian Connect REST API’S Insert Web Content

  24. Introducing Atlassian Connect Webhooks REST API’S Insert Web Content

  25. A platform to build add-ons as micro-services

  26. Platform Independent A platform to build add-ons as micro-services

  27. Language Agnostic Platform Independent A platform to build add-ons as

    micro-services
  28. Language Agnostic Platform Independent A platform to build add-ons as

    micro-services Public Contracts
  29. Loosely coupled Language Agnostic Platform Independent A platform to build

    add-ons as micro-services Public Contracts
  30. None
  31. None
  32. Register Add-on Descriptor

  33. Register Add-on Descriptor API Requests Webhooks

  34. Register Add-on Descriptor API Requests Webhooks

  35. Atlassian Connect descriptor { "key": "weather-tutorial-addon", "name": "Weather", "description": "A

    simple add-on to get the weather.", "vendor": { "name": "Ralph Whitbeck", "url": "https://www.hipchat.com" }, "links": { "self": "{{localBaseUrl}}/atlassian-connect.json", "homepage": "{{localBaseUrl}}/atlassian-connect.json" }, "capabilities": { "hipchatApiConsumer": { "scopes": [ "send_notification" ] }, "installable": { "callbackUrl": "{{localBaseUrl}}/installable" }, "webhook": { "url": "{{localBaseUrl}}/webhook", "pattern": "^/weather", "event": "room_message", "name": "Get Weather" } } } { "name": "Hello World", "description": "Atlassian Connect add-on", "key": "com.example.myaddon", "baseUrl": "Your baseURL here", "vendor": { "name": "Example, Inc.", "url": "http://example.com" }, "authentication": { "type": "none" }, "version": "1.0", "modules": { "generalPages": [ { "url": "/helloworld.html", "key": "hello-world", "name": { "value": "Greeting" } } ] } }
  36. Extensibility via web fragments

  37. Extensibility via web fragments "modules": { "webPanels": [ { "location":

    ”alt.jira.view.issue.right.context”, "url": “/show-stats.html", "key": “show-stats", "name": { "value": "Statistics" } } ] }
  38. Extensibility via web fragments

  39. Choose your own technology stack

  40. Choose your stack

  41. Choose your stack

  42. Choose your stack

  43. Choose your stack

  44. Choose your stack

  45. Choose your stack

  46. Choose your stack

  47. None
  48. Choose your stack

  49. None
  50. None
  51. Static add-on

  52. Prepare for follow along live coding

  53. • Node (You have this already, don’t you?!) • HipChat

    Account (http://hipchat.com) • nGrok (http://ngrok.com) • Sign up for an API key at Weather Underground (http://www.wunderground.com/ weather/api/) • Download source code incase you fall behind or don’t want to code along • https://bitbucket.org/rwhitbeck/hipchat-weather-addon Make sure you have the following
  54. • Big cool statistic • 2,56 9 • Add-Ons in

    Marketplace Break
  55. Code a HipChat Add-on

  56. BYO INTEGRATIONS A SIMPLE NOTIFICATION PUBLISHABLE ADD-ON Code a HipChat

    Add-on
  57. None
  58. Sending a request with cURL curl \ -H "Content-Type: application/json"

    \ -X POST -d '{"message": "This is a test from cURL."}' \ https://api.hipchat.com/v2/room/1071697/notification?auth_token={Room Token}
  59. Let’s write some Node

  60. BYO Integration

  61. None
  62. None
  63. None
  64. Creating a publishable add-on

  65. Review Other Products

  66. • Download the SDK at http://developer.atlassian.com • Find the commands

    for spinning up the cloud versions • http://connect.atlassian.com -> Local Development • Downloads the application • Takes about 15 minutes the first time. Atlassian SDK
  67. JIRA

  68. Use ngrok Connect Command Atlassian SDK Developing for JIRA Cloud

    Remember to use the long command found at connect.atlassian.com to start JIRA as it is in the cloud with Atlassian Connect Use the SDK to spin up a local version of JIRA Use ngrok to expose your add-on externally and allow JIRA to install it.
  69. Add-on descriptor "generalPages": [ { "url": "/helloyou.html", "key": "hello-you", "location":

    "system.top.navigation.bar", "name": { "value": "Click me" } } ] • Products can be extended using Web fragments (web item, web section, web panel) in various parts of the UI • You specify the fragment location, a target URL, and options, through the add-on descriptor To find the list of available locations, install the Web Fragments Finder add-on from Wittified: https://marketplace.atlassian.com/plugins/com.wittified.webfragment-finder W E B F R A G M E N T S - E X T E N D I N G T H E U I
  70. Atlassian Connect only works in cloud

  71. Confluence

  72. Use ngrok Connect Command Atlassian SDK Developing for Confluence Cloud

    Remember to use the long command found at connect.atlassian.com to start Confluence as it is in the cloud with Atlassian Connect Use the SDK to spin up a local version of Confluence Use ngrok to expose your add-on externally and allow Confluence to install it.
  73. Atlassian Connect only works in cloud

  74. HipChat

  75. Use ngrok Works in Server No SDK Developing for HipChat

    Cloud Unlike JIRA and Confluence Atlassian Connect works the same in HipChat Server. You can install directly into any room you have admin rights too. Don’t have admin rights to the group. Just create a room. Use ngrok to expose your add-on externally and allow HipChat to install it.
  76. Bitbucket

  77. Use ngrok No Server No SDK Developing for Bitbucket Cloud

    Currently not supported in the server version, Stash. You can install directly into Bitbucket. Just need a user account Use ngrok to expose your add-on externally and allow HipChat to install it.
  78. API Reference Links to API references for all products can

    be found right on the home page http://developer.atlassian.com
  79. None
  80. None
  81. Payment Processing Sell Share Atlassian Marketplace http://marketplace.atlassian.com

  82. One more thing…

  83. Awesome Judges $75 AWS Credit* $130,000 in prizes Codegeist: Atlassian

    Add-on Hack-a-thon Plus a t-shirt. Just for participating. *First 400 sign-ups 7 categories to win Robert Scoble Dion Almaer Emma Jane Hogbin Westby http://codegeist.atlassian.com
  84. Thank you! RALPH WHITBECK • DEVELOPER EVANGELIST • ATLASSIAN •

    @REDWOLVES