Introduction
Replicated is the service that manages the Terraform Enterprise application. Replicated provides a CLI tool called replicatedctl
to control various aspects of both the Replicated service and Terraform Enterprise. One such feature is the ability to stop and start the Terraform Enterprise application from a terminal.
Use Case
It certain situations it may be necessary to restart the Terraform Enterprise application. The procedure to restart and monitor the service is described below.
Procedure
Monitoring
To view detailed information on the status of Terraform Enterprise use replicatedctl app status
. This will display the current State
of the application as well as the DesiredState
which displays the expected State
.
$ replicatedctl app status
[
{
"AppID": "76519cce25564f315111cf0030829e3d",
"Sequence": 421,
"PatchSequence": 0,
"State": "started",
"DesiredState": "started",
"Error": "",
"IsCancellable": false,
"IsTransitioning": false,
"LastModifiedAt": "2020-04-23T10:44:19.34554991Z"
}
]
Restarting
To stop Terraform Enterprise use the replicatedctl app stop
command. This command is equivalent to logging into the Replicated console on port 8800 and clicking the “Stop Now” button.
$ replicatedctl app stop
App is stopping
During this time, the application State
will be transitioning to stopped
. You can monitor this status by running replicatedctl app status
.
$ replicatedctl app status
[
{
"AppID": "76519cce25564f315111cf0030829e3d",
"Sequence": 421,
"PatchSequence": 0,
"State": "stopped",
"DesiredState": "stopped",
"Error": "",
"IsCancellable": true,
"IsTransitioning": true,
"LastModifiedAt": "2020-04-23T15:14:09.478403054Z"
}
]
Once you have verified that the application state is stopped, issue the replicatedctl app start
command to start the application. This command is equivalent to logging into the Replicated console on port 8800 and clicking the “Start Now” button.
$ replicatedctl app start
App is starting
Once again, monitor the State
of the application by running replicatedctl app status
. Once the application has fully started, the State
value will be started
.
$ replicatedctl app status
[
{
"AppID": "76519cce25564f315111cf0030829e3d",
"Sequence": 421,
"PatchSequence": 0,
"State": "started",
"DesiredState": "started",
"Error": "",
"IsCancellable": false,
"IsTransitioning": false,
"LastModifiedAt": "2020-04-23T15:14:19.34554991Z"
}
]