v2 (ECS) Updating Convox Managed RDS Resource Versions
Introduction
If you’re a Convox user utilizing our convox.yml
managed RDS instances, you might have received notifications from Amazon RDS about Extended Support. This blog post will guide you on how to effectively update your RDS resources in line with Convox best practices.
Understanding the Issue
Many users opt to manually update their RDS instances via AWS (often referred to as ClickOps). However, it’s crucial to understand how this affects your Convox deployment. When you manually update the RDS resource in AWS, CloudFormation might later attempt to downgrade it to the version specified in your convox.yml
, or to Convox’s default version if none is set.
The default resource versions as of this blog’s publishing:
memcached | 1.4.34 |
mariadb | 10.4 |
mysql | 5.7.22 |
postgres | 12 |
redis | 2.8.24 |
Please refer to our Resources Documentation for updated default version information.
The Convox Approach
The recommended practice is to update the version in the options section of your convox.yml
. This ensures that your RDS resource version remains consistent with your Convox configuration.
Example convox.yml
Configuration yaml
resources:
mydb:
type: postgres
options:
version: 12
storage: 100
services:
web:
resources:
- mydb
In this example, we define a PostgreSQL database named mydb with a specific version and storage size. This resource is then linked to a web service.
AutoMinorVersionUpgrade and Its Usage
When updating RDS versions in your convox.yml
, be aware of the AutoMinorVersionUpgrade
Application Parameter. This app parameter, enabled by default, allows your database to automatically update to the latest minor version during its AWS Maintenance Window. However, now that you will be specifying a version in the convox.yml
, e.g. 10.2.1, AutoMinorVersionUpgrade
could lead to a conflict during deployment if the minor version specified in the convox.yml
doesn’t match the newly updated minor version. If you do not specify a minor version, e.g. 10.2, you will not experience this potential conflict due to AutoMinorVersionUpgrade
To maintain consistency, consider disabling AutoMinorVersionUpgrade if you’re specifying exact minor versions within the convox.yml
, ensuring your RDS instance stays at the version defined without automatically upgrading. This approach helps manage version control effectively while maintaining best practices with Convox for RDS resource management.
The Risk of Manual Updates
It’s important to highlight that manually updated versions may remain unaffected until the portion of the convox.yml
related to the resource is modified. This triggers the nested stack controlling the RDS resource to update. However, this practice is not advised as it can lead to inconsistencies and potential issues.
Conclusion
In summary, while AWS offers the flexibility to update RDS resources directly, it is strongly advised to manage these updates through your convox.yml
. This ensures that your Convox deployment remains consistent and stable. Always remember to manage your AutoMinorVersionUpgrade
application parameter to align with your conditions and needs.