The deployment from Strider to Heroku can be done easily using the plugin to connect both platforms.
Access and deploy projects to Heroku requires either the command line interface or an application. We use the second and deploy the projects code from Strider right after successful integration.
First, go to your Heroku Profile settings and click the tab Applications. Create a new API Client by clicking the button Register New API Client.
Type your application name and callback url. The callback url is your Strider domain concatenated with ext/heroku/oauth/callback
. Complete example
https://your.strider.url/ext/heroku/oauth/callback
Creating the API client provides a client id and client secret. Both information are needed in the server configuration part of this guide.
The Heroku API client is the first step. Second, we need to create a new heroku application, the one that finally is available through the internet. Visit to the Heroku application overview and click the + (plus) icon in the upper right corner.
Type the application name and deployment region and click Create App.
That’s the Heroku part. We’ve created an API client for later access of your applications. Additionally, we’ve created a new application to deploy our code to the app.
In our previous post about Strider’s configuration options we showed you how to add new values to the platform and its plugins. If you read the integration guide for GitHub or BitBucket, you already know the steps to take for Heroku configuration. If not, don’t worry, we’ve got you covered.
The strider-heroku plugin doesn’t recognize the configuration options from .striderrc
file. You have to provide them via environment variables.
The Heroku plugin uses variables PLUGIN_HEROKU_CLIENT_ID
and PLUGIN_HEROKU_CLIENT_SECRET
for configuration.
Stop your Strider server, change your existing configuration and add both fields for Heroku:
…
export PLUGIN_HEROKU_CLIENT_ID=„your-heroku-client-id
export PLUGIN_HEROKU_CLIENT_SECRET=„your-heroku-client-secret“
Now start strider and the Heroku plugin will detect the newly set configuration values.
Your Strider server is configured, now we head over to install the Heroku plugin and add your Heroku account.
To install the strider-heroku plugin, head over to the plugin section in Strider’s admin panel.
Search for Heroku and click Install if the plugin isn’t already installed.
To enable Heroku deployments you have to allow Strider to access your Heroku applications. To do so, visit your account page and click the Heroku tab in the left sidebar. Now connect your Heroku account by clicking the Add a Heroku Account button.
You’ll be asked by Heroku to allow My Strider Client access for your Heroku applications. Strider will get full read and write access to your apps.
Click Allow and you’ll be redirected to your Strider account and Heroku tab. The overview shows the SSH keys which got added to Heroku and are authorized for deployments.
We’re almost done, just another configuration to finally enable Heroku deployments for your project.
Visit the configuration page of the project you want to deploy to Heroku. Drag and drop the Heroku plugin from from Available Plugins to Active Plugins.
Now click the new Heroku link in the left sidebar to show available options. We already connected Strider with Heroku so you’ll see the email address of your connected account in the Linked Account dropdown. If you want to deploy to a Heroku application hosted with another account, you can add the account right away.
Select the created app in the Apps dropdown. We previously created the futurestudio-strider app, which we use for demo purposes. The name is lame, we should have generated a name by Heroku. Now we’re almost done, no way back and no naming fun … Sorry.
Click save and that’s it. All the configuration is done and we can test if everything works fine.
We can manually start an integration and deployment process from Strider’s dashboard. Click the arrow-up cloud Test and Deploy button to kickoff the loop.
Strider walks through the integration steps and if tests pass successfully, the deployment starts right away.
If everything went smooth, you can view your project right after the deployment finished. Visit your Heroku app domain to check the health state.