New – Fully Managed Blue/Green Deployments in Amazon Aurora and Amazon RDS

海外精选
re:Invent
Amazon RDS
海外精选的内容汇集了全球优质的亚马逊云科技相关技术内容。同时,内容中提到的“AWS” 是 “Amazon Web Services” 的缩写,在此网站不作为商标展示。
0
0
{"value":"When updating databases, using a blue/green deployment technique is an appealing option for users to minimize risk and downtime. This method of making database updates requires two database environments—your current production environment, or blue environment, and a staging environment, or green environment. You must then keep these two environments in sync with each other so you may safely test and upgrade your changes to production.\n\n[Amazon Aurora](https://aws.amazon.com/rds/aurora) and [Amazon Relational Database Service](https://aws.amazon.com/rds) (Amazon RDS) customers can use database cloning and promotable read replicas to help self-manage a blue/green deployment. However, self-managing a blue/green deployment can be costly and complex to build and manage. As a result, customers sometimes delay implementing database updates, choosing availability over the benefits that they would gain from updating their databases.\n\nToday, we are announcing the general availability of **[ Amazon RDS Blue/Green Deployments](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html)**, a new feature for Amazon Aurora with MySQL compatibility, Amazon RDS for MySQL, and Amazon RDS for MariaDB that enables you to make database updates safer, simpler, and faster.\n\nWith just a few steps, you can use Blue/Green Deployments to create a separate, synchronized, fully managed staging environment that mirrors the production environment. The staging environment clones your production environment’s primary database and in-Region read replicas. Blue/Green Deployments keep these two environments in sync using logical replication.\n\nIn as fast as a minute, you can promote the staging environment to be the new production environment with no data loss. During switchover, Blue/Green Deployments blocks writes on blue and green environments so that the green catches up with the blue, ensuring no data loss. Then, Blue/Green Deployments redirects production traffic to the newly promoted staging environment, all without any code changes to your application.\n\nWith Blue/Green Deployments, you can make changes, such as major and minor version upgrades, schema modifications, and operating system or maintenance updates, to the staging environment without impacting the production workload.\n\n### ++Getting Started with Blue/Green Deployments for MySQL Clusters++\nYou can start updating your databases with just a few clicks in the Amazon Web Services Management Console. To get started, simply select the database that needs to be updated in the console and click **Create Blue/Green Deployment** under the **Actions** dropdown menu.\n\n![image.png](https://dev-media.amazoncloud.cn/9fe9f180ba144fc7a8c8406ef2fbd3e7_image.png)\n\nYou can set a **Blue/Green Deployment identifier** and the attributes of your database to be modified, such as the engine version, DB cluster parameter group, and DB parameter group for green databases. To use a Blue/Green Deployment in your Aurora MySQL DB cluster, you should [turn on binary logging](https://aws.amazon.com/premiumsupport/knowledge-center/enable-binary-logging-aurora/), changing the value for the \n```binlog_format```parameter from ```OFF```to ```MIXED```\n in the DB cluster parameter group.\n\n![image.png](https://dev-media.amazoncloud.cn/66c298cde08e496db12fa9cb8b6edcd2_image.png)\n\nWhen you choose** Create Blue/Green Deployment**, it creates a new staging environment and runs automated tasks to prepare the database for production. Note, you will be charged the cost of the green database, including read replicas and DB instances in Multi-AZ deployments, and any other features such as [Amazon RDS Performance Insights](https://aws.amazon.com/rds/performance-insights/) that you may have enabled on green.\n\nYou can also do the same job in the Amazon Web Services Command Line Interface (Amazon Web Services CLI). To perform an engine version upgrade, simply add a ```targetEngineVersion``` parameter and specify the engine version you’d like to upgrade to. This parameter works with both minor and major version upgrades, and it accepts short versions like ```5.7```\n for Amazon Aurora MySQL-Compatible.\n\n```\n$ aws rds create-blue-green-deployment \\\n--blue-green-deployment-name my-bg-deployment \\\n--source arn:aws:rds:us-west-2:1234567890:db:my-aurora-mysql \\\n--target-engine-version 5.7 \\\n--region us-west-2 \\\n```\n\nAfter creation is complete, you now have a staging environment that is ready for test and validation before promoting it to be the new production environment.\n\nWhen testing and qualification of changes are complete, you can choose **Switch** over in the **Actions** dropdown menu to promote the staging environment marked as **Green** to be the new production system.\n\n![image.png](https://dev-media.amazoncloud.cn/0ab196171b1b462abceffdd92326cd79_image.png)\n\n\nNow you are nearly ready to switch over your green databases to production. Check the settings of your green databases to verify that they are ready for the switchover. You may also set a timeout setting to determine the maximum time limit for your switchover. If Blue/Green Deployments’ switchover guardrails detect that it would take longer than the specified duration, then the switchover is canceled, and no changes are made to the environments. We recommend that you identify times of low or moderate production traffic to initiate a switchover.\n\n![image.png](https://dev-media.amazoncloud.cn/ad2a7876483447c7a6778cfbbd0b0024_image.png)\n\nAfter switchover, Blue/Green Deployments does not delete your old production environment. You may access it for additional validations and performance/regression testing, if needed. Please note that it is your responsibility to delete the old production environment when you no longer need it. Standard billing charges apply on old production instances until you delete them.\n\n![image.png](https://dev-media.amazoncloud.cn/9269ec9fa0f948f08c044492a7fe0545_image.png)\n\n\n### **++Now Available++**\nAmazon RDS Blue/Green Deployments is available today on Amazon Aurora with MySQL Compatibility 5.6 or higher, Amazon RDS for MySQL major version 5.6 or higher, and Amazon RDS for MariaDB 10.2 and higher in all Amazon Web Services commercial Regions, excluding China, and Amazon Web Services GovCloud Regions.\n\nTo learn more, read [Using Amazon RDS Blue/Green Deployments for database updates](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html) in the Amazon Web Services documentation. Give it a try, and please send feedback to [Amazon Web Services re:Post for Amazon RDS](https://repost.aws/tags/TAsibBK6ZeQYihN9as4S_psg/amazon-relational-database-service) or through your usual Amazon Web Services support contacts.\n\n– [Channy](https://twitter.com/)\n\n![image.png](https://dev-media.amazoncloud.cn/97ea1aae57464d25ab8e534deaeef0c3_image.png)\n\n\n### **[Channy Yun](https://aws.amazon.com/blogs/aws/author/channy-yun/)**\nChanny Yun is a Principal Developer Advocate for Amazon Web Services, and passionate about helping developers to build modern applications on latest Amazon Web Services services. A pragmatic developer and blogger at heart, he loves community-driven learning and sharing of technology, which has funneled developers to global Amazon Web Services Usergroups. His main topics are open-source, container, storage, network & security, and IoT. Follow him on Twitter at @channyun.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","render":"<p>When updating databases, using a blue/green deployment technique is an appealing option for users to minimize risk and downtime. This method of making database updates requires two database environments—your current production environment, or blue environment, and a staging environment, or green environment. You must then keep these two environments in sync with each other so you may safely test and upgrade your changes to production.</p>\n<p><a href=\"https://aws.amazon.com/rds/aurora\" target=\"_blank\">Amazon Aurora</a> and <a href=\"https://aws.amazon.com/rds\" target=\"_blank\">Amazon Relational Database Service</a> (Amazon RDS) customers can use database cloning and promotable read replicas to help self-manage a blue/green deployment. However, self-managing a blue/green deployment can be costly and complex to build and manage. As a result, customers sometimes delay implementing database updates, choosing availability over the benefits that they would gain from updating their databases.</p>\n<p>Today, we are announcing the general availability of <strong><a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html\" target=\"_blank\"> Amazon RDS Blue/Green Deployments</a></strong>, a new feature for Amazon Aurora with MySQL compatibility, Amazon RDS for MySQL, and Amazon RDS for MariaDB that enables you to make database updates safer, simpler, and faster.</p>\n<p>With just a few steps, you can use Blue/Green Deployments to create a separate, synchronized, fully managed staging environment that mirrors the production environment. The staging environment clones your production environment’s primary database and in-Region read replicas. Blue/Green Deployments keep these two environments in sync using logical replication.</p>\n<p>In as fast as a minute, you can promote the staging environment to be the new production environment with no data loss. During switchover, Blue/Green Deployments blocks writes on blue and green environments so that the green catches up with the blue, ensuring no data loss. Then, Blue/Green Deployments redirects production traffic to the newly promoted staging environment, all without any code changes to your application.</p>\n<p>With Blue/Green Deployments, you can make changes, such as major and minor version upgrades, schema modifications, and operating system or maintenance updates, to the staging environment without impacting the production workload.</p>\n<h3><a id=\"Getting_Started_with_BlueGreen_Deployments_for_MySQL_Clusters_12\"></a><ins>Getting Started with Blue/Green Deployments for MySQL Clusters</ins></h3>\n<p>You can start updating your databases with just a few clicks in the Amazon Web Services Management Console. To get started, simply select the database that needs to be updated in the console and click <strong>Create Blue/Green Deployment</strong> under the <strong>Actions</strong> dropdown menu.</p>\n<p><img src=\"https://dev-media.amazoncloud.cn/9fe9f180ba144fc7a8c8406ef2fbd3e7_image.png\" alt=\"image.png\" /></p>\n<p>You can set a <strong>Blue/Green Deployment identifier</strong> and the attributes of your database to be modified, such as the engine version, DB cluster parameter group, and DB parameter group for green databases. To use a Blue/Green Deployment in your Aurora MySQL DB cluster, you should <a href=\"https://aws.amazon.com/premiumsupport/knowledge-center/enable-binary-logging-aurora/\" target=\"_blank\">turn on binary logging</a>, changing the value for the<br />\n<code>binlog_format</code>parameter from <code>OFF</code>to <code>MIXED</code><br />\nin the DB cluster parameter group.</p>\n<p><img src=\"https://dev-media.amazoncloud.cn/66c298cde08e496db12fa9cb8b6edcd2_image.png\" alt=\"image.png\" /></p>\n<p>When you choose** Create Blue/Green Deployment**, it creates a new staging environment and runs automated tasks to prepare the database for production. Note, you will be charged the cost of the green database, including read replicas and DB instances in Multi-AZ deployments, and any other features such as <a href=\"https://aws.amazon.com/rds/performance-insights/\" target=\"_blank\">Amazon RDS Performance Insights</a> that you may have enabled on green.</p>\n<p>You can also do the same job in the Amazon Web Services Command Line Interface (Amazon Web Services CLI). To perform an engine version upgrade, simply add a <code>targetEngineVersion</code> parameter and specify the engine version you’d like to upgrade to. This parameter works with both minor and major version upgrades, and it accepts short versions like <code>5.7</code><br />\nfor Amazon Aurora MySQL-Compatible.</p>\n<pre><code class=\"lang-\">$ aws rds create-blue-green-deployment \\\n--blue-green-deployment-name my-bg-deployment \\\n--source arn:aws:rds:us-west-2:1234567890:db:my-aurora-mysql \\\n--target-engine-version 5.7 \\\n--region us-west-2 \\\n</code></pre>\n<p>After creation is complete, you now have a staging environment that is ready for test and validation before promoting it to be the new production environment.</p>\n<p>When testing and qualification of changes are complete, you can choose <strong>Switch</strong> over in the <strong>Actions</strong> dropdown menu to promote the staging environment marked as <strong>Green</strong> to be the new production system.</p>\n<p><img src=\"https://dev-media.amazoncloud.cn/0ab196171b1b462abceffdd92326cd79_image.png\" alt=\"image.png\" /></p>\n<p>Now you are nearly ready to switch over your green databases to production. Check the settings of your green databases to verify that they are ready for the switchover. You may also set a timeout setting to determine the maximum time limit for your switchover. If Blue/Green Deployments’ switchover guardrails detect that it would take longer than the specified duration, then the switchover is canceled, and no changes are made to the environments. We recommend that you identify times of low or moderate production traffic to initiate a switchover.</p>\n<p><img src=\"https://dev-media.amazoncloud.cn/ad2a7876483447c7a6778cfbbd0b0024_image.png\" alt=\"image.png\" /></p>\n<p>After switchover, Blue/Green Deployments does not delete your old production environment. You may access it for additional validations and performance/regression testing, if needed. Please note that it is your responsibility to delete the old production environment when you no longer need it. Standard billing charges apply on old production instances until you delete them.</p>\n<p><img src=\"https://dev-media.amazoncloud.cn/9269ec9fa0f948f08c044492a7fe0545_image.png\" alt=\"image.png\" /></p>\n<h3><a id=\"Now_Available_52\"></a><strong><ins>Now Available</ins></strong></h3>\n<p>Amazon RDS Blue/Green Deployments is available today on Amazon Aurora with MySQL Compatibility 5.6 or higher, Amazon RDS for MySQL major version 5.6 or higher, and Amazon RDS for MariaDB 10.2 and higher in all Amazon Web Services commercial Regions, excluding China, and Amazon Web Services GovCloud Regions.</p>\n<p>To learn more, read <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html\" target=\"_blank\">Using Amazon RDS Blue/Green Deployments for database updates</a> in the Amazon Web Services documentation. Give it a try, and please send feedback to <a href=\"https://repost.aws/tags/TAsibBK6ZeQYihN9as4S_psg/amazon-relational-database-service\" target=\"_blank\">Amazon Web Services re:Post for Amazon RDS</a> or through your usual Amazon Web Services support contacts.</p>\n<p>– <a href=\"https://twitter.com/\" target=\"_blank\">Channy</a></p>\n<p><img src=\"https://dev-media.amazoncloud.cn/97ea1aae57464d25ab8e534deaeef0c3_image.png\" alt=\"image.png\" /></p>\n<h3><a id=\"Channy_Yunhttpsawsamazoncomblogsawsauthorchannyyun_62\"></a><strong><a href=\"https://aws.amazon.com/blogs/aws/author/channy-yun/\" target=\"_blank\">Channy Yun</a></strong></h3>\n<p>Channy Yun is a Principal Developer Advocate for Amazon Web Services, and passionate about helping developers to build modern applications on latest Amazon Web Services services. A pragmatic developer and blogger at heart, he loves community-driven learning and sharing of technology, which has funneled developers to global Amazon Web Services Usergroups. His main topics are open-source, container, storage, network &amp; security, and IoT. Follow him on Twitter at @channyun.</p>\n"}
目录
亚马逊云科技解决方案 基于行业客户应用场景及技术领域的解决方案
联系亚马逊云科技专家
亚马逊云科技解决方案
基于行业客户应用场景及技术领域的解决方案
联系专家
0
目录
关闭