From 10c8dc85ba58398203046c4c303689c8d3e45bd5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 13 Jan 2020 12:14:30 +0100 Subject: [PATCH] Begin hacky database handling --- uncloud/hack/hackcloud/db.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 uncloud/hack/hackcloud/db.py diff --git a/uncloud/hack/hackcloud/db.py b/uncloud/hack/hackcloud/db.py new file mode 100644 index 0000000..3d885e9 --- /dev/null +++ b/uncloud/hack/hackcloud/db.py @@ -0,0 +1,17 @@ +import etcd3 + + +if __name__ == '__main__': + endpoints = [ "https://etcd1.ungleich.ch:2379", + "!https://etcd2.ungleich.ch:2379", + "https://etcd3.ungleich.ch:2379" ] + + clients = [] + + for endpoint in endpoints: + client = etcd3.client(host=endpoint, + ca_cert="/home/nico/vcs/ungleich-dot-cdist/files/etcd/ca.pem", + cert_cert="/home/nico/vcs/ungleich-dot-cdist/files/etcd/nico.pem", + cert_key="/home/nico/vcs/ungleich-dot-cdist/files/etcd/nico-key.pem") + + clients.append(client)