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

Building Heroku Add-ons

Building Heroku Add-ons

My talk, "Building Heroku Add-ons For Fun and Profit" from RubyKaigi 2013 in Tokyo, Japan. http://rubykaigi.org/2013/talk/S85

Video: https://vimeo.com/70673040

Matthew Conway

May 31, 2013
Tweet

More Decks by Matthew Conway

Other Decks in Programming

Transcript

  1. Kinds  of  Add-­‐on  Services • Email  and  SMS • Analytics

    • Search • Data  Stores • Logging • Payments
  2. • Cloud  AMQP  writes   info  to  log  stream •

    Papertrail  alerts  based   on  events Composability Logs  go  in,  logs  go  out
  3. Become  a  Provider • Sign  up  for  Heroku,  register  as

     provider • Join  the  provider  mailing  list,  read  docs • Push  up  your  manifest • Build  sample  consumer  (Ruby  gem,  etc)
  4. addon-­‐manifest.json { "id": "ocha", "name": "Ocha", "api": { "password": "pasuwādo",

    "sso_salt": "rc0kUK2xvctX8UQW", "regions": ["us"], "production": { "base_url": "http://.../heroku/resources", "sso_url": "http://.../sso/login" }, "test": { "base_url": "http://localhost:5000/heroku/ resources", "sso_url": "http://localhost:5000/sso/login" } }, "requires": ["syslog_drain"] }
  5. Kensa • Create  your  add-­‐on • Test-­‐drive  its  API •

    Validate  your  add-­‐on   manifest gem  install  kensa github.com/kensa
  6. Testing $ kensa test Testing POST /heroku/resources Check response [PASS]

    Check valid JSON [PASS] Check authentication [PASS] Testing response Check contains an id [PASS] (id 1) Testing PUT /heroku/resources/1 Check response [PASS] Check authentication [PASS] Testing DELETE /heroku/resources/1 Check response [PASS] Check authentication [PASS] done.
  7. The  Business • Edit  Features,  Benefits  and  Plans • Edit

     documentation • User  and  revenue  reports • User  feedback