概述
零停机部署验证工作流是一个中级难度的工作流。用滚动更新零停机部署,并在过渡期间验证健康检查。该工作流的目标是:Deploy an application update without any user-visible downtime.
环境准备
执行本工作流需要以下环境:A deployment system supporting rolling updates;Health check endpoints on the application;Sufficient capacity to run old and new versions simultaneously。请确保在开始前准备好所有必需的工具和资源,以避免中途因环境问题中断。
执行步骤
本工作流包含5个步骤。步骤1:Verify health checks——Confirm that health check endpoints are working on the current version. 步骤2:Start rolling update——Initiate a rolling deployment that replaces instances one at a time. 步骤3:Monitor health——Watch health check status for each new instance as it comes up. 步骤4:Verify no dropped requests——Check that request success rate stays at 100 percent during the rollout. 步骤5:Complete deployment——Confirm all instances are running the new version and old instances are removed.
验证与清理
预期结果:The application is updated with zero downtime and all health checks pass throughout the deployment.。验证方法:Monitor request success rate during deployment; confirm no 502 or 503 errors occurred.。清理操作:Roll back to the previous version if health checks fail for new instances.。estimatedMinutes 为 40 分钟。
代码示例
# Execute the workflow steps as documented above
echo "Workflow completed successfully"