Exam Objectives
1 Compare authentication methods
1a Describe authentication methods
1b Choose an authentication method based on use case
1c Differentiate human vs. system auth methods
This file contains 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
from github import Github | |
from tabulate import tabulate | |
from datetime import datetime | |
""" | |
This script produces table with all merged pull requests within a certain time period. It is useful for configuration change auditing. | |
""" | |
github_token = '' | |
github_api_url = 'https://githubenterprise.service.com/api/v3' |
This file contains 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 | |
DESTINATION=dtrqa.docker.service.com | |
NAMESPACE=enablement | |
copy_to_reg () { | |
echo ------------------------------------------ | |
echo Copying $2 from $1 to Internal Registry... | |
skopeo --insecure-policy copy --dest-tls-verify=false docker://$1/$2 docker://${DESTINATION}/${NAMESPACE}/${2##[a-z]*/} | |
This file contains 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
Intel Wifi 6 AX200 speed problems. Fix: | |
1. | |
/etc/modprobe.d/iwlmvm.conf | |
options iwlmvm power_scheme=1 | |
2. | |
/etc/modprobe.d/iwlwifi.conf |
This file contains 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 | |
find . -type f -name '*.m4a' -execdir /bin/zsh -c '/usr/bin/ffmpeg -i $0 -c:v copy -c:a libmp3lame -q:a 4 ${0/m4a/mp3}' {} \; |
This file contains 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
UklGRuBXBwBXQVZFZm10IBAAAAABAAEAgLsAAAB3AQACABAAZGF0YVpUBwCx/5T/O/9P/3j/mP90 | |
/3b/ZP9G/zL/R/9S/4z/n/+4/7n/tf+d/yH/dv6i/e38avwp/B79KP/zAPcAs//E/tX+Lf+e/7wA | |
EwOKBtwIFQnCBxkI4AksDToPBREREb8N0gWe9TLqouln9IT9H/zg9ZH11PJZ7ozkHds95EXziv8a | |
93/yA/R990f5j/mgCmcdfCMoHL0USxYXFr4LGPVb9B8AIQjG/U/4WQFpCsMAjPMy8QUFrBXBFM0L | |
BA1PEf0SSQRL+mAA1Q2eEpEQZQ3EBxf2G+GZ2ezp0Ph7+sPwmu5F6YXfjMpKwfLNPOpn8pDooujU | |
7if6AP3dB9glAjgwO88uHC/NNF8yrRsnDbYTsR5rFvj8y/M++r76o+4B42ro0gKDDmcHZf8R/7D/ | |
UvlE6JrrmfyCC6AMyQroCzMIZ/a95bTuMAYOD4ME7vhP9sXw999jxsbBMNci8GPos+HJ4ebq6PRL | |
+U4PBCl1MKorWCRdK2su9CNVC/4LTRntJm0ZwQoQBq4I+/+f9XDt1/3iEVIXUQ+rB078evHO3uLY | |
ieZG9XP8XgG6CMcUcxAu/gbqVOgi7zD41vqU/ef6tfWO7dbZGs9AzSDVgeen+0f+A/Ma9kb6fgdz | |
BZEMKyHENE4/VDiEM8gwvCuNGrwScRiPGeYJN/ed9igAR/gV6j7llvcyDEYHvey739vkYvZb+Jvr |
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 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 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 |