BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Try Before You Buy: Heroku Supports Preview of GitHub Applications

Try Before You Buy: Heroku Supports Preview of GitHub Applications

This item in japanese

Heroku is trying to make it easier to turn source code into a running application. The Heroku Button – a simple bit of HTML or Markdown that triggers a deployment from a public GitHub repository to Heroku’s public cloud – sets up Heroku as an attractive destination for quickly previewing, hosting, and extending open source web applications.

Announced in a blog post last week, the Heroku Button is designed to “make the process of deploying, running and updating code simple and easy.” How? Instead of making developers try out an application by cloning a repo, creating an application container, adding ancillary services, and running setup scripts, Heroku is offering a way to encode application settings and deploy code from a public GitHub repository in a single click.

Heroku used a more in-depth article to explain a few key parts of the Button mechanism. The button itself is simple. It’s represented on a page using a reference to an image and a hyperlink to https://heroku.com/deploy. If this link is in the README within a GitHub repo, then Heroku reads the “referer” header to know which repo to pull code from. This is a recommended approach and “convenient because it avoids hard-coding the specific repository URL into the button, allowing forks and branches of the repository to work properly without a change to the button href.” However, there’s also an option to use a “template” querystring parameter that points to a specific repo or specific Git branch. To describe the web application, Heroku relies on an app.json manifest file. Developers use this manifest to call out the application name, repository, post deploy scripts, deploy-time configuration values, and which Heroku addons to provision upon deployment. The button below points to a public GitHub repository containing a Node.js application created by this InfoQ editor.

When the button is clicked, the developer gets routed to Heroku where they are guided through a single-page configuration workflow. The user provides a name for this application, the target region, and any environment variables. Who does Heroku think that this new service benefits most?

The button is ideal for add-on providers and open-source project maintainers who wish to provide customers with a quick and easy way to deploy a Heroku app running source code that they maintain.

To that end, Heroku announced that a few early add-on partners have embraced the Button.

We have worked with several add-on providers to take advantage of buttons to make experimenting with their services on Heroku easier. Check out the CloudAMQP and MemCachier Dev Center articles and notice how sample apps in different languages can be deployed and tested with a simple click.

Our good friends at Twilio have added a deploy button to their Rapid Response Kit, a suite of communication tools that can be used for anything from emergency response to community organization. With the button in the README, interested developers can immediately deploy the Rapid Response Kit to Heroku and start hacking on it to make it do what they need.

Heroku also pointed to a few open source projects that now have a Heroku Buttons configured. The first, called city-72, is an emergency preparedness application that any city could try out via the Heroku Button and fork to meet their local needs. This application demonstrates the use of code that relies on Heroku add-ons such as PostgreSQL, SendGrid, and New Relic. The second app is one from Heroku. It’s called Starboard and uses Trello to track employee onboarding and offboarding tasks.

Rate this Article

Adoption
Style

BT