Introduction
This article is aimed to provide quick tips for Terraform Enterprise admins who are planning to upgrade their instance to a later version when utilizing with Auto Scaling Groups.
Recommendation
- Pin your Terraform Enterprise version. Either within the
/etc/replicated.conf
file with the ReleaseSequence Flag or by specifying it within your ASG's Launch Template to call the installer script with the release-sequence flag.sudo bash ./install.sh release-sequence=642
. Pinned installations prevent unexpected upgrades in the event a new instance is created by the ASG. - When planning to upgrade your Terraform Enterprise instance, please temporarily disable the ASG health check or change the timeout duration to something longer than expected (ex, 30 minutes). This prevents the ASG from reinstalling the original version while in the middle of the upgrade.
- If your Terraform Enterprise instance is multiple versions from the target upgrade, please navigate to the Terraform Enterprise Release notes documentation. The overview page will denote which releases are marked as *Required*, this is important when determining how many *Required* upgrades need to be hit in order to get to your latest version which will dictate how long the full upgrade process could take.
- If you do not have access to the Replicated Dashboard on port 8800, you can use the following commands to unpin your TFE version, list available updates, and apply an update using the command line.
-
$ replicatedctl params set ReleaseSequence --value '0'
Param set successfully
$ 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
609 v202204-1 2022-04-19 16:10:29 +0000 UTC 0001-01-01 00:00:00 +0000 UTC false
607 v202203-1 2022-03-23 18:22:48 +0000 UTC 0001-01-01 00:00:00 +0000 UTC false
599 v202202-1 2022-02-23 18:18:16 +0000 UTC 0001-01-01 00:00:00 +0000 UTC false
595 v202201-2 2022-02-08 21:03:26 +0000 UTC 0001-01-01 00:00:00 +0000 UTC false
594 v202201-1 0001-01-01 00:00:00 +0000 UTC 2022-08-09 21:54:07.906597655 +0000 UTC false
$ replicatedctl app-release apply --sequence 610
App is updating