This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ref: https://docs.openshift.com/container-platform/4.6/backup_and_restore/backing-up-etcd.html | |
etcd_node=`oc get pods -n openshift-etcd -l app=etcd -o=jsonpath='{.items[0].spec.nodeName}'` | |
ssh -i ~/.ssh/dmz-ocp4-rsa core@$etcd_node | |
id=$(sudo crictl ps --name etcdctl | awk 'FNR==2{ print $1}') && sudo crictl exec -it $id /bin/bash | |
etcdctl member list -w table | |
etcdctl endpoint health --cluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Generate a Markdown change log of pull requests from commits between two tags | |
# Author: Russell Heimlich | |
# Original URL: https://gist.github.com/kingkool68/09a201a35c83e43af08fcbacee5c315a | |
# Modified for Atlassian Stash and older Git version by author: Lucian Maly <lucian@redhat.com> | |
# URL: https://gist.github.com/luckylittle/7e7192743514d08989a6fc0cdbd93e61 | |
# HOW TO USE | |
# Copy this script to a directory under Git version control | |
# Make the script executable i.e. chmod +x changelog.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
## Converting a CloudFormation Template from JSON to YAML | |
## Script copyright: http://blog.flux7.com/how-to-convert-a-cloudformation-template-from-json-to-yaml | |
## | |
## Example: | |
## $ python converter.py --json my-stack.template --yaml my-stack.yaml | |
import yaml | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, yaml, json | |
def funcparse(loader, node): | |
node.value = { | |
yaml.constructor.ScalarNode: loader.construct_scalar, | |
yaml.constructor.SequenceNode: loader.construct_sequence, | |
yaml.constructor.MappingNode: loader.construct_mapping, | |
}[type(node)](node) | |
node.tag = node.tag.replace(u'!Ref', 'Ref').replace(u'!', u'Fn::') |