zoukankan      html  css  js  c++  java
  • Working with Deployment Configurations in CodeDeploy

    Deployment Configurations on an AWS Lambda Compute Platform

    When you deploy to an AWS Lambda compute platform, the deployment configuration specifies the way traffic is shifted to the new Lambda function versions in your application.

    There are three ways traffic can shift during a deployment:

    • Canary: Traffic is shifted in two increments. You can choose from predefined canary options that specify the percentage of traffic shifted to your updated Lambda function version in the first increment and the interval, in minutes, before the remaining traffic is shifted in the second increment.

    • Linear: Traffic is shifted in equal increments with an equal number of minutes between each increment. You can choose from predefined linear options that specify the percentage of traffic shifted in each increment and the number of minutes between each increment.

    • All-at-once: All traffic is shifted from the original Lambda function to the updated Lambda function version all at once.

    You can also create your own custom canary or linear deployment configuration.

    Predefined Deployment Configurations for an AWS Lambda Compute Platform

    The following table lists the predefined configurations available for AWS Lambda deployments.

     

    Deployment ConfigurationDescription

    CodeDeployDefault.LambdaCanary10Percent5Minutes

    Shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed five minutes later.

    CodeDeployDefault.LambdaCanary10Percent10Minutes

    Shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed 10 minutes later.

    CodeDeployDefault.LambdaCanary10Percent15Minutes

    Shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed 15 minutes later.

    CodeDeployDefault.LambdaCanary10Percent30Minutes

    Shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed 30 minutes later.

    CodeDeployDefault.LambdaLinear10PercentEvery1Minute

    Shifts 10 percent of traffic every minute until all traffic is shifted.

    CodeDeployDefault.LambdaLinear10PercentEvery2Minutes

    Shifts 10 percent of traffic every two minutes until all traffic is shifted.

    CodeDeployDefault.LambdaLinear10PercentEvery3Minutes

    Shifts 10 percent of traffic every three minutes until all traffic is shifted.

    CodeDeployDefault.LambdaLinear10PercentEvery10Minutes Shifts 10 percent of traffic every 10 minutes until all traffic is shifted.
    CodeDeployDefault.LambdaAllAtOnce

    Shifts all traffic to the updated Lambda functions at once.

    EC2/本地计算平台的预定义部署配置

    下表列出了预定义的部署配置。

     

    部署配置描述
    CodeDeployDefault.AllAtOnce

    就地部署

    一次性尝试将应用程序修订部署到尽可能多的实例。如果将应用程序修订部署到一个或多个实例,则整个部署的状态将显示为成功。如果尚未向任何实例部署应用程序修订,则整个部署的状态将显示为失败。在包含 9 个实例的示例中,CodeDeployDefault.AllAtOnce 将尝试一次性部署到所有 9 个实例。如果部署到单个实例成功,则整体部署成功。仅当所有 9 个实例的部署失败时,它才会失败。

    蓝/绿部署

    • 部署到替换环境:遵循的部署规则与适用于就地部署的 CodeDeployDefault.AllAtOnce 相同。

    • 流量重新路由:将流量一次路由到替换环境的所有实例中。如果流量成功地重新路由到至少一个实例,则部署成功。如果重新路由到所有实例失败,则部署失败。

    CodeDeployDefault.HalfAtATime

    就地部署

    一次最多可部署到一半实例(小数向下取整)。如果将应用程序修订部署到至少一半实例(小数向下取整),则整个部署成功。否则,部署失败。在包含 9 个实例的示例中,一次部署到最多 4 个实例。如果成功部署到 5 个或更多实例,则整个部署成功。否则,部署失败。

    蓝/绿部署

    • 部署到替换环境:遵循的部署规则与适用于就地部署的 CodeDeployDefault.HalfAtATime 相同。

    • 流量重新路由:每次将流量路由到替换环境的最多半数实例中。如果成功地重新路由到至少半数实例,则部署成功。否则,部署失败。

    CodeDeployDefault.OneAtATime

    就地部署

    一次仅将应用程序修订部署到一个实例。

    对于包含多个实例的部署组:

    • 如果已将应用程序修订部署到所有实例,则整个部署成功。此规则的例外情况是,如果无法部署到最后一个实例,则整个部署仍将成功。这是因为,CodeDeploy 仅允许通过 CodeDeployDefault.OneAtATime 配置一次使一个实例脱机。

    • 一旦应用程序修订无法部署到任何实例(但最后一个实例除外),整个部署将失败。

    • 在使用 9 个实例的示例中,将一次部署到一个实例。如果部署到前 8 个实例成功,则整体部署成功。如果部署到前 8 个实例中的任何一个实例失败,则整体部署失败。

    对于仅包含一个实例的部署组,整个部署仅在成功部署到单个实例时成功.

    蓝/绿部署

    • 部署到替换环境:遵循的部署规则与适用于就地部署的 CodeDeployDefault.OneAtATime 相同。

    • 流量重新路由:每次将流量路由到替换环境的一个实例中。如果流量成功地重新路由到所有替换实例,则部署成功。在第一次重新路由失败后,部署失败。此规则的例外情况是,如果最后一个实例无法注册,则整个部署仍将成功。

  • 相关阅读:
    Eclipse下配置javaweb项目快速部署到tomcat
    SpringMVC中如何在网站启动、结束时执行代码(详细,确保可用)
    # 浏览器兼容性 小结
    # HTML && CSS 学习笔记
    # li鼠标移入移出,点击,变背景色,变checkbox选中状态
    SpringMVC开发入门讲义
    Spring同mybatis整合讲义(事物)
    Spring中的AOP开发
    Spring框架IOC,DI概念理解
    Mybatis里SQL语句的分页
  • 原文地址:https://www.cnblogs.com/cloudrivers/p/11628275.html
Copyright © 2011-2022 走看看