As a developer, ansible-pulp will provide me with the cool postgres WebGUI
The following PoC was done. For implementation, it can be incorporated into the pulp-devel role, and pulplift.
On the host, reconnect to the pulplift VM pulp3-source-fedora31 with a new SSH tunnel (this will be added to pulplift config during implementation):
vagrant ssh pulp3-source-fedora31 -- -L 8443:127.0.0.1:8443
On the pulplift VM pulp3-source-fedora31:
Modified /var/lib/pgsql/data/pg_hba.conf to replace the 127.0.0.1 line with:
host all all 0.0.0.0/0 md5
(Because the container has a NAT'd IP address.)
Modified /var/lib/pgsql/data/postgresql.conf to contain
listen_addresses = '*'
(Because otherwise it's localhost only; see above.)
sudo systemctl restart postgresql.service sudo dnf install -y podman-docker docker pull dpage/pgadmin4 # "--restart always" will be ignored for podman-docker. Only real docker/moby-engine will use it. podman will need a systemd unit to survive VM reboots. docker run --restart always -p 8443:8443 -e 'PGADMIN_DEFAULT_EMAILfirstname.lastname@example.org' -e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' -e 'PGADMIN_LISTEN_PORT=8443' -d dpage/pgadmin4
Now back on your host:
Open your browser to:
And login with the username/email and password listed above.
Then create a new connection to:
The IP address of the pulplift VM
(These settings will later be set via PGADMIN_SERVER_JSON_FILE)
So I first suggested pgadmin because I thought it was kind of an official tool, apparently it's just a community tool just like any other community tool. I didn't do much research towards what other alternatives existed.
Apparently, out of all the commonly-used GUI database tools for postgres, PGAdmin4 is actually considered to be the most painful and unituitive to use and to set up (especially to set up). Actually the fact that it's such a pain to set up is the reason this issue was filed in the first place.
If other tools like DBeaver (FOSS) and Jetbrains DataGrip are better and also vastly easier to set up, then I'm not sure how much we need this issue any longer. Maybe the only thing we need to do is add some notes or a default (developer-only) configuration for exposing the database through the VM to make it easier to connect to from a developer system.
Please register to edit this issue