130 likes | 143 Views
Learn about Continuous Delivery methodologies on Cloud Foundry, including Blue-Green and Red-Black deployments. Understand Zero-Downtime strategies and practical application techniques. Explore concepts like Router Canary Deployments and custom routes.
E N D
Continuous Delivery (& more!)On Cloud Foundry Jason Hunt Exec Software Architect, IBM @DJHunt djhunt@us.ibm.com
Two Topics • Continuous Delivery • Broken Eggs
Continuous What? ‘Shift Left’ – Operational Concerns Build ‘Application aware’ Environments Environment Sprints
A Continuous Delivery topic with lots of names: • Blue-Green Deployment • Red-Black Deployment • Zero-downtime deployment
How Did We Get Here? Environment A Environment B Each one sized at 100% of peak load!
The Rule of 3 Environment B Environment A Environment C Each one sized at 50% of peak load
Doing Zero-Downtime Deployment in CF Application “stlcf” stlcf.mybluemix.net Router Cache stlcf.mybluemix.net Application “stlcf2” stlcfstage.mybluemix.net $ cf push stlcf2 -n stlcfstage $ cf map-route stlcf2 mybluemix.net -n stlcf $ cf unmap-route stlcf mybluemix.net -n stlcf $ cf unmap-route stlcf2 mybluemix.net -n stlcfstage $ cf delete stlcf
You have options…. // Rename the existing application to allow staging a new instance without // overwriting existing version. $ cf rename app old_app // Deploy the updated application, which will be bound to the same external // address. HTTP traffic is load balanced between the two versions automatically. $ cf push // Verify the new application is working and then turn off the old instance. $ cf stop old_app
What else is this good for? Router Canary Deployments
What else is this good for? A Router Cache B A/B Testing
Bonus: Custom Routes • First… Update your DNS listing with new hostname and IP address of your Cloud Foundry provider • Second… Update CF to route that hostname to your apps $ cf create-domain orgnamemydomain $ cf map-route myapp mydomain –n host_name
Links • Blue-Green Deployment (Fowler) http://martinfowler.com/bliki/BlueGreenDeployment.html • Blue-Green Deployment in Cloud Foundry http://docs.cloudfoundry.org/devguide/deploy-apps/blue-green.html • Red-Black & Canary Deployments (Netflix) http://techblog.netflix.com/2013/08/deploying-netflix-api.html • Automating Rolling Deployments http://www.ibm.com/developerworks/cloud/library/cl-bluemix-rollingpipeline/ • Custom Domains https://www.ng.bluemix.net/docs/#manageapps/index-gentopic3.html#d2e1 • Node-RED http://nodered.org/ • Bluemix http://bluemix.net/