DeployHQ: Painless Deployments for Planio Repositories
Planio is now integrated with DeployHQ.com. To mark the new integration, I set up a flow for automatic deployments of repositories in Planio to Uberspace using DeployHQ.
In my fictional case, we’re building a new website for the Tasty Design Agency. They specialize in tastily designed snazzy sites for discerning clients.
And we’re using Planio to manage the project and host our Git repository, DeployHQ to deploy the website and Uberspace as our server.
I’ve grabbed a Bootstrap template from the Bootstrap site to get us started.
Set up Git Repo
Before I can start working with Git repositories in Planio, I have to add my public key to the Planio account.
You can add a new public key by clicking on your name in the top navigation bar and then My Account. You’ll see a button called Public keys. Click on it and add your public key.
Moving on, I’ve downloaded my Bootstrap template, and I’ve unzipped it into a directory on my laptop.
Then in Planio I navigate to the Repository tab in the project navigation bar.
In the sidebar you can see the repository url for your project.
Opening up the command line, I navigate to the directory with the Bootstrap theme. I clone the empty repository from the Planio project:
git clone email@example.com:tasty-design-site.git
git add .
git commit -m “first commit”
git push origin master
If all went well, you should see something similar to this:
bd7c73f..41ce268 master -> master
Set up web host
For this tutorial, I’ll create an account with Uberspace, a hosting service built by techncial folks for technical folks. They support cool new languages such as node.js, Erlang and what not along with all sorts of extras you won’t find with your standard cheapo host.
At Planio, we’re big fans.
I’ll head over to Uberspace.de to create my account and note my SSH login and passwords as well as my server host name.
Set Up DeployHQ
Over at DeployHQ, I’ve set up a new account for the Tasty Design Agency website.
Then, we’ll create a new project, and we’ll select “Manually enter repository details” when selecting the repository host.
We copy over the repository URL into DeployHQ and select the branch that we want to deploy from.
In my case, I’ve selected the ‘master’ branch.
Then, I add the public key from DeployHQ to my Planio account as I did earlier. That gives DeployHQ the rights to fetch the latest version of the repository from Planio.
Next, we’ll set up the servers in DeployHQ.
I select SSH as the protocol to access the Uberspace server. Then I’ll add the host name, username and password from Uberspace.
I’ll add the deployment path, which in my case is
I’ll select the master branch as the branch to deploy from. In the sidebar, I’ve switched on automatic deployment, so any commits that are pushed to the master branch on the Planio repository are automatically deployed.
For this to work, we need to paste the URL provided in DeployHQ over to our Planio repository settings, so Planio lets DeployHQ know when there’s a fresh commit to deploy.
Now, any changes merged into the master branch and pushed to the Planio repository will be automatically deployed.
At this point, let me just say that if you’re manually dragging and dropping files in a FTP client, this is a massive improvement.
An Example Workflow With Planio
Imagine our website is humming along nicely.
The client then sends an email to our business email address, which is automatically routed to our project in Planio.
The client is asking for a few changes on the website. I can assign the issue to our developer asking her to update a section with the copy from the client.
The developer can pull the latest version of the website from the Planio repository, make the changes and link the issue to the issue in Planio.
At the same time, she merges the changes into the master branch, so they’re automatically deployed to the server.
And I see the commit referenced in the issue, so I can send an update directly from Planio letting the customer know that we’ve made the changes.
Here’s what it looks like:
It’s just so easy and painless that I have enough time to write up this entire blog post!
So, I hope you enjoyed reading this tutorial on using DeployHQ to manage your deployment as much as I did writing it.
And be sure to try it out for yourself.