ctti-clinicaltrials / aact

Improving Public Access to Aggregate Content of ClinicalTrials.gov
http://aact.ctti-clinicaltrials.org
MIT License
126 stars 34 forks source link

kostik/ReadMe file assessment/AACT-511 #1064

Closed kostik700015 closed 1 year ago

kostik700015 commented 1 year ago

ReadMe changelog with explanations.

Common for Core and Admin apps setting up problems:

  1. Keep in mind that Ubuntu versions 22.04 and newer have no built-in openssl 1.1.1 and it causes problems with the installation of ruby versions older than 3.02 (information actual 6/20/2023).
  2. According to AACT-core and AACT admin readmes it is unclear how these 2 apps will interact with each other, the purpose of the Core app is unclear.
  3. Keep in mind, that in those 2 lines in the environment variables file: export AACT_CORE_DATABASE_URL=postgres://username:passw@localhost:5432/aact export AACT_CORE_TEST_DATABASE_URL=postgres://username:passw@127.0.0.1:5432/aact_test username - is your Postgresql DB username, passw - your postgres DB password.

AACT-core

  1. On step 2: "psql postgres this allows you to enter the postgres database that comes with PostgreSQL." -- more clear: " Enter "psql postgres" command in terminal to open postgres console and enter commands below to set up Postgres database." I had problems with that command - my administrator user could not open the console with it and got the error message: "psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "kostik" does not exist" That command helps in that case: "sudo -u postgres psql"
  2. Here on step 3 "If your terminal asks for a password when logging in to psql you can give it the password automatically by adding it to the “.pgpass” file. If you haven’t been asked for a password, you can skip this step. The “.pgpass” should be at your root. echo 'localhost:5432:aact::' >> ~/.pgpass Now check that you can login to psql without giving a password psql -U aact_pg_user -d postgres You can exit the shell once you see you can log in without a password." More clear for me "psql U -d postgres" than "aact_pg_user"
    1. On step 7 says "Install a ruby version manager like rbenv, then install Ruby 2.6.2" but later on step 8 I got a error "Install a ruby version manager like rbenv, then install Ruby 2.6.2" Looks like readme is outdated and now we use ruby 2.7.7 in AACT. I updated ruby version in the readme.
    2. On step 9 says: "Use the "connections.yml.example" file and copy it to the file "connnections.yml" and just update what needs to be updated for the local environment. In the terminal, type cp connections.yml.example connections.yml."
      • I could not find file connections.yml and the command: "cp connections.yml.example connections.yml" fails too. I've created connections.yml manually and put there content of connections.yml.example.
    3. We don't need step 11 "Grant read_only privileges" anymore. I deleted that.

Example of a set of environment variables:

export AACT_PUBLIC_BETA_DATABASE_NAME=aact export AACT_PUBLIC_DATABASE_NAME=aact export AACT_ALT_PUBLIC_DATABASE_NAME=aact_alt export AACT_PASSWORD=54104754 export AACT_USERNAME=user_name export PGPASSWORD=passw export TEST_PUBLIC_DB_USER=user_name export TEST_PUBLIC_DB_PASS=passw export PUBLIC_DB_USER=user_name export PUBLIC_DB_PASS=passw export AACT_DB_SUPER_USERNAME=user_name export PATH=$PATH:/lib/postgresql/15/bin export AACT_CORE_DATABASE_URL=postgres://DB_USER_NAME:DB_PASSW@localhost:5432/aact export AACT_CORE_TEST_DATABASE_URL=postgres://DB_USER_NAME:DB_PASSW@127.0.0.1:5432/aact_test # Add RVM to PATH for scripting. Make sure this is the last PATH variable change. export PATH="$PATH:$HOME/.rvm/bin"

AACT-admin

At the very beginning of the readme file tells about environmental variables again, which should be set up. Some of these variables were not added before, for aact core, but aact core suppose to be installed 1st, and variables for both apps have to be in 1 file. Make sense to do all variables installation section within aact-core.