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
https://github.com/rhtconsulting/cfme-rhconsulting-scripts | |
https://pemcg.gitbooks.io/mastering-automation-in-cloudforms-4-2-and-manage/content/ | |
https://www.manageiq.org/blog/ |
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
#To Debug/run pods without interrupted by Kubernetes Health check process, do : | |
oc debug dc/dc-name | |
#or | |
oc debug deplyoment/deployment-name |
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
### To run Openshift container as root, need to do below command : | |
oc adm policy add-scc-to-user privileged -z default -n my-project-namespace | |
oc edit deployment/my-apps-deploy | |
### Find the securityContext line, and edit : | |
### securityContext: | |
### runAsUser: 0 |
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
### Install few required packages to run SNX | |
sudo dnf install -y java-1.8.0-openjdk.x86_64 icedtea-web.x86_64 libstdc++.i686 libX11.i686 libpamtest.i686 libnsl.i686 | |
### Download compat-libstdc++ driver and install it | |
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/compat-libstdc++-33-3.2.3-72.el7.i686.rpm | |
sudo dnf -y install compat-libstdc++-33-3.2.3-72.el7.i686.rpm | |
### Install snx_linux.sh | |
### Download snx_linux_30.sh file from Checkpoint | |
### Active URL : https://supportcenter.checkpoint.com/supportcenter/portal/user/anon/page/default.psml/media-type/html?action=portlets.DCFileAction&eventSubmit_doGetdcdetails&fileid=22824 |
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
### Create file called machine-config-daemon-force in /run ### | |
ssh [email protected] sudo touch /run/machine-config-daemon-force | |
### Edit node annotations ### | |
oc edit node <node-name> | |
### Check Annotations, change like below sample ### | |
machineconfiguration.openshift.io/currentConfig: rendered-worker-ab4a1e7216bf3da2a5203f09c871b456 | |
machineconfiguration.openshift.io/desiredConfig: rendered-worker-ab4a1e7216bf3da2a5203f09c871b456 | |
machineconfiguration.openshift.io/reason: "" |
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
### Get velero images ### | |
wget https://github.com/vmware-tanzu/velero/releases/download/v1.2.0/velero-v1.2.0-linux-amd64.tar.gz | |
tar -xvzf velero-v1.2.0-linux-amd64.tar.gz | |
cp velero-v1.2.0-linux-amd64/velero /usr/local/bin/ | |
### Deploy Minio ### | |
oc apply -f /root/velero-v1.2.0-linux-amd64/examples/minio/00-minio-deployment.yaml | |
docker run -it --entrypoint=/bin/sh minio/mc | |
mc config host add s3 http://minio-service-ip:9000 (minio url) minio minio123 |
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
## Get namespace information on json format ### | |
oc get namespace <namespacename> -o json > tmp.json | |
### Edit file tmp.json, remove "kubernetes" on the finalizer section, left [] behind ### | |
vi tmp.json | |
### Save and Exit ### | |
### Run below command to hit API via proxy ### | |
oc proxy |
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
# First need to create share link from the file, and get the FILE ID from the sharing URL, example : | |
# https://drive.google.com/file/d/1xlsJtCx7EJXoxGn5SjCUIQ0DGJHsDs61/view?usp=sharing, then the FILE ID will be 1xlsJtCx7EJXoxGn5SjCUIQ0DGJHsDs61 | |
# Run below command to download file, replace FILEID and FILENAME | |
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt |
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
oc label node host1 logging-es-node=1 | |
oc label node host2 logging-es-node=2 | |
oc label node host3 logging-es-node=3 | |
for dc in $(oc get deploymentconfig --selector component=es -o name); do \ | |
oc scale $dc --replicas=0; \ | |
done |
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
##Got podman issue when run podman command : | |
##Error: could not get runtime: kernel does not support overlay fs: overlay: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior. Reformat the filesystem with ftype=1 to enable d_type support. Running without d_type is not supported.: driver not supported | |
##Reinstall podman and containers-common does not work | |
##Edit /etc/containers/storage.conf | |
vi /etc/containers/storage.conf | |
##Find storage.options and make sure below line is in there | |
[storage.options] | |
mount_program = "/usr/bin/fuse-overlayfs" |