Introduction
At times it may become necessary to manually stop a single node in a Terraform Enterprise active/active deployment.
Expected Outcome
The steps below will facilitate a graceful shutdown of an active/active node
Prerequisites
- A Terraform Enterprise instance running in an active/active configuration
Procedure
-
Login to a node in the Active/Active cluster using SSH
-
Run the command from the command line
# tfe-admin node-drain
Note:
This command will quiesce the current node and remove it from service. It will allow current work to complete and safely stop the node from picking up any new jobs from the Redis queue, allowing the application to be safely stopped. Currently, it only affectslocalhost
(it does not support running on one node to drain other nodes). Currently, there is no reverse drain command - a restart is needed to restore the node.
Additional Information
-
The
# tfe-admin node-drain
command is, currently, only available in in active/active deployment of Terraform Enterprise. - More information on active/active administration can be read in this location