Skip to content

Instantly share code, notes, and snippets.

@andymcc
andymcc / check_release.sh
Created July 16, 2020 17:24
check release for OCP
#!/bin/bash
echo Checking which containers match the CLI in Release: $1
CLI_VERSION=`oc adm release info --pullspecs $1 | grep 'cli ' | awk '{print $2}'`
echo cli Version: $CLI_VERSION
CLI_MATCHES=$(oc adm release info --pullspecs ${1} | grep $CLI_VERSION | awk '{print $1}')
echo Containers matching cli SHA:
for i in $CLI_MATCHES; do
@andymcc
andymcc / install-config.yaml
Last active July 13, 2020 14:37
Sample install-config.yaml
apiVersion: v1
baseDomain: testdomain.com
metadata:
# The name here will form name.baseDomain as the domain for the install
# To avoid overlap on DNS you would want at least the name to be different per deploy on the host.
name: test
controlPlane:
architecture: s390x
hyperthreading: Enabled
name: master
@andymcc
andymcc / cleanup.sh
Created June 23, 2020 18:00
Cleanup virsh installs from openshift IPI
INSTALL_NAME=${1:-}
echo "cleaning up $INSTALL_NAME"
for i in `virsh list --all | grep $INSTALL_NAME | awk '{print $2}'`; do
echo "cleaning up instances"
if virsh list | grep -q $i; then
virsh destroy $i
fi
virsh undefine $i
done
@andymcc
andymcc / Jinja2_set_include
Last active May 30, 2017 10:09
Test Jinja2 with set and include statements
root@jinja2fix:/opt/test_jinja# cat templates/setincl.j2
{% set myvar = "foo" %}
{{ myvar }}
{% include "include.j2" %}
root@jinja2fix:/opt/test_jinja# cat templates/include.j2
bar
root@jinja2fix:/opt/test_jinja# pip list | grep Jinja2
Jinja2 (2.9.4)
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXyGmlr8P96ErTw7tA8iz9NoQb0xx0h9zXb4XrNdFt5Up+gZg7HUWZSFi/OlJQykpdPe42suJTHX9pFYLwBXPNJuXidnTO82kkp+s6NFNFxj87bYU1a5mdT5t11Ici+tKkjt4cURlCEcfwfONzRB5jlvwS0PoMs10SOTocB7CIRJc/m4vgy5JhZquaLNv3Um92EiOzW6C5zYm2noUnsJcwfG9NXHrKEx3xUdux5vJs0hqop9wGx0pp6lgvUkpivYxavf7fSEK8O1Dp8Z8zYf3IUYFa58f+zUXO77x9zSnbqTdJ6rEqDvDDZuSkPCZNmxsXj/zbFGr671r8Q5RiD2ER andrew.mccrae@amccrae-mb
@andymcc
andymcc / error.log
Created September 21, 2016 17:58
Error Log for neutron gate
2016-09-21 14:50:22.773262 | TASK [Use the unconfined aa profile] *******************************************
2016-09-21 14:50:22.773366 | task path: /home/jenkins/workspace/gate-openstack-ansible-os_neutron-ansible-func_ovs-ubuntu-trusty/tests/playbooks/test-install-neutron.yml:23
2016-09-21 14:50:22.818745 | <localhost> ESTABLISH LOCAL CONNECTION FOR USER: jenkins
2016-09-21 14:50:22.818900 | <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1474469422.82-77772957765269 `" && echo ansible-tmp-1474469422.82-77772957765269="` echo $HOME/.ansible/tmp/ansible-tmp-1474469422.82-77772957765269 `" ) && sleep 0'
2016-09-21 14:50:22.828358 | <localhost> PUT /tmp/tmp.xRXWO1i2E3/tmpaLnB62 TO /home/jenkins/.ansible/tmp/ansible-tmp-1474469422.82-77772957765269/lxc_container
2016-09-21 14:50:22.828915 | <localhost> EXEC /bin/sh -c 'LANG=C.UTF-8 LC_MESSAGES=C.UTF-8 LC_ALL=C.UTF-8 /usr/bin/python2 /home/jenkins/.ansible/tmp/ansible-tmp-1474469422.82-77772957765269/lxc_container; rm