Speed delivery with Red Hat Ansible and OpenShift 4
\\\\\\\
\\\\\\\\\\\\
\\\\\\\\\\\\\\\
-----------,-| |C> // )\\\\|
,','| / || ,'/////|
---------,',' | (, || /////
|| | \\ ||||//''''|
Red Hat || | ||||||| _|
OpenShift|| |______ `````\____/ \
4 || | ,| _/_____/ \
|| ,' ,' | / |
||,' ,' | | YOU \ |
_________|/ ,' | / | |
_____________,' ,',_____| | | |
| ,',' | | | |
| ,',' ____|_____/ / |
| ,',' __/ | / |
_____________|',' ///_/-------------/ |
|===========,'
- Red Hat OpenShift 4.6.17 using vSphere UPI
- VMware vSphere 7.0.1 build: 17005016
- Bastion
- Red Hat Enterprise Linux 7.9
- Red Hat Ansible 2.9.15
- Python 3.6.8
- ETCD Backup -
ansible-playbook backup-etcd.yml
- YouTube: https://youtu.be/hVijextRADs
- ETCD Health Check Report -
ansible-playbook healthcheck-etcd.yml
- YouTube: https://youtu.be/FGwCmCuQNrg
- ETCD Disk Performance Report -
ansible-playbook check-disk-performance-etcd.yml
- YouTube: https://youtu.be/6qjsh9J3ndM
- Use
ionice
to set high i/o priority for etcd process -ansible-playbook ionice-etcd.yml
- Run commands to multiple nodes within one command -
./shell.sh "timedatectl | grep -i "Local time""
- Run commands to multiple nodes with prompt mode -
ansible-playbook shell_prompt.yml
- Add Machineset on vSphere -
ansible-playbook add-vsphere-machineset.yml
- Add MachineHealthCheck -
ansible-playbook add-machinehealthcheck.yml
- YouTube: https://youtu.be/ZT1IWEiw-EY
- Add MachineAutoScaler -
ansible-playbook add-machineautoscaler.yml
- YouTube: https://youtu.be/vWrJ-NCO2oc
- Add ClusterAutoScaler -
ansible-playbook add-clusterautoscaler.yml
- Causing a Scaling Event for testing purpose -
./force-node-scaling-event.sh
- Reboot OpenShift cluster gracefully -
ansible-playbook graceful-ocp4-reboot.yml
- YouTube: https://youtu.be/G7XTY7TXltE
- Shutting down the cluster gracefully -
ansible-playbook graceful-ocp4-shutdown.yml
- YouTube: https://youtu.be/Q6rv2bLXoNA
- Add new account and identity provider -
ansible-playbook add-ocp4-account.yml
- Disable default account
kubeadmin
-ansible-playbook remove-kubeadmin.yml
- Pull Audit Log
- Check System Time - `ansible-playbook
- check-system-time.yml`
- Change Timezone -
ansible-playbook config-time-service.yml
- Add API server certificates
- Install NFS Suvbdir External Provisioner
- Save container images to tar archive -
ansible-playbook save-containe-images.yml
- deadman is an observation software for host status using ping. -
ansible-playbook monitoring-host-reboot.yml
- Kubeeye
- Edit
hosts
,ansible.cfg
and put your own environment setting first - Use
ansible-playbook pingpong.yml
to connect to host and verify a usable python interpreter - (Optioanl)
pip3 install -r requirements.txt
- Do anything you want to do
Date | Status | OpenShift Version | Ansible Version | Bastion OS Version |
---|---|---|---|---|
20240126 | OK | 4.12.27 | 2.16.2 | RHEL 9.3 |
20210222 | OK | 4.6.1 | 2.9.15 | RHEL 7.9 |
20210220 | OK | 4.6.17 | 2.9.15 | RHEL 7.9 |
20210220 | OK | 4.6.16 | 2.4.2.0 | RHEL 7.9 |
20210220 | OK | 4.5.31 | 2.4.2.0 | RHEL 7.9 |
python3 -m venv .venv
ansible-galaxy collection install kubernetes.core:3.0.0 --force
pip install -r ~/.ansible/collections/ansible_collections/kubernetes/core/requirements.txt