Skip to content

Instantly share code, notes, and snippets.

@bdurrow
bdurrow / cert-manager-delegation.sh
Created January 6, 2022 18:39
We use cert-manager in our gcp hosted openshift clusters installed with operator hub. The default installation method sets up split horizon dns which thwarts DNS01 solver. Challenges are stuck in the pending state. The real solution is to change the cert-manager deployment so that it include the arguments to use recursive name servers. Unfortuna…
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
set -x
GC_PROJECT="${GC_PROJECT:-my-dev-project}"
NEW_RECORD_TTL="${NEW_RECORD_TTL:-59}"
if [[ -e transaction.yaml ]]; then
echo "WARN: Found existing transation.yaml, removing interactively"
@bdurrow
bdurrow / catalog_mirror.sh
Last active April 4, 2021 21:52
Install openshift catalog tools
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
REG_CREDS=pullsecret.json
ARCH="linux/amd64"
BATCH_SIZE=500
PROBLEM_IMAGES=(
registry-proxy.engineering.redhat.com/
@bdurrow
bdurrow / gist:682882d80c8dbc312607cba0901699c7
Created January 30, 2021 16:27
Deploying JasperReports Server to OpenShift
Place holder.
@bdurrow
bdurrow / kinit
Last active June 11, 2020 05:51
kinit wrapper that supports pkinit to allow for 2FA (typically saved as /usr/local/bin/kinit)
#!/bin/bash
# (c) 2020 by I. S. Consulting, LLC use and remix allowed with attribution.
# Initially created by [bgdurrow]
# Available from https://gist.github.com/bdurrow/5873083ed4f8f52f50a22a240b5a2543
#I don't think that I have used any bash specific features other
#than these "strict mode" settings.
set -euo pipefail
IFS=$'\n\t'
@bdurrow
bdurrow / merge-mp4.sh
Last active April 4, 2024 04:52 — forked from palaniraja/merge-mp4.sh
Bash script to merge all mp4 videos in current directory (recursively 2 levels). It also updates the chapter marks to retain the folder/filename of source dir
#!/bin/bash
#http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'
## Script to merge all mp4 videos in current directory (recursively 2 levels)
## And update chapter marks to retain the folder/filename
## Script for merging videos
@bdurrow
bdurrow / gist:684498dee93be435fc9987844275b0db
Last active September 10, 2019 20:12
DNSBL for Video Streaming Sites
0.0.0.0 netflix.com
0.0.0.0 www.netflix.com
0.0.0.0 hulu.com
0.0.0.0 www.hulu.com
@bdurrow
bdurrow / miner-setup-after-dhcp.sh
Created March 19, 2018 04:13
Use dnsmasq to trigger miner pool configuration
#!/bin/bash
#set -x
#This script is made to be used with dnsmasq using the dhcp-script option
#I use it on a ASUS AC66U with the Merlin Firmware and entware; I don't
#Believe that entware is requied; enternal dependencies are sed and curl
#Which are available in the standard firmware.
#Put this script in /jffs/custom_scripts/miner-setup-after-dhcp.sh (chmod 755)
#and create a file called /jffs/configs/dnsmasq.conf.add with the following line (no preceeding #):
#dhcp-script=/jffs/custom_scripts/miner-setup-after-dhcp.sh
resources:
- name: {{ properties['prefix'] }}-disktest
properties:
disks:
- autoDelete: true
boot: true
deviceName: persistent-disk-0
index: 0
interface: SCSI
mode: READ_WRITE
Improvements:
Registry Console starts in error state
oadm diagnostics has several errors
Install provided Registry SSL Cert
Install provided Router SSL Cert
Make nodes in multiple zones (per RefArch)
Install Openshift Metrics (Hawkular)
Install Openshift Logging (Kibana)
Cross Zone Storage (convoy?)
Shared Storage (nfs/gcluster/gcsfuse?)
@bdurrow
bdurrow / config.sh
Created January 26, 2017 20:02
openshift-ansible-contrib/reference-architecture/gce-cli/config.sh for origin deployment
### CONFIG ###
# Path to a RHEL image on local machine, downloaded from Red Hat Customer Portal
#RHEL_IMAGE_PATH="${HOME}/Downloads/rhel-guest-image-7.3-35.x86_64.qcow2"
PARENT_IMAGE_SELECTOR='--image-project centos-cloud --image-family centos-7'
REGISTERED_IMAGE="$(gcloud compute images list --filter "family:centos-7" --format 'value(name)')-registered"
DELETE_IMAGE=true
# Username and password for Red Hat Customer Portal
RH_USERNAME='user@example.com'
RH_PASSWORD='xxx'