User:Ssweene2/sandbox

Blue-Green Deployment

Background
Blue-green deployment is one of the techniques used in continuous delivery, which is a software engineering method to release a usable software in a fast speed, as well as continuous integration.

Definition
Blue-green deployment is a release strategy that can be utilized by developers for deploying software in a production environment. Blue can be one particular production environment whereas green can define an identical production environment. Under blue-green deployment strategy, software developers are able to minimize downtime and reduce risk . The following diagram displays Blue Green Deployment in a software deployment scenario.

From a technical perspective, Blue-green deployment can be viewed as a process where two sets of machines alternate traffic between each other. .

Principle
1. Two environments need to be identical so that a development team can easily switch between both environments. Either or environment can function as a backup while the other environment is live. 2. If the green environment has not been deployed, one should make sure to test the complete green environment in its entirety. This will ensure fully functionality when the green environment replaces the blue environment in production

Implementation
As defined, the implementation of blue-green environment therefore is concerned with Amazon Web Services, IIS, Tomcat and Cloud foundry.

AWS: (Amazon Web Services) In a traditional environment, since two versions of the same software often run in the same server, the environment should always be prepared for switching from two version. Therefore developers should be extra cautious when they update their production environment as it may cause problem when reverting the server between two version. Another advantage to this approach is you now have a really easy rollback, as the other folder contains the previous version of your website.

IIS: (Internet Information Services) 1.Queries IIS on the remote server to find out what the “active” home directory is (maybe the “Green” folder). 2.Unzips the package file into the inactive folder (“Blue”). 3.Changes the IIS home directory on the website to point to the updated slice (“Blue”).

Tomcat Server: Tomcat Server is primarily a Java based server. The Tomcat environment involves shutting down the services, uninstalling old versions of Tomcat and re-installing newer versions of Tomcat. Parallel development is the term used to describe the blue-green deployment.

Cloud foundry: For cloud foundry the following illustrates a perfect example: Step 1: Push an App Step 2: Update App and Push Step 3: Map Original Route to Green Step 4: Unmap Route to Blue Step 5: Remove Temporary Route to Green

Benefits and Challenge
Benefits: 1. Minimizes downtime by switching between blue and green environments. 2. Provides developers a fast way to rollback, if one of the environments becomes corrupted or fails in production. 3. Allows developer to test disaster-recovery. This allows the developer to accommodate a situation where there is a so-called "disaster" occurs. Challenge: Adhering to the blue-green deployment methodology in a database migration is one of the biggest issues: Often times a new release of software may involve changes in the schema of the database. Two separate databases, one serving as the other’s duplicate database is the underlying out-liar in database migration. To implement blue-green deployment, changes have to be performed in a way that maintain existing behavioral and informational semantics within the database. It is important that all the deployment and test process for the database creation is performed before deploying the new software. This helps maintain consistency of the database and ensure a backup is supported through blue-green deployment.