Skip to content

Instantly share code, notes, and snippets.

View dlbewley's full-sized avatar
📺

Dale Bewley dlbewley

📺
View GitHub Profile
@dlbewley
dlbewley / View OVS Bridge Mappings
Last active January 21, 2025 07:37
List the OVS bridge mappings associating 'localnet' networks to bridges on OpenShift Virtualization
# connect to OVN Northbound DB https://gist.github.com/dlbewley/b4d4c85931e7a9c03caf56db1a1a0d2e
$ ovncli.sh
# find local chassis id
sh-5.1# ovn-sbctl find chassis other_config:is-remote="false"
_uuid : a0aad588-f850-4601-b4dc-63199440ab58
encaps : [fcbeb3fc-d810-49db-ae6c-f043e3441d25]
external_ids : {}
hostname : hub-tq2sk-cnv-xcxw2
name : "f57f0c4e-5d93-4639-a016-7cea61281c04"
@dlbewley
dlbewley / .govc.env
Last active December 6, 2024 17:13
Script to recycle drives in VMware guests for OpenShift provisioning testing
# used to lookup vcenter connection details from 1Password
VAULT=development
CLUSTER=vcenter
export GOVC_USERNAME="$(op read op://${VAULT}/${CLUSTER}/username)"
export GOVC_PASSWORD="$(op read op://${VAULT}/${CLUSTER}/password)"
export GOVC_URL="$(op read op://${VAULT}/${CLUSTER}/website)"
@dlbewley
dlbewley / read-pull-secret-from-agent-iso.sh
Last active February 4, 2025 04:30
read pull secret from openshift agent based installer ISO
coreos-installer iso ignition show agent.x86_64.iso | jq -s > /tmp/agent.json
# you can read any file of course, but i wanted to verify the pull secret in this case
cat /tmp/agent.json | jq -r '.[].storage.files[] | select(.path | contains("pull-secret.yaml")) | .contents.source' | awk -F, '{print $2}' | base64 -d