cpan-testers / cpantesters-deploy

Deploy scripts and configuration file for CPANTesters servers
4 stars 0 forks source link

Move common database configuration to this repository #22

Open preaction opened 6 years ago

preaction commented 6 years ago

We should have all of our database configuration in one place, this repository. This includes the database host, database port, database name, username, and password. This should be configured in the Rexfile, and written into templated configuration files as such:

  1. ~/.cpanstats.cnf - This is already being deployed
  2. ~/etc/container/common.yml - Create a "schema" and "metabase_dbh" object
  3. ~/etc/dbrc - Set the BEAM_PATH and BEAM_MINION (and other) environment variables that involve the database configuration

These should be deployed as part of the cpantesters user to be used by all other programs.

Once this is done, we must go through the other programs and use these instead:

  1. cpantesters-api has service files that need to source the dbrc file
  2. cpantesters-web has service files that need to source the dbrc file
  3. cpantesters-backend has service files that need to source the dbrc file
  4. cpantesters-backend has the original etc/container/common.yml that must be deleted