Skip to content

Latest commit

 

History

History

30-canary

Ansible Lab #30 - Canary Deployment

Advanced deployment mechanisms

Quote Martin Fowler on Delivery:

The essence of my philosophy to software delivery is to build software so that it is always in a state where it could be put into production. We call this Continuous Delivery because we are continuously running a deployment pipeline that tests if this software is in a state to be delivered.

Fancy strategies:

For more info, see the outstanding book Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation.

Canary Deployment:觀念篇

如果懶得研讀上述文章,請看看我錄的教學影片:

► 影片全長 11 分鐘: http://school.soft-arch.net/courses/vm-for-devops/lectures/964516

實習重點

Topology

Same as the previous lab:

  • lb (load balancer): 10.0.0.10
  • app1: 10.0.0.30
  • app2: 10.0.0.31
  • app3: 10.0.0.32
  • db: 10.0.0.20

Separation of configuration

Separated by playbooks:

  • the hosts at the beginning of playbooks
  • variables and when conditions;
  • various playbook files;
  • various tags.

Separated by command-line arguments of ansible-playbook:

用到的 module(s)

  • Utilities modules / pause: Pause playbook execution.

  • Network modules / haproxy: Enable, disable, and set weights for HAProxy backend servers using socket commands.

想接受挑戰嗎?

  • Try to simplify the host mapping logic.

  • Try to verify if "zero-downtime" is achieved.

  • Think: is it necessary to temporarily offloading the service that is being updated?