Skip to content

Instantly share code, notes, and snippets.

View tosin2013's full-sized avatar

Tosin Akinosho tosin2013

View GitHub Profile
@dlbewley
dlbewley / login-pull-secrets.sh
Created November 2, 2022 22:34
Podman login to all registries in pull secret
# if you don't want to just use --authfile or set REGISTRY_AUTH_FILE for whatever reason
# you may login to each registry in your pull secret thusly
# spoiler alert, here's how to extract usernames and passwords from your pull secret
PULL_SECRET_PATH=pull-secret.json
for R in $(jq -r '.auths|keys[]' $PULL_SECRET_PATH ); do
echo "Logging into $R"
U=$(jq -r ".auths.\"$R\".auth" $PULL_SECRET_PATH | base64 -d | awk -F: '{print $1}')
P=$(jq -r ".auths.\"$R\".auth" $PULL_SECRET_PATH | base64 -d | awk -F: '{print $2}')
@tosin2013
tosin2013 / configure-rhel9.x.sh
Last active December 13, 2024 13:11
configure-rhel9.x.sh
#!/bin/bash
set -xe
CHECKLOGGINGUSER=$(whoami)
if [ ${CHECKLOGGINGUSER} == "root" ];
then
echo "login as sudo user to run script."
echo "You are currently logged in as root"
exit 1
fi
@acsulli
acsulli / openshift_authn_authz.md
Created July 1, 2021 19:59
Supporting information for the OpenShift.tv live stream here: https://www.youtube.com/watch?v=RG6xt2q72nw

Configuring Active Directory authentication with OpenShift 4

  1. Understand AD LDAP structure and naming. Read the docs on the components

    Refer to the OpenShift docs for the LDAP identity provider and LDAP group syncing.

  2. Create the OAuth config

    # create a secret for the bindDN user password
@tosin2013
tosin2013 / configure-sudo-user.sh
Created June 27, 2021 19:01
Configure Sudo user
#!/bin/bash
set -xe
if [ -z $1 ];
then
echo "Please pass user to be created."
echo "USAGE: $@ username"
exit 1
fi
USER=${1}
@cdoan1
cdoan1 / 00_setup_local_mirror_registry.sh
Last active October 7, 2021 17:35
disconnected downstream
#!/bin/bash
#
# Reference: https://www.openshift.com/blog/openshift-4-2-disconnected-install
#
HOSTNAME=`hostname`
USERNAME=admin
PASSWORD=password
yum -y install podman httpd httpd-tools
mkdir -p $(pwd)/registry/{auth,certs,data}
@dmesser
dmesser / standalone-kubelet-fc31.md
Last active March 5, 2023 13:10
Standalone Kubelet on Fedora 31

What is this about?

This gist describes how to set up standalone kubelet + CRI-O + CNI on Fedora Core 31. The goal is to place a Kubernetes Pod manifest on an single node and access the application from the network. This guide has been tested on x86-64 and armv7 deployments.

Prepare the system

Make sure the system is up to date:

dnf -y update

OCP 4.2/4.3 All-In-One (UPI mode)

This document assume reader is familiar with the OCP4x installation process.

Before Deployment

  • Setup the install-config.yaml to deploy a single master and no workers
    apiVersion: v1
    baseDomain: example.com
    

Configure USB device

  • Ensure all required packages are installed
dnf install grub2-efi shim gdisk grub2-efi-modules grub2-efi-x64-modules
  • Define USB device varaible
@rohitkrai03
rohitkrai03 / upgrade-ocp-cluster.sh
Created July 30, 2019 20:37
Upgrade Openshift Cluster from 4.1 to 4.2
oc adm upgrade --to-image=registry.svc.ci.openshift.org/origin/release:4.2 --force