Skip to content

Instantly share code, notes, and snippets.

View rbo's full-sized avatar
🏠
Working from home

Robert Bohne rbo

🏠
Working from home
View GitHub Profile
@rbo
rbo / bassh_rc_snippet.sh
Last active September 23, 2022 19:26
powerline-go
# https://github.com/justjanne/powerline-go
if [ -x "$(command -v powerline-go)" ]; then
function _update_ps1() {
rc=$?
if [ -x "$(command -v powerline-go)" ]; then
PS1="$(powerline-go -error $rc -max-width 80 -newline -colorize-hostname -modules "ssh,host,user,cwd,perms,git,kube,exit" -priority "ssh,host,cwd,exit,git,kube" -modules-right "time" )"
else
PS1="\u@\h:\w $ "
fi
}
@rbo
rbo / README.md
Created March 27, 2020 16:35
Add a node to your openshift & certificates

Add a node to your openshift

$ oc get csr
No resources found in default namespace.
$ oc get nodes
NAME        STATUS   ROLES                 AGE    VERSION
compute-0   Ready    worker                43d    v1.16.2
compute-1   Ready    worker                123d   v1.16.2
master-0    Ready    infra,master,worker   123d   v1.16.2
[Unit]
Description=Mirror registry (mirror-registry)
After=network.target
[Service]
Type=simple
TimeoutStartSec=5m
ExecStartPre=-/usr/bin/podman rm "mirror-registry"
ExecStartPre=/usr/bin/podman pull docker.io/library/registry:2
#!/usr/bin/env bash
if [ $# -eq 0 ] ; then
echo "Usage: $0 HOSTNAME bootstrap_ignition_config_url";
exit 1;
fi
HOSTNAME=${1:-bootstrap.ocp4-upi.bohne.io}
IGN_URL=${2}
@rbo
rbo / gist:ed85ed2951c6e68191e29a8cebad6365
Created January 20, 2020 15:17
ocp 4 install-yaml example
apiVersion: v1
baseDomain:
compute:
- hyperthreading: Enabled
name: worker
replicas: 0
controlPlane:
hyperthreading: Enabled
name: master
replicas: 3
oc patch configmap/logging-fluentd -p "$(jq -n --arg es "$(cat output-custom-es-config.conf)" '{"data":{"output-custom-es-config.conf":$es}}')"
@rbo
rbo / Podman-on-MacOS.md
Last active September 1, 2021 13:42
Podman on Mac OS
$ export PATH=$(pwd):$PATH
$ podman-machine create box
Podman machine "box" already exists
$ podman-machine start box
Starting "box"...
@rbo
rbo / README.md
Created December 3, 2019 09:35
PoC

oc create secret generic rbo-demo-demo-auth
--from-file=.dockerconfigjson=rbo-demo-demo-auth.json
--type=kubernetes.io/dockerconfigjson

@rbo
rbo / README.md
Last active November 29, 2019 08:03
registry.gitlab.com as openshift mirror - FAIL

registry.gitlab.com as openshift mirror

Try to build and push to registry.gitlab.com with docker 19.03.5 on MacOS - PASS

rbohne@dune:~/q/openshift-examples/simple-http-server $ docker login registry.gitlab.com
Authenticating with existing credentials...
Login Succeeded

rbohne@dune:~/q/openshift-examples/simple-http-server $ docker build -t registry.gitlab.com/rbohne/openshift .
@rbo
rbo / Dockerfile
Created November 20, 2019 16:10
OLM air-gapped notes
FROM registry.redhat.io/openshift4/ose-operator-registry:v4.2.0 as builder
ENV sdf=asdfsaa
COPY community-operators/openshift-pipelines-operator manifests
RUN /usr/bin/initializer -o /registry/bundles.db
#FROM scratch
FROM registry.redhat.io/openshift4/ose-operator-registry:v4.2.0
COPY --from=builder /registry/bundles.db /bundles.db
COPY --from=builder /usr/bin/registry-server /registry-server
COPY --from=builder /usr/bin/grpc_health_probe /bin/grpc_health_probe