diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-10-06 04:43:13 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-10-06 04:43:13 +0200 |
commit | acd54ba601e34dafac063f94054bb80348e73dcd (patch) | |
tree | bb904bbf2d58e2a97d2649193c29d31f174ef8e1 /scripts/maintain/gluster/opts.sh | |
parent | 55ae94fdb6a6508f30c0eb0f5dfe95a11ac9682f (diff) | |
download | ands-acd54ba601e34dafac063f94054bb80348e73dcd.tar.gz ands-acd54ba601e34dafac063f94054bb80348e73dcd.tar.bz2 ands-acd54ba601e34dafac063f94054bb80348e73dcd.tar.xz ands-acd54ba601e34dafac063f94054bb80348e73dcd.zip |
Script to fullhy clean-up outdated rc
Diffstat (limited to 'scripts/maintain/gluster/opts.sh')
-rw-r--r-- | scripts/maintain/gluster/opts.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/maintain/gluster/opts.sh b/scripts/maintain/gluster/opts.sh new file mode 100644 index 0000000..2f76d8e --- /dev/null +++ b/scripts/maintain/gluster/opts.sh @@ -0,0 +1,21 @@ +function get_gluster_pod { + oc -n glusterfs get pods -l 'glusterfs=storage-pod' | grep Running | awk '{ print $1 }' | head -n 1 +} + +gpod=$(get_gluster_pod) + +function gluster { + oc -n glusterfs rsh po/$gpod gluster "$@" +} + + +function node { + ip=$1 + shift + + ssh -xq root@192.168.26.$ip "$@" +} + +function heketi { + node 1 heketi-cli -s http://heketi-storage.glusterfs.svc.cluster.local:8080 --user admin --secret "$(oc get secret heketi-storage-admin-secret -n glusterfs -o jsonpath='{.data.key}' | base64 -d)" "$@" +} |