Blue green Deployments using Containers
This posts reproduces the demo that run at November Docket Meet-up in Sydney. It emulates a blue green deployment using Docker containers. Every independent infrastructure contains a elastic load balancer and an ec2 instance. Every ec2 instance has a microservice running, one with Tomcat 7 (emulating the existing infrastructure) and the second one with Tomcat 8 (emulating the new infrastructure). We will deploy both infrastructures using the framework Manageacloud.
This post is a summary of commands, if you want to learn more about how it works you can get started using the quickstart guide.
pip install awscli pip install mac aws configure mac login mac provider credential amazon <access key> <secret_access_key>
mac -s infrastructure macfile https://goo.gl/XQSpxW -p TOMCAT_VERSION=7-jre8
mac -s infrastructure macfile https://goo.gl/XQSpxW -p TOMCAT_VERSION=8-jre8
Accessing to the Infrastructure
You can access to the application that is running the Microservice by using the ec2 public address or the DNSName provided by the load balancer. You can access the DNSName by executing:
mac resource get_stdout docker_tomcat 7-jre8 load_balancer_01
mac resource get_stdout docker_tomcat 8-jre8 load_balancer_01