Open karlcz opened 6 years ago
Updating this old issue with current (manually tested) status. A deployed cluster can be converted to a remote DB with adjustments to the postgres DSN strings in ermrest_config.json
and a local ~ermrest/.pgpass
file to hold credentials for the connection.
However, the ermrest-deploy script still assumes a local DB cluster and runs a number of psql commands via sudo. This whole process needs more thought. Presumably, the high privileges used during the deploy process should not be available to the normal web service host. So, perhaps the deployment process should remain a local process the DBA runs on the real DB cluster host? Or perhaps we should more clearly separate:
In a more complex setup, the maintenance steps might be run from a separate DBA workstation or other client machine, rather than the actual web service host. This holds true for optional cron jobs as well.
Our current packaging and deploy mechanism defaults to and assumes a local web stack on a single server. It uses unix domain sockets between the web server and database, as well as scripts invoking
psql
to connect to the local database server.The core system has some primitive but under-used support for a non-local database:
ermrest_config.json
However, to make the software truly usable with multiple web server instances, e.g. for load-balancing, we need to fill in and test several gaps:
Additional enhancements may also be worthwhile when refactoring any of this code: