Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#==============================================
# silly script to import 100 docker images
# into OpenShift as image streams
# Author: Joel Sheppard
#==============================================
oc import-image 2717 --from gradle:latest --confirm
oc import-image 6567 --from mhart/alpine-node-auto:latest --confirm
oc import-image 2859 --from aptalca/home-automation-bridge:latest --confirm
#!bin/bash
# put an `oc login` here if you want
# oc login -U...
oc import-image 4227 --from gradle:latest --confirm
oc import-image 9701 --from mhart/alpine-node-auto:latest --confirm
oc import-image 681 --from aptalca/home-automation-bridge:latest --confirm
oc import-image 1930 --from willfarrell/autoheal:latest --confirm
oc import-image 1915 --from azuresdk/autorest:latest --confirm
oc import-image 7182 --from xeroxmalf/rutorrent-autodl-irssi:latest --confirm
#!/bin/bash
#============================================
## Credits: Joel Effing Sheppard - 2018 ##
#============================================
#==========================================================================================
## Purpose: This script takes an input file that has N docker repo/image names ##
## and then using sed adds an OpenShift command (a prefix and a suffix) so that ##
## one can easily deploy HUNDREDS or THOUSANDS of docker images to OpenShift ##
## with ease. The input file is created by using a 'docker search' command ##
oc set env deployment --all HUB_KB_HOST=kbtest.blackducksoftware.com │Total scans submitted: 194
oc set env deployment --all HUB_PROXY_HOST=tank.blackducksoftware.com │Total scans submitted: 195
oc set env deployment --all HUB_PROXY_PORT=3128 │Total scans submitted: 196
oc set env deployment --all HUB_PROXY_SCHEME=http
#!/bin/bash
set -x
# set -e
OC_SERVER="18.218.176.19"
OC_UN="clustadm"
OC_PW="devops123!"
OC_PROJECT="myhub"
OC_CP_TMP="/tmp"
OC_TAR_DIR="/temp/hackathon2018"
#!/bin/sh
# ============================
# Install BREW and LinuxBrew
# ============================
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
test -d ~/.linuxbrew && PATH="$HOME/.linuxbrew/bin:$HOME/.linuxbrew/sbin:$PATH"
test -d /home/linuxbrew/.linuxbrew && PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH"
test -r ~/.bash_profile && echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.bash_profile
echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.profile
oc login -u=clustadm -p=qapw4all
oc new-project rubyex
oc project rubyex
oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git
oc new-project ruby-hellowrld
oc project ruby-hellowrld
oc new-app ruby-hellowrld/my-ruby~https://github.com/openshift/ruby-hello-world.git
oc new-project puma-test-app
oc project puma-test-app
# S2i
if [[ -z $a_state ]] ; then
echo "[ERROR]: [tstAnnotate] POD Annotations not found on $my_pod!!"
echo "Retrying... $retry"
(( retry ++ ))
sleep 3
elif [[ -z $a_state ]] ; then
echo " [ERROR]: [tstAnnotate] POD Annotations not found, exiting!"
exit 88;
else
echo "BlackDuck OpsSight Annoations found on $my_pod! TEST PASS"
# Copyright (C) 2018 Synopsys, Inc.
#!/bin/sh
export PERCEPTOR_POD_NS="perceptortestns"
# TODO Put in a check here if oc cli is present
# Create the Namespace
createNs() {
WAIT_TIME=$((30))
# Copyright (C) 2018 Synopsys, Inc.
#!/bin/sh
export PERCEPTOR_POD_NS="perceptortestns"
# TODO Put in a check here if kubectl cli is present
# Create the Namespace
createNs() {
WAIT_TIME=$((30))