Created
May 16, 2018 16:40
-
-
Save lloesche/070932483faee3c2850cd23433b977a0 to your computer and use it in GitHub Desktop.
dump DC/OS pre-cockroachdb IAM data
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 python3 | |
import logging | |
logging.basicConfig() | |
from kazoo.client import KazooClient | |
zk = KazooClient(hosts='10.0.28.160:2181', auth_data=[("digest", "super:xxxxxxxxxx")]) | |
zk.start() | |
data, stat = zk.get("/bouncer/datastore/data.json") | |
text_file = open("data.json", "w") | |
text_file.write(data.decode("utf-8")) | |
text_file.close() | |
zk.stop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment