Skip to content

Instantly share code, notes, and snippets.

View sallyom's full-sized avatar

Sally O'Malley sallyom

View GitHub Profile
admissionConfig:
pluginConfig: null
apiLevels:
- v1
apiVersion: v1
assetConfig:
extensionDevelopment: false
extensionProperties: null
extensionScripts:
- /etc/origin/master/online-extensions.js
#!/bin/bash
# 1) Make sure you fill in all env vars in online_env.conf in same directory as this script
# 2) Make sure you run 'git submodule update --init --recursive' in your online repo before running this script
# 3) Keep your local online repo up to date, as this script tars up your local online repo, otherwise you'd need to have git ssh keys set up with VM
set -o errexit
set -o nounset
set -o pipefail
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
# Need my vagrant branch until PR is merged
REPO=(online ose)
INSTANCE_NAME=$USER-online-dev
SSH_CONFIG=$(mktemp $INSTANCE_NAME.sshconfig.XXX)

online-up

4 Steps to Start an OpenShift Online All-In-One Cluster:

(for testing and development) Until this 'devenvup' branch is merged with 'master', create a local cloned 'sallyom/devenvup' branch OR just copy Vagrantfile , hack/online-up.sh and the devenvup directory and contents to whatever local branch of 'online' you want. i.e. Those are the only differences between this branch and master.

First, to get set up for ssh with your ec2 instance, add libra.pem to the ssh-agent locally

  1. Add this repository to your remotes in your online repository and checkout the devenvup branch OR just copy Vagrantfile, hack/online-up.sh and devenvup directory to your local online repo.
# Make a list of adjectives
adj = ['cool', 'not cool']
while True:
n1 = input('Give me a number:\n')
n2 = input('Give me another number:\n')
# Make MadLibs-y sentences
print('Hi, %s person. Something %s will happen today.\n\n' % (adj[int(n1) % len(adj)], adj[int(n2) % len(adj)] ))
OR

Keybase proof

I hereby claim:

  • I am sallyom on github.
  • I am somalley (https://keybase.io/somalley) on keybase.
  • I have a public key whose fingerprint is EAEB 2262 BD02 4BFE 478F E7E4 9AD4 DAB1 0C90 5B8C

To claim this, I am signing this object:

@sallyom
sallyom / demo-buildah-mnt-from-scratch.sh
Last active July 12, 2018 20:41
demo install mongoose in image with buildah mnt
#! /bin/bash
set -x
ctr=$(buildah from scratch)
mnt=`buildah mount $ctr`
dnf install -y --installroot=$mnt mongoose --releasever=27 --disablerepo=* --enablerepo=fedora --enablerepo=updates
dnf clean all --installroot=$mnt
buildah unmount $ctr
buildah config --entrypoint=/usr/bin/mongoose $ctr
buildah commit $ctr mongoose-test
@sallyom
sallyom / idp.sh
Last active February 21, 2019 14:36
okd-configure-htpasswd
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# not sure this is still necessary, but can't hurt...
# kick the console pods because they cache oauth metadata (temporary, should not be required)
oc delete pods -n openshift-console --all --force --grace-period=0
@sallyom
sallyom / crt-append.sh
Last active September 16, 2019 09:18
append router-ca to kubeconfig
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
####################################################################################
# This is no longer required, only the idp.sh is required to configure htpasswd idp
# HOWEVER, if your install fails and cluster is functional enough to configure
# idp and/or login with kubeadmin, you'll need to run this to avoid x509 error
@sallyom
sallyom / service-ca-demo.sh
Last active May 29, 2019 20:31
script that demos features of service-ca-operator
#!/bin/sh
# service-ca-demo.sh demo script.
# This script will demonstrate features of service-ca-operator
# Prerequisite: A running OpenShift 4.x cluster
# Setting up some colors for helping read the demo output.
# Comment out any of the below to turn off that color.
bold=$(tput bold)
bright=$(tput setaf 14)