Showing posts with label deployment. Show all posts
Showing posts with label deployment. Show all posts

02 May, 2018

Continuous Integration and Deployment

Continuous Integration is the practice of constantly merging development work with a Master/Trunk/Mainline branch so that you can test changes and test that those changes work with other changes. The idea here is to test your code as often as possible so you can catch issues early on. In the continuous integration process, most of the work is done by an automated tests technique which requires a unit test framework. It is best practice to have a build server designed specifically for performing these tests so your development team can continue merging requests even while tests are being performed...
Yes, automation here is key.
...Continuous Delivery is the continual delivery of code to an environment once the developer feels the code is ready to ship - this could be UAT (User Acceptance Testing), staging or production. The idea behind continuous delivery is that you’re constantly delivering code to a user base, whether it be QA or directly to customers for continual review and inspection. Although similar to continuous integration, continuous delivery differs because it can feed business logic tests where unit tests are unable to catch all business logic, particularly design issues.

...Continuous Deployment is the deployment or release of code to production as soon as it’s ready. There is no large batching in staging nor a long UAT (User Acceptance Testing) process before production. Any testing is done prior to merging to the Mainline branch and is performed on production-like environments. The production branch is always stable and ready to be deployed by an automated process. The automated process is key because it should be able to be performed by anyone in a matter of minutes (preferably by the press of a button).
And after all that, log-auditing after deployment; checking key metrics if they are influenced negatively or positively by change(s).

In the ideal workflow, the entire process could be automated from start to finish:

  • Step 1: Developer checks in code to development branch.
  • Step 2: Continuous integration server picks up the change, merges it with Master/Trunk/Mainline, performs unit tests and votes on the merge to staging environment based on test results.
  • Step 3. If Step 2 is successful, developer deploys it to the staging environment and QA tests the environment.
  • Step 4. If Step 3 passed, you vote to move to production and the continuous integration server picks this up again and determines if it’s ok to merge into production.
  • Step 5. If Step 4 is successful, it will deploy to production environment. 

This process varies slightly based on needs, requirements and approaches.

19 October, 2017

Green / Blue - Blue / Green

:P WAT? Green/Blue?

Blue/Green Deployment in Datacenter

How it Works

In the "blue-green" model, two identical application stacks are maintained (for convenience, I will refer to our application server instances and service instances as a stack, database deployments are done separately . One of the stacks is always live, let us say green is live and blue is stand-by.

When we want to deploy a new build to production, we deploy it on blue stack and do thorough testing. Once new build seems to work fine, the blue stack goes live and green becomes standby. This helps us do a quick rollback if issues are identified during deployment or sanity check.

What are the challenges?

The tricky bit here is to switch between blue and green stacks with almost no downtime.
An overhead here is to maintain two stacks and hence adds to the cost.

https://medium.com/devops-learnings/blue-green-deployments-in-data-center-e704f93f9f70
My new job requires a lot of automation set in place for us in DevOps to be able to manage the huge deployment-workloads we get. I am currently in the process of automating our setup to a degree where we only have to initiate deployment-processes without having to monitor them as they execute :P at least compared to before I came in

AUTOMATE ALL THE THINGS!