Skip to content

Instantly share code, notes, and snippets.

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

Glenn West glennswest

🏠
Working from home
View GitHub Profile
yum install -y podman
yum install -y openssl
yum install -y wget
mkdir install
cd install
wget https://github.com/quay/mirror-registry/releases/download/v1.3.10/mirror-registry-offline.tar.gz
tar xvzf mirror-registry-offline.tar.gz
./mirror-registry install
@glennswest
glennswest / setupusers.sh
Created September 23, 2022 16:58
Simple bash script to setup htpassd support, and add initial admin users - change to what you want - least secure auth model
oc delete secret htpasswd -n openshift-config
rm -r -f users
mkdir users
cd users
touch htpasswd
htpasswd -Bb htpasswd admin Admin1!
htpasswd -Bb htpasswd gwest password
oc --user=admin create secret generic htpasswd --from-file=htpasswd -n openshift-config
oc replace -f - <<API
apiVersion: config.openshift.io/v1
@glennswest
glennswest / index.js
Created April 1, 2022 23:13
Post to update data in tabulator
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tabulator Example</title>
<link href="tabulator.min.css" rel="stylesheet">
<script type="text/javascript" src="tabulator.min.js"></script>
14:01:39.070 -> M5EPD initializing...OK
14:01:42.961 -> Booting
14:01:43.550 -> SD Card Ready
14:01:44.190 -> Card Size: 15634MB
14:01:45.440 -> Connecting to Wi-Fi...
14:01:45.440 -> [WiFi-event] event: 0
14:01:45.440 ->
[WiFi-event] event: 2
14:01:45.544 ->
Ready
ASSISTED_SERVICE_API="api.openshift.com"
export CLUSTER_ID=`cat .clusterid`
export OFFLINE_ACCESS_TOKEN=`cat .ocmapitoken.txt`
export TOKEN=`curl \
--silent \
--data-urlencode "grant_type=refresh_token" \
--data-urlencode "client_id=cloud-services" \
--data-urlencode "refresh_token=${OFFLINE_ACCESS_TOKEN}" \
https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token | \
jq -r .access_token`
This file has been truncated, but you can view the full file.
[?25lUse the ^ and v keys to change the selection.
Press 'e' to edit the selected item, or 'c' for a command prompt.
Press Escape to return to the previous menu.   Red Hat Enterprise Linux CoreOS 47.83.202103251640-0 (Ootpa) (ostree:0)       
variant: fcos
version: 1.1.0
storage:
files:
- path: /usr/local/bin/create-datastore
mode: 0755
contents:
inline: |
#!/bin/bash
+ [[ -f /env/worker-1.gw.lo ]]
+ cp -f /usr/libexec/cni/ovn-k8s-cni-overlay /cni-bin-dir/
+ ovn_config_namespace=openshift-ovn-kubernetes
++ date '+%m%d %H:%M:%S.%N'
+ echo 'I0129 16:29:09.491503662 - disable conntrack on geneve port'
I0129 16:29:09.491503662 - disable conntrack on geneve port
+ iptables -t raw -A PREROUTING -p udp --dport 6081 -j NOTRACK
+ iptables -t raw -A OUTPUT -p udp --dport 6081 -j NOTRACK
+ retries=0
+ true
[root@dev waddles]# podman mount 2e426ede7ef5
/var/lib/containers/storage/overlay/737058e71e214e7f17be908d0f1a7ea2062db6916ac31bd340336dea2f1aaa16/merged
[root@dev waddles]# cd /var/lib/containers/storage/overlay/737058e71e214e7f17be908d0f1a7ea2062db6916ac31bd340336dea2f1aaa16/merged
[root@dev merged]# ls
dev etc proc run sys waddles waddles.toml
[root@dev merged]# ls -l
total 160
drwxr-xr-t. 2 root root 6 Dec 3 19:53 dev
drwxr-xr-x. 1 root root 54 Dec 3 19:53 etc
drwxr-xr-t. 2 root root 6 Dec 3 19:53 proc
@glennswest
glennswest / build2
Created December 4, 2020 01:48
waddle test
[root@dev waddles]# ./build.sh
STEP 1: FROM golang:1.15-alpine AS builder
STEP 2: WORKDIR /build
--> Using cache 37c27a1502299b498125af46b1b46ad9ee854d2f4ad554796b7619419cff2aef
--> 37c27a15022
STEP 3: COPY go.mod go.sum ./
--> 41513128cd7
STEP 4: RUN go mod download
--> 22a432c803e
STEP 5: COPY . .