Skip to content

Instantly share code, notes, and snippets.

View alanbchristie's full-sized avatar

Alan B. Christie alanbchristie

View GitHub Profile
@alanbchristie
alanbchristie / gluster-cmp.py
Created May 3, 2019 12:19
Generates volume discrepancies between Heketi and Gluster
#!/usr/bin/env python
# Usage: gluster-cmp.py <heketi-txt> <gluster-txt>
#
# Given two text files, the output of: -
#
# - heketi-cli volume list
# - gluster volume status all
#
# ...this utility lists volumes that gluster knows about that
@alanbchristie
alanbchristie / busy-job.yml
Created September 19, 2018 16:05
Simple OpenShift Job Template (with a volume)
---
# A minimal OpenShift template
# to create a BusyBox container with
# a volume claim that can be used to
# launch a Job and inspect a PVC.
#
# Create with:
# oc process -p PVC_CLAIM_NAME=my-claim -f busy-job.yaml | oc create -f -
# Destroy with:
@alanbchristie
alanbchristie / hekcheck.py
Last active March 4, 2019 10:18
A simple Python 2.7 module to run basic validation checks on an exported Heketi database file
#!/usr/bin/env python
# hekcheck.py
#
# A simple Python 2.7 module to run basic validation checks
# on an exported Heketi database file.
#
# > This is a work in progress - driven by trying to fix a damaged
# deployment. It does not check everything yet but checks what I
# believed to be important things like whether the nodes, volumes,
@alanbchristie
alanbchristie / packer-nextflow.yaml
Last active March 17, 2021 20:50
An example of a Nextflow Packer file in YAML
---
# Packer machine image configuration for a Nextflow/Docker machine.
#
# To use this file (Packer expects a JSON file) you need to
# use the project's yaml2json module to convert it to JSON.
# From this directory and a Suitable Python (see root's requirements.txt)
# you can run...
#
# ../../../yaml2json.py < nextflow.yml > nextflow.json
@alanbchristie
alanbchristie / packer-nextflow.json
Last active August 24, 2018 11:10
An example of a Nextflow Packer file in JSON
{
"builders": [
{
"access_key": "{{user `aws_access_key`}}",
"ami_name": "{{user `base_ami_name`}}",
"region": "eu-west-1",
"ssh_username": "{{user `aws_user`}}",
"type": "amazon-ebs",
"source_ami": "ami-e4515e0e",
"secret_key": "{{user `aws_secret_key`}}",