Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mdbooth's full-sized avatar

Matthew Booth mdbooth

View GitHub Profile
@mdbooth
mdbooth / 98-var-lib-etcd.yaml
Last active February 9, 2024 16:24
OpenShift on OpenStack with etcd on local ephemeral disk
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: master
name: 98-var-lib-etcd
spec:
config:
ignition:
version: 3.4.0
@mdbooth
mdbooth / credentials-request.yaml
Last active October 9, 2023 18:26
CAPO POC yamls
apiVersion: cloudcredential.openshift.io/v1
kind: CredentialsRequest
metadata:
name: openshift-cluster-api-openstack
namespace: openshift-cloud-credential-operator
spec:
providerSpec:
apiVersion: cloudcredential.openshift.io/v1
kind: OpenStackProviderSpec
secretRef:
@mdbooth
mdbooth / PWL Cache unwindpmp profiling.md
Last active July 4, 2023 15:36
PWL cache unwindpmp profiling
  • VM configured with rbd_cache = false in both cases
  • PWL enabled/disabled by setting rbd_plugins to pwl_cache/"" respectively
  • PWL enabled/disabled status configured by output of rbd status libvirt-pool/pwl-test
  1. Boot VM
  2. Run perf test[^1] in the guest without profiling in the host
  3. Repeat twice:
    1. Run perf test in the guest
    2. Simultaneously run unwindpmp -n 900 -p <qemu pid> > ... on the host
  4. Ensure sampling starts after and finishes before test
#!/bin/bash
scriptdir=${scriptdir:-.}
function get_release_image() (
version=latest
if [ "$OPENSHIFT_RELEASE" != "nightly" ]; then
version="$version-$OPENSHIFT_RELEASE"
fi
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: atop-debug
namespace: default
spec:
selector:
matchLabels:
app: atop-debug
template:
@mdbooth
mdbooth / clouds-to-env.sh
Last active May 7, 2021 13:57
Convert an entry in clouds.yaml to OS_* environment variables
#!/bin/sh
exec yq -r '.clouds.'$1'
| paths(scalars) as $p
| "export OS_" + ($p|last|ascii_upcase) + "=\"" + (getpath($p)|tostring) + "\""' \
< ~/.config/openstack/clouds.yaml
@mdbooth
mdbooth / keybase.md
Last active November 17, 2021 11:22

Keybase proof

I hereby claim:

  • I am mdbooth on github.
  • I am mdbooth (https://keybase.io/mdbooth) on keybase.
  • I have a public key whose fingerprint is AC03 E8DF 13C9 2ED8 A4D8 7E47 A91B AB3C 70FE 6769

To claim this, I am signing this object:

%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
# Python3 support in OpenStack starts with version 3.5,
# which is only in Fedora 24+
%if 0%{?fedora} >= 24
%global with_python3 1
%endif
%global library osc-placement
#!/bin/sh
find ~/devstack ~/openstack -name .git -type d | while read dir; do
working=$(dirname "$dir")
pushd "$working" >/dev/null
# Don't update if we're not on the master branch
if [ $(git rev-parse HEAD master | uniq | wc -l) != "1" ]; then
echo "Skipping $working: not on master branch"
continue
#!/bin/bash
# A script to run tests using khaleesi
# Usage:
#
# Run tests using a RHOS 7/RHEL 7 environment
# ./tools/khaleesi.sh
#
# Run tests using a RHOS 5/RHEL 7 environment