Introduction
This guide outlines the process of upgrading Active/Active Terraform Enterprise (TFE) instances to the required versions.
Note: This process will require application downtime
Expected Outcome
-
Successfully upgrade TFE Active/Active instances
-
Minimize downtime
Prerequisites
-
Verify compatibility of PostgreSQL and Docker versions before starting the upgrade.
-
Review the Terraform Enterprise Releases page to:
-
Identify required intermediate releases (marked with
*
) -
Determine the release sequence for your target version
-
Backup
Before starting the upgrade, ensure the following backups are taken:
-
Database Backup
-
Object Storage Backup
-
Compose or Helm Values Files
Recommended Pattern:
Follow the Terraform Enterprise Backup - Recommended Pattern for best practices.
Upgrade Use Cases
1. Active-Active Docker Setup
Steps:
-
Backup
-
Take a backup of
compose.yaml
.
-
-
Stop Applications (Both Nodes)
This command allows current operations to complete and safely stops new plan/apply executions.
-
Shut Down Containers on Both Nodes
Ensure no application containers are running.
Upgrade Node 1:
-
Update
compose.yaml
: -
Start the application:
-
Validate
-
Confirm the UI is accessible
-
Perform test Terraform runs
-
-
If issues occur:
-
Use the backup of
compose.yaml
to rollback -
Redeploy the previous version
-
-
Stop Node 1 application again before upgrading Node 2
Upgrade Node 2:
-
Update
compose.yaml
: -
Start the application:
-
Do not start Node 2 with the old version if Node 1 upgrade fails.
-
Rollback Node 1 first, then bring it back up before starting Node 2.
2. Active-Active Kubernetes Setup (Helm Chart)
Steps:
-
Backup Configuration
-
Backup
overrides.yaml
orvalues.yaml
.
-
-
Access the Kubernetes Cluster (via Bastion or local machine)
-
Scale Down Application
-
Set replicas to 0 in the YAML file:
-
Apply the changes.
-
-
Update Image and Scale Up
-
Start Application
-
Deploy the updated Helm chart
-
-
Validate
-
Ensure application is fully up and functional
-
-
Scale As Needed
-
Increase
replicaCount
based on your requirements
-
-
Rollback (if needed)
-
Use the backup of your YAML file to redeploy the previous version
-
Additional Information
-
Please refer this page