21 lines
1.2 KiB
Bash
21 lines
1.2 KiB
Bash
# @todo this script is meant for first-time setup of the cluster
|
|
# it sets up the UI to have a futureporn postgres server connection
|
|
#
|
|
# @see https://www.pgadmin.org/docs/pgadmin4/development/import_export_servers.html#json-format
|
|
#
|
|
|
|
bindir=$(dirname "$(readlink -fm "$0")")
|
|
|
|
# kubectl -n futureporn exec pgadmin -- /usr/bin/python /pgadmin4/setup.py load-servers pgadmin-connection-profile.json
|
|
# kubectl -n futureporn exec pgadmin -- /usr/bin/python3 /pgadmin4/setup.py
|
|
kubectl -n futureporn cp ${bindir}/pgadmin-connection-profile.json pgadmin:/tmp/pgadmin-connection-profile.json
|
|
# kubectl -n futureporn exec pgadmin -- chown root:root /tmp/pgadmin-connection-profile.json
|
|
# kubectl -n futureporn exec pgadmin -- mv /tmp/pgadmin-connection-profile.json /pgadmin4/pgadmin-connection-profile.json
|
|
# kubectl -n futureporn cp pgadmin:/tmp/pgadmin-connection-profile.json pgadmin:/tmp/pgadmin-connection-profile.json
|
|
kubectl -n futureporn exec pgadmin -- ls -la /tmp/
|
|
kubectl -n futureporn exec pgadmin -- cat /tmp/pgadmin-connection-profile.json
|
|
kubectl -n futureporn exec pgadmin -- /venv/bin/python3 setup.py load-servers /tmp/pgadmin-connection-profile.json --replace --user cj@futureporn.net
|
|
|
|
|
|
|