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:
-
Rolling back deployments
-
Zero-downtime releases
For more info, see the outstanding book Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation.
如果懶得研讀上述文章,請看看我錄的教學影片:
► 影片全長 11 分鐘: http://school.soft-arch.net/courses/vm-for-devops/lectures/964516
Same as the previous lab:
lb
(load balancer): 10.0.0.10app1
: 10.0.0.30app2
: 10.0.0.31app3
: 10.0.0.32db
: 10.0.0.20
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
:
--limit
(or-l
) host patterns--extra-vars
(or-e
)--start-at-task
task names or--step
--tags
and--skip-tags
-
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?