Creating a Heroku add-on

I would like to integrate my cloud service in Heroku as an add-on. I read the available tutorials on how to do this, but it is still not clear.

I couldn't understand the role of the application that we create from a template (Sinatra for example) using kensa. Is it an intermediate between Heroku and the cloud service?

thanks in advance.


Actually, Heroku needs 2 things:

  1. addon-manifest.json file where described all information needed for Heroku. And this json file contains 2 important urls:
    • 'base_url'
    • 'sso_url'
  2. Application which will server heroku-specific API and responds wit corresponding JSON on provisioning/deprovisioning/planchange requests. These request point to 'base_url'.

So, if you own your Cloud service code, and can add new API endpoints, then you don't need any application based on kensa-template: add necessary API controllers directly in the service.

But if you can't upgrade the cloud service, then you're right, kensa-template is a ready to use with heroku intermediate.

In case of sinatra template, you just need to put necessary API calls to your cloud service in "# provision" method of app.rb file, deploy app somewhere and do 'kensa push' for your addon-manifest.json (don;t forget to update base_url to yours)

Good luck!

Bare minimum API routes for heroku add-on based on your Cloud service:

  • POST request to '/heroku/resources' - for provisioning
  • DELETE request to '/heroku/resources' - for deprovisioning

If you really want to sell it to heroku users, then you should do more stuff:

  • add support for heroku single sign-on this is one more API route: POST to '/heroku/sso', but you can change it in addon-manifest.json file.
  • PUT '/heroku/resources/:id' for Plan change request. Note that ':id' is an id which you provided heroku in your response during provisioning.

If you implement SSO, then user can click on your add-on on heroku instance's resources page and redirect directly to your service bypass any login forms. You can show just short info about user's resource in the page after SSO.

Need Your Help

Rating System Won't Average Correctly

php rating equation rating-system

I have a rating system that uses the following equation to generate the rating average:

usockets: How do I specify the external format when I open a socket

sockets common-lisp

I'm trying to connect to a mud client, so I'm using usockets to connect over tcp. But After I write I get a decoding error reading. I have reason to believe the encoding should ascii ,or least use ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.