Skip to content

Instantly share code, notes, and snippets.

View elmiko's full-sized avatar

Michael McCune elmiko

View GitHub Profile
@jcpowermac
jcpowermac / compile.patch
Last active January 6, 2023 00:19
golang, delve, rr, openshift-installer
diff --git a/hack/build.sh b/hack/build.sh
index c5b9156ed3..0c157442bf 100755
--- a/hack/build.sh
+++ b/hack/build.sh
@@ -52,7 +52,7 @@ export CGO_ENABLED=0
case "${MODE}" in
release)
- LDFLAGS="${LDFLAGS} -s -w"
+ #LDFLAGS="${LDFLAGS}"

Deploying OKD using libvirt

For this environment, we'll be using these hostname/IP combinations:

  • helper = 192.168.110.39
  • bootstrap = 192.168.110.60
  • controlplane-0 = 192.168.110.61
  • controlplane-0 = 192.168.110.62
  • controlplane-0 = 192.168.110.63
  • worker-0 = 192.168.110.65
  • worker-1 = 192.168.110.66
@sallyom
sallyom / local-registry-10-yr-cert-with-SAN.sh
Last active August 15, 2022 17:43
set up a local registry at localhost:5000 (or gcp hostname if in gcp instance uncomment L5, comment L6) with SAN cert good for 10yrs
#!/bin/bash
set -euxo pipefail
trap "rm -rf create-registry-certs" EXIT
# Set up local registry with long-lived certs with SAN
# if in gcp instance
#HOSTNAME=$(curl "http://metadata.google.internal/computeMetadata/v1/instance/hostname" -H "Metadata-Flavor: Google")
HOSTNAME=localhost
sudo dnf -y install podman httpd httpd-tools make
## 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.
@JoelSpeed
JoelSpeed / simulate-termination.yaml
Created June 23, 2020 14:57
Simulate spot termination event
apiVersion: batch/v1
kind: Job
metadata:
name: simulate-termination
spec:
template:
spec:
containers:
- name: iptables
image: alpine
@crawford
crawford / rhcos.ipxe
Last active February 10, 2021 21:48
iPXE script for RHCOS on Packet.net
#!ipxe
set base-url http://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/latest/latest
kernel ${base-url}/rhcos-4.4.3-x86_64-installer-kernel-x86_64 initrd=${base-url}/rhcos-4.4.3-x86_64-installer-initramfs.x86_64.img console=ttyS1,115200 ip=dhcp rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=sda coreos.inst.image_url=${base-url}/rhcos-4.4.3-x86_64-metal.x86_64.raw.gz coreos.inst.ignition_url=https://gist.githubusercontent.com/crawford/0d98ab75b0aa5ca4b1fb54bbe2a225b3/raw/d26af1cf30893c2f05bd8dc69f72503b5f4406e7/ssh.json
initrd ${base-url}/rhcos-4.4.3-x86_64-installer-initramfs.x86_64.img
boot
@sub-mod
sub-mod / tektoncd_notes.md
Last active January 29, 2020 20:16
tektoncd_notes.md
@albfan
albfan / .gitignore
Last active January 7, 2020 19:06 — forked from kontez/freeotp_backup.md
A guide to back up and recover 2FA tokens from FreeOTP (Android)
apps/
@sub-mod
sub-mod / crc_remote_laptop.md
Last active July 9, 2022 12:03
Setup CodeReady Containers on Remote Server and connect from Laptop 4.2

Following steps work for F29 for F31 look here

On the remote host

cat /etc/redhat-release
Fedora release 29 (Twenty Nine)

Install packages

@mbbroberg
mbbroberg / community-measurement.md
Last active September 27, 2018 20:40
Worksheet for Red Hat

Q1: What’s your gut vs brain story?

There is the desire to participate in our community and the responsibility to measure its effectiveness that feel at odds. Take a moment to write down two things:

  • What do you wish you could measure about your community?
  • What do you value most about participating in your community?

A1:

Q2: What do you want from the business?