blue-green-deployment | Blue-Green Deployment scripts | Continuous Deployment library
kandi X-RAY | blue-green-deployment Summary
kandi X-RAY | blue-green-deployment Summary
Blue-Green Deployment scripts (
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of blue-green-deployment
blue-green-deployment Key Features
Community Discussions
Trending Discussions on blue-green-deployment
QUESTION
I am reading about blue green deployment with database changes on Kubernetes. It explains very clearly and in detail how the process works:
- deploy new containers with the new versions while still directing traffic to the old containers
- migrate database changes and have the services point to the new database
- redirect traffic to the new containers and remove the old containers when there are no issues
I have some questions particularly about the moment we switch from the old database to the new one.
In step 3 of the article, we have person-v1
and person-v2
services that both still point to the unmodified version of the database (postgres v1):
From this picture, having person-v2
point to the database is probably needed to establish a TCP connection, but it would likely fail due to incompatibility between the code and DB schema. But since all incoming traffic is still directed to person-v1
this is not a problem.
We now modify the database (to postgres v2) and switch the traffic to person-v2
(step 4 in the article). I assume that both the DB migration and traffic switch happen at the same time? That means it is impossible for person-v1
to communicate with postgres v2 or person-v2
to communicate with postgres v1 at any point during this transition? Because this can obviously cause errors (i.e. inserting data in a column that doesn't exist yet/anymore).
If the above assumption is correct, then what happens if during the DB migration new data is inserted in postgres v1? Is it possible for data to become lost with unlucky timing? Just because the traffic switch happens at the same time as the DB switch, does not mean that any ongoing processes in person-v1
can not still execute DB statements. It would seem to me that any new inserts/deletes/updates would need to propagate to postgres v2 as well for as long as the migration is still in progress.
ANSWER
Answered 2021-May-22 at 19:46Even when doing blue-green for the application servers, you still have to follow normal rules of DB schema compatibility. All schema changes need to be backwards compatible for whatever you consider one full release cycle to be. Both services talk to the same DB during the switchover time but thanks to careful planning each can understand the data from the other and all is well.
QUESTION
I am using terraform to create Kubernetes namespace. Sample below
...ANSWER
Answered 2021-Apr-11 at 23:25From the question it is not clear why you would require two provider definitions. But for the sake of example we can consider the below common use cases for blue/green deployment:
- target different clusters
- target different contexts
In both cases it will be easier to use a single provider with different provider configuration based on the flag set in variable.
Considering a variable definition like (using a string
type but a bool
can also be used):
QUESTION
I am following the note:
I can see new Blue/Green Deployment in ESC-Fargate Service when updating TaskDefinition and Service.
In CodeDeploy, I can see application AppECS-webapi-docker-cluster-webapi-docker-service2
and deployment ground DgpECS-webapi-docker-cluster-webapi-docker-service2
From Deployment Group, I create a Deployemnt:
What I should add in appspec?
...ANSWER
Answered 2020-May-16 at 13:54"The AppSpec file for an Amazon ECS deployment specifies your task definition, container name, and container port."
Please refer to this article for more information - https://docs.aws.amazon.com/codedeploy/latest/userguide/tutorial-ecs-create-appspec-file.html
QUESTION
I'm trying to create a CodePipeline to deploy an application to EC2 instances using Blue/Green Deployment.
My Deployment Group looks like this:
...ANSWER
Answered 2019-Dec-27 at 05:32You didn't mention which error you get when you invoke the pipeline? Are you getting this error:
"The deployment failed because no instances were found in your green fleet"
Taking this assumption, since you are using manual tagging in your CodeDeploy configuration, this is not going to work to deploy using Blue/Green with manual tags as CodeDeploy expects to see a tagSet to find the "Green" instances and there is no way to provide this information via CodePipeline.
To workaround this, please use the 'Copy AutoScaling' option for implementing Blue/Green deployments in CodeDeploy using CodePipeline. See Step 10 here [1]
Another workaround is that you can create lambda function that is invoked as an action in your CodePipeline. This lambda function can be used to trigger the CodeDeploy deployment where you specify the target-instances with the value of the green AutoScalingGroup. You will then need to make describe calls at frequent intervals to the CodeDeploy API to get the status of the deployment. Once the deployment has completed, your lambda function will need to signal back to the CodePipeline based on the status of the deployment.
Here is an example which walks through how to invoke an AWS lambda function in a pipeline in CodePipeline [2].
Ref:
[1] https://docs.aws.amazon.com/codedeploy/latest/userguide/applications-create-blue-green.html
[2] https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html
QUESTION
Firstly, I am aware that there is a similar question (AWS CodePipeline with ECS Blue/Green deployment fails with internal error), however the person that answered it, didn't provide sufficient detail.
As per this answer: https://superuser.com/questions/1388058/getting-internal-error-in-aws-code-pipeline-while-deploying-to-ecs .. I have gone through the aws guide: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#constraints... To ensure that all the "required" fields are in my taskdef.json (below)
As for my pipeline (build) buildSpec ...
...ANSWER
Answered 2019-Dec-08 at 02:14Your task definition is not valid. From a quick look I can see following invalid property:
QUESTION
I am deploying my java rest services on Azure App services, I am trying to understand blue green deployment on azure, I read this official blog on Azure Blue Green : https://azure.microsoft.com/en-in/blog/blue-green-deployments-using-azure-traffic-manager/
I got the initial idea, but what if there are many live connections on Blue instance and new code is deployed on the green instance and after sanity testing, we swap blue with green. If there is any live connection on blue will it die or will it hold till it serves the meaning full response from the end service
From swap I a mean the control button called Swap available on Azure App services. My main concern will there be any data lost while swapping when there is a live connection
...ANSWER
Answered 2019-May-22 at 14:04No existing requests will be terminated or impacted in any way. The article itself talks about how you gradually move traffic from one blue to green. It doesn't abruptly terminate the requests.
I think this part gives some confusion:
we swap blue with green
The swapping is not a destructive operation where you kill one instance and start using another one. The swapping is just telling traffic manager to point to another IP. Requests pointing to the old IP are not impacted.
You can test this by creating an endpoint that holds a connection for a long time. Then while connection is held, click swap. Have logging to see what happened.
For App Service specifically, the documentation says this:
The traffic redirection is seamless, and no requests are dropped because of swap operations.
https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install blue-green-deployment
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page