Introduction
The Terraform Enterprise application is distributed and installed using Replicated. In order to receive the latest bug fixes and features, Replicated will need to be periodically upgraded to the latest version. The process for upgrading Replicated differs slightly depending on whether Terraform Enterprise is configured as an online or airgap installation; both of which are detailed below.
Because the upgrade process only affects the underlying Replicated service and not the Terraform Enterprise application itself, upgrades may be performed without causing application downtime.
Note: For each of the following processes, you will be need to pass the same flags as were passed during the initial installation. If you do not pass the same flags, you may be asked a series of questions to help ensure Replicated is properly configured. These questions are outlined below. When the script has completed, it will output a message to continue the installation at
https://<TFE HOSTNAME>:8800
. For the purposes of updating Replicated, this step is not necessary.
Procedure
Individual installations
Verifying the Replicated version
The currently installed version of Replicated can be verified by connecting to the instance and running the following command:
$ replicated -version
It is recommended to check the version before and after the upgrade process in order to verify that the upgrade was successful.
Upgrade: Online Installations
When running in online mode, Replicated will automatically be upgraded during Terraform Enterprise upgrades.
Alternatively, Replicated can be upgraded independently using the following steps:
-
Connect to the Terraform Enterprise host using SSH.
-
Download the latest installer script by running the following command.
$ curl -sSL -o install.sh https://install.terraform.io/ptfe/stable
-
Make the installer executable.
$ sudo chmod +x ./install.sh
-
Run the installer script as the superuser.
$ sudo ./install.sh
Upgrade: Airgap Installations
When running in airgap mode, Replicated can be upgraded using the following steps:
-
On a machine with internet access, download the latest version of the Replicated airgap installer using the following command.
$ curl -sSL -o latest.tar.gz https://install.terraform.io/airgap/latest.tar.gz
-
Move the resulting file to the Terraform Enterprise host.
-
Connect to the Terraform Enterprise host using SSH.
-
Extract the contents of the
latest.tar.gz
usingtar
.$ tar xvf latest.tar.gz
-
As the superuser, run the installer script with the
airgap
argument.$ sudo ./install.sh airgap
Active/Active installations
When running Terraform Enterprise in Active/Active mode, the application is installed using the automated installation method. Due to this difference, it is not recommended to manually upgrade Replicated using the methods described above. Instead, the active instances should be destroyed and allowed to be replaced by the autoscaling group. When the reinstallation occurs, Replicated will be automatically upgraded.
For airgap installations, it may be necessary to update the autoscaling group configuration to ensure that the newer .airgap
file is present and used before allowing the instances to be destroyed and replaced.
Additional Information
The installer will automatically detect many of the settings used during the initial installation, but will request additional information that it may need. It is important that the input given to any prompt match what was given at install time. Some common prompts are:
The service address that should be used. This may be automatically detected, but in some scenarios the installer may request confirmation.
The installer will use service address '52.88.50.149' (discovered from EC2 metadata service)
The installer has automatically detected the service IP address of this machine as 52.88.50.149.
Do you want to:
[0] default: use 52.88.50.149
[1] enter new address
Enter desired number (0-1):
The private IP address and associated network interface. Generally speaking, the physical network interface and corresponding internal IP address should be used. In the below example, this is [0] eth0
.
The installer was unable to automatically detect the private IP address of this machine.
Please choose one of the following network interfaces:
[0] eth0 10.0.2.15
[1] docker0 172.17.0.1
Enter desired number (0-1):
Whether or not the instance requires a proxy in order to connect to the internet.
Does this machine require a proxy to access the Internet? (y/N)
Note that if you have configured http_proxy
and no_proxy
already, the installer will use these settings and log a line similar to:
[INFO] Docker is set with http proxy "http://10.0.7.236:3128" and no proxy "10.0.0.0/8,10.0.6.45,10.0.7.32………”