anynines website

Categories

Series

Markus Schwedt

Published at 31.10.2014

How-To’s & Tutorials

How to Setup Continuous Deployment With anynines and Codeship.com

Minimize time between development and code being used in production

At anynines we deploy several times a day and even though we used custom scripts, it still took us tons of time to deploy every application following the green-blue deployment process by hand. That’s why we decided to do continuous deployments, and you should probably do the same.

Implementing continuous deployment one aims to minimize the time between development and your code being used in production. To achieve continuous deployment, the steps leading up to deployment are automized so that after each integration successfully meeting your release criteria, the live application is updated.

We will use Codeship.com to set up continuous deployment.    

Prep your application for continuous deployment

First of all, make sure you already do blue-green deployments and you have 2 identical applications with the terms “green” or “blue” in it.

We will use this manifest.yml as an example:

Second, copy the script from our repository into your application.

In this example we will copy the script into script/cf_deploy

How to setup Codeship?

At first, we need to setup the environment variables for the authentication, location and additional applications of your project.

To do that, go to the configuration dashboard of your Codeship.com project and click on “Environment”. Set your environment variables and click on “Save changes” (you can find the available options in the README of the script repository).

In our case, configuration looks like this:

To finish the setup go to the “Deployment” tab and select “Script” as we see here:

Then add the shell command to execute the cf_deploy script and click on the check button to save.

Now we’re ready to go! It really is that easy! Just push your changes to the repository and see the magic happen. Enjoy zero downtime anynines deployments right after your CI build was successful.

© anynines GmbH 2024

Imprint

Privacy Policy

About

© anynines GmbH 2024