Begin hacky database handling
This commit is contained in:
parent
091131d350
commit
10c8dc85ba
1 changed files with 17 additions and 0 deletions
17
uncloud/hack/hackcloud/db.py
Normal file
17
uncloud/hack/hackcloud/db.py
Normal file
|
@ -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)
|
Loading…
Reference in a new issue