A brief description of what this project does and who it's for
oc get crd -o=custom-columns=NAME:.metadata.name,CR_NAME:.spec.names.singular,SCOPE:.spec.scope
oc get $(oc get crd -o=custom-columns=CR_NAME:.spec.names.singular --no-headers | awk '{printf "%s%s",sep,$0; sep=","}') --ignore-not-found --all-namespaces -o=custom-columns=KIND:.kind,NAME:.metadata.name,NAMESPACE:.metadata.namespace
oc get $(oc api-resources --verbs=list -o name | awk '{printf "%s%s",sep,$0;sep=","}') --ignore-not-found --all-namespaces -o=custom-columns=KIND:.kind,NAME:.metadata.name,NAMESPACE:.metadata.namespace --sort-by='metadata.namespace'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Confirm the service is up: | |
| oc get svc image-registry -n openshift-image-registry | |
| # Create a ServiceAccount: | |
| oc create sa pipeline | |
| # Add image-builder role to the ServiceAccount: | |
| oc adm policy add-role-to-user system:image-builder -z pipeline | |
| # Add privileged Security Context Constraint (SCC) so you can run container inside container: | |
| oc adm policy add-scc-to-user privileged -z pipeline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Ref: https://docs.openshift.com/container-platform/4.6/backup_and_restore/backing-up-etcd.html | |
| etcd_node=`oc get pods -n openshift-etcd -l app=etcd -o=jsonpath='{.items[0].spec.nodeName}'` | |
| ssh -i ~/.ssh/dmz-ocp4-rsa core@$etcd_node | |
| id=$(sudo crictl ps --name etcdctl | awk 'FNR==2{ print $1}') && sudo crictl exec -it $id /bin/bash | |
| etcdctl member list -w table | |
| etcdctl endpoint health --cluster |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Iperf is a tool for network performance measurement and tuning. It is a cross-platform tool that can produce standardized | |
| performance measurements for any network. Iperf has client and server functionality, and can create data streams to measure | |
| the throughput between the two ends in one or both directions. | |
| [user@server-1 ~]$ iperf3 -s –p 5001 -V --logfile iperf3_server2_20210118.log | |
| 1) Linear | |
| [user@client-a ~]$ iperf3 -c –p 5001 –V --logfile iperf3_client-a_lin_20210118.log server-1 –u -4 –Z | |
| [user@client-b ~]$ iperf3 -c –p 5001 –V --logfile iperf3_client-b_lin_20210118.log server-1 –u -4 –Z |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # Configuring garbage collection in OCP3, an example of appending to YAML in Ansible | |
| # Lucian Maly - Red Hat, Inc. | |
| - name: Configuring garbage collection in OCP3 | |
| hosts: masters[0] | |
| gather_facts: no | |
| tasks: | |
| - name: 1.0 | ocp3-garbage-collection.yml | Download the content of a ConfigMap | |
| shell: | | |
| oc extract cm/node-config-compute --to=/root --confirm=true -n openshift-node |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # Configuring ETCD monitoring in OCP3 | |
| # Lucian Maly - Red Hat, Inc. | |
| - name: Configuring etcd monitoring | |
| hosts: masters[0] | |
| gather_facts: no | |
| tasks: | |
| - name: 1.0 | ocp3-etcd-monitoring.yml | Fetch certificates from one master node to the local machine | |
| fetch: | |
| src: /etc/etcd/ca/{{ item }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| for dir in */ | |
| do | |
| [[ -d "$dir" ]] || break | |
| echo "${dir}" | |
| cd "${dir}" || exit | |
| mkdir Sample | |
| python ~/.local/bin/srr.py ./*.srr -y | |
| python ~/.local/bin/srs.py ./*.srs ./*.mkv -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device] | |
| "DevicePasswordLessBuildVersion"=dword:00000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # General Aliases | |
| alias beep='speaker-test -l 1 -t wav -w Beep.wav' | |
| alias c="code ." | |
| alias cdd='cd ~/Downloads' | |
| alias chksfv='cksfv -C /home/lmaly/Downloads/ -qr' | |
| #alias d="docker" | |
| alias h="helm" | |
| alias sudo='sudo ' | |
| alias v='vault' | |
| alias vi="/usr/bin/vim" |