Notes Decommnamespace
Cleaning up Deleted Namespace
Check NS Deletion
oc get ns | grep dgf
Check For Common Items (Routes, Services, Deployments, Etc.)
oc get -n dgf-edm-us-prd all
oc get -n dgf-edm-us-prod all
Service Accounts (including Cloudmgmt)
oc get sa -A
oc delete sa svc-its-pjoslin-test-admin
oc delete -n cloudmgmt sa svc-its-pjoslin-test-admin
oc delete -n cloudmgmt sa svc-dgf-edm-us-dmz-prod
oc delete -n cloudmgmt sa svc-dgf-edm-us-prod
oc get sa -A | grep dgf
Rolebindings
oc get rolebinding -A
oc get rolebinding -A | grep dgf
Roles and ClusterRoles
oc get roles -A | grep dgf
oc get clusterroles -A | grep dgf
for i in $(oc get clusterrolebindings -A | grep dgf | cut -d" " -f1);
do
echo $i;
oc get -o yaml clusterrolebindings $i | oc neat -f - > ${i}.yaml;
oc delete clusterrolebindings $i;
done
oc get clusterrolebindings. -A | grep dgf
Quotas
oc get clusterresourcequotas.quota.openshift.io
oc delete clusterresourcequotas.quota.openshift.io quota-svc-dgf-edm-us-prod
oc delete clusterresourcequotas.quota.openshift.io quota-svc-dgf-edm-us-dmz-prod
Groups - Discuss With PAAS Team
oc get groups | grep dgf
oc get groups | grep -i OCPTeam
Might Want To Save For Reuse
for i in $(oc get groups | grep OCPTeam-dgf | cut -d" " -f 1)
do
oc get group -o yaml $i | oc neat -f - > ${i}.yaml &&
oc delete $i
done
Omc
The Book of Knowledge
OMC
omc tool has been created to allow engineers to inspect resources from a must-gather in the same way as they are retrieved with the oc command.
Usage:
omc [flags]
omc [command]
Available Commands:
certs Inspect cluster certificates.
collect-crd Collect CRDs from your running cluster to ~/.omc/customresourcedefinitions/* .
completion Generate the autocompletion script for the specified shell
config
describe Show details of a specific resource or group of resources
etcd Shows etcd health and status.
get Get kubernetes/openshift object in tabular format or wide|yaml|json|jsonpath|custom-columns.
haproxy Inspect haproxy config.
help Help about any command
logs Print the logs for a container in a pod
machine-config
mg List or delete previously used must-gathers.
node-logs Display and filter node logs.
ovn
project Switch to another project
projects List all available projects
prometheus
upgrade Upgrade omc.
use Select the must-gather to use
version Print omc version
Flags:
-h, --help help for omc
-n, --namespace string If present, list the requested object(s) for a specific namespace.
-v, --v Level number for the log level verbosity
Use "omc [command] --help" for more information about a command.
Us Ocp Net
The Book of Knowledge
US OpenShift Container Platform Networking
Ingress Ranges
| Cluster | Network | Ingress Ranges |
|---|---|---|
| USQAS | Prod-int | usqaslspc005325 usqaslspc005326 |
| USQAS | Test-int | usqaslspc005625 usqaslspc005626 |
| USQAS | Prod-dmz | usqaslspc005440 usqaslspc005441 |
| USQAS | Test-dmz | usqaslspc005740 usqaslspc005741 |
| USQAS | ——— | ——————————— |
usmeglspc005225.phx-dc.dhl.com | 7.245.22.12 usmeglspc005226.phx-dc.dhl.com | 7.245.22.13 usmeglspc005283.phx-dc.dhl.com | 156.137.229.12 usmeglspc005284.phx-dc.dhl.com | 156.137.229.13 usqaslspc005325.phx-dc.dhl.com | 7.244.168.12 usqaslspc005326.phx-dc.dhl.com | 7.244.168.13 usqaslspc005440.phx-dc.dhl.com | 156.137.125.12 usqaslspc005441.phx-dc.dhl.com | 156.137.125.13 usqaslspc005625.phx-dc.dhl.com | 156.137.93.12 usqaslspc005626.phx-dc.dhl.com | 156.137.93.13 usqaslspc005740.phx-dc.dhl.com | 156.137.124.12 usqaslspc005741.phx-dc.dhl.com | 156.137.124.13
Btfix
Red Hat Bluetooth Tips & Tricks
If Bluetooth Does Not Show Up In Settings App
As root:
Ensure Bluetooth Is Available
# rfkill
ID TYPE DEVICE SOFT HARD
0 wlan phy0 unblocked unblocked
5 bluetooth hci0 unblocked unblocked
If bluetooth is shown as blocked
# rfkill unblock bluetooth
Check For Target Device
# bluetoothctl devices
Device FC:A8:9A:D2:BA:6C HK Onyx Studio 3
For Some Reason, You Have To Restart The Service Twice
# systemctl restart bluetooth.service
# systemctl restart bluetooth.service
# systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: enabled)
Active: active (running) since Thu 2024-10-24 08:59:35 EDT; 6s ago
Docs: man:bluetoothd(8)
Main PID: 1732846 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 99054)
Memory: 832.0K
CPU: 35ms
CGroup: /system.slice/bluetooth.service
└─1732846 /usr/libexec/bluetooth/bluetoothd
Oct 24 08:59:35 tmp5768 bluetoothd[1732846]: Endpoint registered: sender=:1.5192 path=/MediaEndpoint/A2DPSink/sbc
Oct 24 08:59:35 tmp5768 bluetoothd[1732846]: Endpoint registered: sender=:1.5192 path=/MediaEndpoint/A2DPSource/sbc
...
Apigeeprg
Accessing APIGEE PRG Clusters
Apigee Bastion Host
# Note that ans is not used -
$ swrap apigwaaa@czcholstc003532.prg-dc.dhl.com
sw apigwaaa@czcholstc003532.prg-dc.dhl.com date
Warning: Permanently added 'czcholstc003532.prg-dc.dhl.com,2.253.207.77' (ECDSA) to the list of known hosts.
* USAGE WARNING *
This computer system, including all equipment and
...
# apigwaaa is used only to access the node. User is apig.
$ sudo su - apig
Last login: Thu Feb 15 14:59:04 CET 2024 on pts/2
Value of TERM has been set to "tmux-256color".
Timeout is set to 300 seconds.
---- you are working on Virtual vmware server ----
Canned
The Book of Knowledge
Canned.md
Best Canned Response Templates for Customer Support Emails
Acknowledge Receipt of Customer Email
Hello [Customer Name],
Thank you for reaching out to us. We are working on your issue ([Incident ID]) and will get back to you soon. Please let us know if you have any more questions. We will be happy to help.
Clusterdb
The Book of Knowledge
ClusterDB.md
| CODE | CLUSTER | DESCRIPTION | BASTION | BASTION_IP |
|---|---|---|---|---|
| CBJ_DR | mytpmocp001 | CBJ TEST | mytpmlspc005204.apis.dhl.com | 23.253.61.47 |
| CBJ_PROD | mykulocp001 | CBJ PROD | mykullspc005304.apis.dhl.com | 23.252.214.47 |
| PRG_APG_CBJ | mykulocp002 | Apigee - Express PRG CBJ | mykullspc005025.apis.dhl.com | 23.252.212.6 |
| PRG_APG_PROD | czchoocp002 | Apigee - Express PRG PROD | czcholspc004281.prg-dc.dhl.com | 2.255.0.11 |
| PRG_APG_TEST | czchooct004 | Apigee - Express PRG TEST | czcholstc005900.prg-dc.dhl.com | 2.246.232.11 |
| PRG_API_PROD | czchoocp003 | ITS Api PRG PROD | czcholspc004281.prg-dc.dhl.com | 2.255.0.11 |
| PRG_CNB | czchooct999 | PRG Crash and Burn | czcholstc005504.prg-dc.dhl.com | 2.253.201.112 |
| PRG_DED_POC | czchooct888 | Dedicated Clusters POC PRG | czcholstc005001.prg-dc.dhl.com | 2.253.201.70 |
| PRG_DR | czstlocp001 | PRG DR | czstllspc005204.prg-dc.dhl.com | 2.253.115.175 |
| PRG_MQ_DR | czstlocp002 | PRG DR ITS IBM MQ | czstllspc005471.prg-dc.dhl.com | 2.180.6.11 |
| PRG_MQ_PROD | czchoocp004 | ITS IBM MQ PRG PROD | czcholspc004281.prg-dc.dhl.com | 2.255.0.11 |
| PRG_MQ_TEST | czchooct005 | ITS IBM MQ PRG TEST | czcholstc005900.prg-dc.dhl.com | 2.246.232.11 |
| PRG_POC | czchooct001 | PRG Proof of Concept | czcholstc005041.prg-dc.dhl.com | 2.253.200.86 |
| PRG_PROD | czchoocp001 | PRG PROD | czcholspc004404.prg-dc.dhl.com | 2.252.70.48 |
| PRG_TEST | czchooct002 | PRG TEST | czcholstc005204.prg-dc.dhl.com | 2.253.159.48 |
| US_DR | usmegocp001 | US DR | usmeglspc005204.phx-dc.dhl.com | 7.245.23.15 |
| US_EDM_PROD | usqasocp002 | US Ded EDM Prod | usqaslspc005871.phx-dc.dhl.com | 7.244.10.11 |
| US_EDM_TEST | usqasoct003 | US Ded EDM Test | usqaslspc005871.phx-dc.dhl.com | 7.244.10.11 |
| US_PROD | usqasocp001 | US PROD | usqaslspc005304.phx-dc.dhl.com | 7.244.169.15 |
| US_TEST | usqasoct002 | US Test | usqaslspc005304.phx-dc.dhl.com | 7.244.169.15 |
| [//]: # ( vim: set ai et nu sts=2 sw=2 ts=2 tw=100 filetype=markdown :) |
Clusterlist
Book of Knowledge
OpenShift Clusters at DHL
Clusters
Version 4
Example
oc login --token=sha256~qYB9ZtYrp0sqYUMNL_M4cjnA_35_uDy02ZYeMGnt02w --server=https://api.czchooct001:6443
oc whoami
--show-console=false: If true, print the current server's web console URL
-c, --show-context=false: Print the current user context name
--show-server=false: If true, print the current server's REST API URL
-t, --show-token=false: Print the token the current session is
using. This will return an error if you are using a different form of authentication.
Utility Nodes
| Cluster | User | Host |
|---|---|---|
| CBJ_DR | ans | mytpmlspc005204.apis.dhl.com |
| CBJ_PROD | ans | mykullspc005304.apis.dhl.com |
| PRG_CNB | ans | czcholstc005504.prg-dc.dhl.com |
| PRG_DR | ans | czstllspc005204.prg-dc.dhl.com |
| PRG_POC | ans | czcholstc005041.prg-dc.dhl.com |
| PRG_PROD | ans | czcholspc004404.prg-dc.dhl.com |
| PRG_TEST | ans | czcholstc005204.prg-dc.dhl.com |
| US_DR | ans | usmeglspc005204.phx-dc.dhl.com |
| US_EDM_PROD | ans | usqaslspc005871.phx-dc.dhl.com |
| US_EDM_TEST | ans | usqaslspc005871.phx-dc.dhl.com |
| US_PROD | ans | usqaslspc005304.phx-dc.dhl.com |
| US_TEST | ans | usqaslspc005304.phx-dc.dhl.com |
| None | None | czcholspc002815 Kafka Support |
Devops
The Book of Knowledge
DevOps.md
DevSecOps Tips and Tricks
Artifactory & Docker
$ docker login dhlecsam-docker-dev-fd.artifactory-us.dhl.com -u USERNAME
$ docker tag NAME:VERSION dhlecsam-docker-dev-fd.artifactory-us.dhl.com/devops/NAME:VERSION
$ docker push dhlecsam-docker-dev-fd.artifactory-us.dhl.com/devops/NAME:VERSION
Removing Signatures
If you get the “Error: Copying this image would require changing layer representation, which we cannot do: Would invalidate signatures” error message, there are two solutions, according to this RH Knowledgebase Article.
-
Using
skopeo copyorskopeo sync. This is also more efficient, since it doesn’t uncompress or unpack the artifact.skopeo sync --src docker --dest docker SRC_REPO/NAME:VERSION DEST_REPO/NAME:VERSION.
Dotfiles
The Book of Knowledge
Dotfiles.md
LinuxDotfiles - DotFiles For Linux/Unix Accounts
Directory Structure
- Bin/ - Tools
- PerfBin/ - Performance Tools
- PersonalTools/ - Notes To Self, Non-work Tools
- Projects/ - Stuff I’m Working On. Edit .gitignore If You Want Projects added To Repo.
- TextBin/ - Tools To Modify Files, Often Using Vim
- .ssh - SSH Public Keys
- .vim - Vim Customization
Installing On A New Server
Requires Git, .ssh/id_github
Create a bare git repository in $HOME/.cfg. A bare repo stores its files in its base directory, not its subdirectory .git. You’ll tell git to ignore that directory. You’ll need your ssh key for the repo to clone it.