Blame docs/operations/ci/graceful_shutdown_ocp_cluster.md

47c289
# Graceful Shutdown of an Openshift 4 Cluster
47c289
This SOP should be followed in the following scenarios:
47c289
47c289
- Shutting down an Openshift 4 cluster. 
47c289
47c289
47c289
## Steps
47c289
47c289
Prequisite steps:
47c289
- Follow the SOP for cordoning and draining the nodes.
47c289
- Follow the SOP for creating an `etcd` backup.
47c289
47c289
47c289
1. Get the nodes
47c289
47c289
```
47c289
nodes=$(oc get nodes -o name  | sed -E "s/node\///")
47c289
```
47c289
47c289
2. Shutdown the nodes from the administration box associated with the cluster eg prod/staging.
47c289
47c289
```
68716f
for node in ${nodes[@]}; do ssh -i ~/ocp_backups/.backup.key core@$node sudo shutdown -h now; done
47c289
```
47c289
47c289
47c289
### Resources
47c289
47c289
- [1] [Graceful Cluster Shutdown](https://docs.openshift.com/container-platform/4.5/backup_and_restore/graceful-cluster-shutdown.html)