From c4ab5893b4e7b0c7a53ef5b05576ae5f613977d7 Mon Sep 17 00:00:00 2001 From: Pavol Ipoth Date: Sat, 2 Mar 2019 00:51:41 +0100 Subject: [PATCH] Add README how to generate ER diagram --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 7c3e14c..f250385 100644 --- a/README.md +++ b/README.md @@ -156,3 +156,21 @@ delete record: ``` curl -H 'Content-Type: application/json' -X PATCH --data '{"rrsets": [ {"name": "test.yourdomain.com.", "type": "A", "ttl": 86400, "changetype": "DELETE"}]}' -H 'X-API-Key: YUdDdGhQM0tMQWV5alpJ' http://localhost:9191/api/v1/servers/localhost/zones/yourdomain.com | jq ``` + +### Generate ER diagram + +``` +apt-get install python-dev graphviz libgraphviz-dev pkg-config +``` + +``` +pip install graphviz mysqlclient ERAlchemy +``` + +``` +docker-compose up -d +``` + +``` +eralchemy -i 'mysql://powerdns_admin:changeme@'$(docker inspect powerdns-admin-mysql|jq -jr '.[0].NetworkSettings.Networks.powerdnsadmin_default.IPAddress')':3306/powerdns_admin' -o /tmp/output.pdf +```