Bitbucket + Platform.sh: remove the middle-man between your code and your deployment

This guest post is written by Ori Pekelmen, VP of Inbound Marketing at Platform.sh. Ori is a start-up guy, with a tech background, who enjoys evangelizing new technologies, organizing events such as Paris DataGeeks, and helping tech teams succeed.

What if you could go beyond code review in a pull request and actually play with the new feature you're working on, without the hassle of deploying to your machine? What if you could easily share a feature spike with your clients for early feedback, before it's actually shipped? The new Platform.sh integration with Bitbucket makes it simple to stage pull requests and feature branches on-the-fly without any additional effort. Interested? Read on.

Platform.sh is a second generation PaaS powered by a highly available grid of micro containers. You push code, and we automatically put everything into production. We deploy databases and configure the lot with no sysadmin work, none, zero. It's fully automated and happens almost instantly. Platform.sh removes the middle-man between your code and your deployment.

One of the earliest features we implemented was a simple Bitbucket integration. We love the Atlassian suite of tools and use it quite a lot internally since we like dogfooding as much as anyone else.

A pleasant surprise

But we felt the integration could be better. Our developers wouldn't get feedback inside the Bitbucket UI on how the deployments went, and switching tools constantly made them feel they lost context.

In March 2015, Fred Plais, our CEO, and I went to San Francisco for a series of meetings, one of which was with the Atlassian Bitbucket Team. We showed them “screen captures” of our ideas behind a good integration between Platform.sh and Bitbucket. There was some grinning around the table that we didn't immediately understand. A couple of weeks later the team got back to us with an unexpected question, “The screen captures you showed us were precisely the kind of integration we’ve been working on. Can you be ready in 6 weeks?”

Two months ago, and on time, Platform.sh was fortunate enough to be among the first Bitbucket Connect Add-Ons, and shipped https://platform.sh/bitbucket.

What? There are people in 2015 that have feature branches without a live test cluster?

It's never been easier to deploy an application directly from a Git repo, never before was collaboration, testing, and development so seamless.

And judging by our client’s response, we got something right. Some of our clients just immediately got used to the idea that every branch becomes clickable in the Bitbucket UI, giving access to a staging environment, just for that branch.

image02

"I've been managing Bettrack's code with GIT since day one […] when I installed the Platform.sh add-on on Bitbucket, I was […] blown away by how seamless the integration is. This integration just saves me so much time! When I make changes in my code, I can see the outcome right away. I decide when I want to go live, and that's as simple as pressing a button. That's just so powerful! The need to react to market forces is very important and Platform.sh with Bitbucket have dramatically improved not just the site but Bettracks as a business", said Scott Hooker, owner of Bettracks, a betting website for football fans.

This is how feature branches should always have been, testable but in isolation. This integration simply makes the idea of feature branches, feature complete.

Let’s talk about what seamless means

Setting up the initial integration is easy:

  • Go to the Find new add-ons screen in Bitbucket.
  • Choose Platform.sh.
  • Follow the simple wizard that allows you to setup a Platform.sh project, which will be integrated with your Bitbucket repository.

image00

From there, there’s nothing much to do. Every Git branch gets a clickable staging URL.

All this is possible because Bitbucket's Atlassian Connect framework provides much deeper integration than what is offered by standard REST APIs and webhooks.

From the Platform.sh side you just add a simple YAML file at the root of the repository and your application is ready to be deployed. Having the deployment configuration checked into your repository not only makes it simple to deploy, but it also means that it is tracked over time as your application evolves. And the integration works the other way around, too. You can log in to Platform.sh with your Bitbucket account to get detailed feedback on deployments and the state of your environments.

You can even manage a micro service oriented architecture as a single entity (with every service as a separate Bitbucket private repository) and still get “magic” testing environments for every branch.

And Platform.sh is not just for staging.

Robust hosting and batteries included

Platform.sh is not a makeshift solution. It is a robust, mature, hosting environment. Platform.sh enterprise includes white glove support and 99.99% guaranteed availability for the price of traditional managed hosting.

And it is not only extremely scalable, but also very versatile. By adding a single property to a configuration file, you can immediately get an instance of Postgres, MariaDb, Redis, Solr, ElasticSearch, etc. with no external add-ons and no external points-of-failure. You can manage your entire infrastructure right there, in your Bitbucket account. And when you backup your cluster, you get a consistent snapshot of everything.

Simple is more

Deep integration with code management and hosting is a big leap forward. It allows even small and medium sites to go full-on-continuous-everything like a Google or a Facebook which translates to reduced lead times with huge cost savings.

Platform.sh and Bitbucket integration gives you all the DevOps features with none of the hassles. You are not locked into complex software and architectures that might not exist in a couple of years. You run your stack unmodified, and a couple of YAML files makes it “continuous-everything on the cloud.”

Currently Platform.sh supports any PHP application. If you are using Nodejs, Ruby or Python, stay tuned on Twitter for some exciting news in the future. If you have any feedback about the add-on, let us know by leaving a comment on this blog post.