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
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).
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.