summaryrefslogtreecommitdiffstats
path: root/roles/etcd/files
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-11-14 15:16:11 -0500
committerGitHub <noreply@github.com>2016-11-14 15:16:11 -0500
commitae34dc20b9e797d6b73576b30b73931beca693ec (patch)
treed8e3f3d52ae078fbecd19df3cacb4d1bab65986f /roles/etcd/files
parent8e872d99d99c6451ecd28f56931926f30fa1b613 (diff)
parent371c36eae16644bda921550371da713e63e44fac (diff)
downloadopenshift-ae34dc20b9e797d6b73576b30b73931beca693ec.tar.gz
openshift-ae34dc20b9e797d6b73576b30b73931beca693ec.tar.bz2
openshift-ae34dc20b9e797d6b73576b30b73931beca693ec.tar.xz
openshift-ae34dc20b9e797d6b73576b30b73931beca693ec.zip
Merge pull request #2562 from sdodson/etcd3
etcd upgrade playbooks
Diffstat (limited to 'roles/etcd/files')
-rw-r--r--roles/etcd/files/etcdctl.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/etcd/files/etcdctl.sh b/roles/etcd/files/etcdctl.sh
new file mode 100644
index 000000000..0e324a8a9
--- /dev/null
+++ b/roles/etcd/files/etcdctl.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Sets up handy aliases for etcd, need etcdctl2 and etcdctl3 because
+# command flags are different between the two. Should work on stand
+# alone etcd hosts and master + etcd hosts too because we use the peer keys.
+etcdctl2() {
+ /usr/bin/etcdctl --cert-file /etc/etcd/peer.crt --key-file /etc/etcd/peer.key --ca-file /etc/etcd/ca.crt -C https://`hostname`:2379 ${@}
+}
+
+etcdctl3() {
+ ETCDCTL_API=3 /usr/bin/etcdctl --cert /etc/etcd/peer.crt --key /etc/etcd/peer.key --cacert /etc/etcd/ca.crt --endpoints https://`hostname`:2379 ${@}
+}