Skip to content

Instantly share code, notes, and snippets.

View weshayutin's full-sized avatar

Wesley Hayutin weshayutin

View GitHub Profile
whayutin@thinkdoe:~/OADP/SETUP/OADP_1.4$ oc get all
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
NAME READY STATUS RESTARTS AGE
pod/1327172cc06594d4c6e9ddb02aa22074923cd5a6e50abdac8f1e3531116gzdd 0/1 Completed 0 119m
pod/node-agent-fxbp4 1/1 Running 0 42s
pod/node-agent-r8nbf 1/1 Running 0 42s
pod/node-agent-xkrps 1/1 Running 0 42s
pod/openshift-adp-controller-manager-77d7948498-k522v 1/1 Running 0 8m19s
pod/repo-maintain-job-1717089871355-ddr62 0/1 Completed 0 46m
pod/repo-maintain-job-1717090970396-bglk4 0/1 Completed 0 28m
## OpenShift4 pull-secret:
1. Download your pull-secret from [console.redhat.com](https://console.redhat.com/openshift/install/aws/installer-provisioned)
- click on “Download Pull Secret”. Save it somewhere, e.g. ~/some-dir/pull-secret
2. Add the apps.ci auth to pull-secret! _internal OpenShift developers only_
- Obtain an API token by visiting https://oauth-openshift.apps.ci.l2s4.p1.openshiftapps.com/oauth/token/request
copy the oc login cmd and paste in terminal to login to the ci cluster, then run this:
- `$ oc registry login --to ~/some-dir/pull-secret`
This will append the auth from registry.ci.openshift.org to your cloud.openshift.com pull-secret but it will also
make the pull-secret multi-line.
@weshayutin
weshayutin / .Cluster Scripts.md
Last active May 23, 2024 11:57 — forked from sanchezl/.Cluster Scripts.md
Cluster Creation Scripts

Cluster Creation Scripts

Scripts to use as inspiration for your own OpenShift clusters.

Setup

  1. Create a directory with the name of the cluster you want to create.
  2. Generate an install-config.yaml (for example, using openshift-install create install-configs).
  3. Copy your install-config.yaml to install-config.yaml.save. This ensures you still have a copy after the installer deletes install-config.yaml. Add a bin/ subdirectory and add it to the begining of your PATH. I recommend you use [direnv][1] to manage this (sudo dnf install direnv).
@weshayutin
weshayutin / oadp1679.md
Last active May 15, 2023 12:23
OADP1679.md

highligts

backup w/ concurrent set to 1

NAMESPACE         NAME        PVC NAME   VOLUMESNAPSHOTCONTENT                              PHASE       BATCHINGSTATUS   AGE
minimal-8csivol   vsb-5qfqp              snapcontent-a63f52f6-8844-4423-ac1b-14a362300e98               Queued           54s
minimal-8csivol   vsb-6g6cz   volume1    snapcontent-f02aec31-a24a-4fa7-93c8-01c85d70947a   Completed   Completed        3m40s
minimal-8csivol   vsb-bgb5s   volume2    snapcontent-6762b80a-782e-4ad7-b612-67811e3387da   Completed   Completed        3m15s
minimal-8csivol   vsb-dzhwl   volume3    snapcontent-1e59ee85-69f0-42c1-ab72-990e5743d3d9   Completed   Completed        2m54s
minimal-8csivol   vsb-n2ld5              snapcontent-a8377d78-d965-450e-8547-819da3bdb5cb               Queued           9s
@weshayutin
weshayutin / clean_and_patch_finalizers.md
Last active June 27, 2023 21:06
clean_and_patch_finalizers.md

check setup

delete all backups

velero backup delete --all

volumeSnapShotClass

oc get volumeSnapShotClass -A  -o jsonpath='{range .items[*]}{"Name: "}{.metadata.name}{"  "}{"Retention Policy: "}{.deletionPolicy}{"\n"}{end}'

all restores from the same backup

restore #1

~ $ ls /mnt/volume1/
1683140886.txt  1683148730.txt  backup1         lost+found
~ $ ls /mnt/volume2
1683140886.txt  1683148730.txt  backup1         backup2         lost+found
~ $ ls /mnt/volume3
1683140886.txt  1683148730.txt  backup1         backup2         lost+found
@weshayutin
weshayutin / scan-ansible-archive for modules.py
Created July 15, 2021 20:33 — forked from cloudnull/scan-ansible-archive-for-modules.py
quick and dirty tool to scan an ansible archive and return a complete list of modules used throughout the archive.
import argparse
import collections
import os
import yaml
MODULES = collections.defaultdict(int)
POP_ITEMS = ['always',
'args',
@weshayutin
weshayutin / tripleo-repo-scraper.sh
Created December 8, 2020 21:06 — forked from cloudnull/tripleo-repo-scraper.sh
tripleo repo scraper
COMMIT_MSG="The lower constraint file has been removed
This file, and its tests, are not useful for tripleo so we're
removing because they're now becoming problematic."
git clone https://github.com/openstack/governance
pushd governance
python <<EOC
import yaml
@weshayutin
weshayutin / gist:3278df289fe5ac6c7bdeb4dc7a85f2c1
Created March 19, 2020 12:14
install tripleo from repos in ci
yum clean all
wget --content-disposition --no-parent -r https://logserver.rdoproject.org/openstack-component-network/opendev.org/openstack/tripleo-ci/master/periodic-tripleo-ci-centos-8-scenario010-standalone-network-master/5127081/logs/undercloud/etc/yum.repos.d/
mv logserver.rdoproject.org/openstack-component-network/opendev.org/openstack/tripleo-ci/master/periodic-tripleo-ci-centos-8-scenario010-standalone-network-master/5127081/logs/undercloud/etc/yum.repos.d/*.txt.gz .
for i in `ls *.gz`; do echo $i; gzip -d $i; done
for i in `ls *.txt`;do echo ${i::(-4)}; mv $i ${i::(-4)}; done
mkdir TEST
mv network-component.repo TEST/
yum repolist
https://my1.fr/blog/reviewing-puppet-openstack-patches/
https://opendev.org/ttygroup/gertty
https://paste.centos.org/view/d9b3437f
https://paste.centos.org/view/ad5bc1ef