0
0
Dockerdevops~5 mins

Blue-green deployment with containers in Docker - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is blue-green deployment?
Blue-green deployment is a method to release software by running two identical environments called 'blue' and 'green'. One serves live traffic while the other is updated. After testing, traffic switches to the updated environment, reducing downtime.
Click to reveal answer
beginner
Why use containers for blue-green deployment?
Containers package applications and their dependencies consistently. This makes switching between blue and green environments fast and reliable, as containers can be started or stopped quickly without affecting the host system.
Click to reveal answer
intermediate
In blue-green deployment, what happens to the old environment after switching traffic?
The old environment (blue or green) remains running but idle. It can be used as a backup to quickly roll back if the new environment has issues, ensuring safer deployments.
Click to reveal answer
intermediate
How do you switch traffic between blue and green environments in container deployments?
Traffic is switched by updating the load balancer or reverse proxy configuration to point to the containers of the new environment. This change is usually instant, causing minimal downtime.
Click to reveal answer
beginner
Give a simple Docker command to run a container for the green environment on port 8081.
docker run -d --name green_app -p 8081:80 myapp:latest
Click to reveal answer
What is the main benefit of blue-green deployment?
AMinimizes downtime during updates
BReduces container size
CImproves code readability
DIncreases CPU usage
In blue-green deployment, what does the 'green' environment usually represent?
AThe current live environment
BThe database server
CThe environment being updated or tested
DThe load balancer
Which Docker command option maps a container port to a host port?
A--name
B-v
C-d
D-p
What should you do if the new environment in blue-green deployment fails after switching?
ARestart the host machine
BSwitch traffic back to the old environment
CDelete the old environment
DIgnore the failure
Which tool is commonly used to route traffic between blue and green container environments?
ALoad balancer or reverse proxy
BGit
CDocker Compose
DKubernetes scheduler
Explain the steps involved in performing a blue-green deployment using containers.
Think about how you prepare, test, and switch environments safely.
You got /5 concepts.
    Describe how containerization helps improve the blue-green deployment process.
    Focus on container benefits like speed and consistency.
    You got /4 concepts.