Introduction
This article provides recommendations for Terraform Enterprise administrators who manage instances using Auto Scaling Groups (ASGs), particularly when planning an upgrade.
Recommendations
Recommendation 1: Pin the Terraform Enterprise Version
Pinning the Terraform Enterprise version prevents unexpected upgrades if an Auto Scaling Group launches a new instance. You can pin the version in the /etc/replicated.conf file using the ReleaseSequence flag or by specifying the flag in your ASG's Launch Template installer script.
# sudo bash ./install.sh release-sequence=642
Recommendation 2: Disable Auto Scaling Group Health Checks During Upgrades
When you are ready to upgrade your Terraform Enterprise instance, temporarily disable the ASG health check or increase its timeout duration significantly (for example, to 30 minutes). This action prevents the ASG from terminating the instance in the middle of an upgrade and reinstalling the original version.
Recommendation 3: Plan for Required Intermediate Upgrades
If your Terraform Enterprise instance is several versions behind the target version, consult the Terraform Enterprise Release notes. The overview page indicates which releases are marked as Required. You must install all required intermediate versions, which may extend the total upgrade time.
Recommendation 4: Manage Upgrades from the Command Line
If you do not have access to the Replicated console on port 8800, you can manage the upgrade process using replicatedctl commands.
-
Unpin the current Terraform Enterprise version by setting the
ReleaseSequencevalue to0.$ replicatedctl params set ReleaseSequence --value '0' ## Param set successfully
-
List the available releases to identify the sequence number for your target version.
$ replicatedctl app-release ls ## SEQUENCE VERSION RELEASE DATE INSTALL DATE REQUIRED ## 642 v202207-2 2022-07-15 19:07:44 +0000 UTC 0001-01-01 00:00:00 +0000 UTC true ## 641 v202207-1 2022-07-13 18:29:55 +0000 UTC 0001-01-01 00:00:00 +0000 UTC false ## 636 v202206-1 2022-06-15 17:06:41 +0000 UTC 0001-01-01 00:00:00 +0000 UTC false ## 619 v202205-1 2022-05-17 19:58:06 +0000 UTC 0001-01-01 00:00:00 +0000 UTC false ## 610 v202204-2 2022-04-20 22:47:26 +0000 UTC 0001-01-01 00:00:00 +0000 UTC true ## ...
-
Apply the update using the desired sequence number.
$ replicatedctl app-release apply --sequence 610 ## App is updating