ocp4 sops moved into sysadmin_guide

Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
This commit is contained in:
David Kirwan 2024-07-22 10:37:01 +01:00
parent 1d17fd8610
commit c0d6947dba
No known key found for this signature in database
GPG key ID: A5893AB6474AC37D
35 changed files with 1 additions and 1 deletions

View file

@ -0,0 +1,30 @@
= Graceful Shutdown of an Openshift 4 Cluster
This SOP should be followed in the following scenarios:
- Graceful full shut down of the Openshift 4 cluster is required.
== Steps
Prequisite steps:
- Follow the SOP for cordoning and draining the nodes.
- Follow the SOP for creating an `etcd` backup.
1. Connect to the `os-control01` host associated with this ENV. Become root `sudo su -`.
2. Get a list of the nodes
+
----
nodes=$(oc get nodes -o name | sed -E "s/node\///")
----
3. Shutdown the nodes from the administration box associated with the cluster `ENV` eg production/staging.
+
----
for node in ${nodes[@]}; do ssh -i /root/ocp4/ocp-<ENV>/ssh/id_rsa core@$node sudo shutdown -h now; done
----
=== Resources
- [1] https://docs.openshift.com/container-platform/4.5/backup_and_restore/graceful-cluster-shutdown.html[Graceful Cluster Shutdown]