VisibleThread Help Center

    How to configure VT Readability on Red Hat to connect to an external database

    Follow

    The default configuration when VT Readability is installed uses a local Postgres database. This guide shows you how to connect your VT Readability instance (installed on Red Hat) to an external Postgres database.

    Note: in all snippets below replace <external-postgres-server-or-ip> with your external Postgres server hostname or IP.

    Prerequisites

    Your external Postgres version must be version 10.x and must have the postgres-contrib module installed.

    Setup external VisibleThread database

    Run the sql in this script as the postgres user to setup the external databases/users : vt-readability-db-setup.sql

    psql -h <external-postgres-server-or-ip> -U postgres -f vt-readability-db-setup.sql

    Backup/restore local DB to external DB

    1.   On the local box, backup the DBs :

    cd /opt/visiblethread
    sudo su postgres
    pg_dump vtreadability > /tmp/vtreadabilitybackup.sql
    pg_dump vtinsights > /tmp/vtinsightsbackup.sql

    2. On the local box, restore the backups to the external DB box :

    psql -h <external-postgres-server-or-ip> -U vtinsights -f /tmp/vtinsightsbackup.sql vtinsights
    psql -h <external-postgres-server-or-ip> -U vtreadability -f /tmp/vtreadabilitybackup.sql vtreadability

    Point Readability app at external DB

    Edit the supervisor config file :

    vi /etc/supervisor/conf.d/vt-readability.conf

    and append the following (all on one line) to the line starting with "command=java ..."

    --spring.datasource.primary.url=jdbc:postgresql://<external-postgres-server-or-ip>:5432/vtreadability 
    --spring.datasource.secondary.url=jdbc:postgresql://<external-postgres-server-or-ip>:5432/vtinsights

    Save and quit editing, then restart supervisor : 

    service supervisor restart

    Verify that Readability is using the external DB

    In your web browser, login to VT Readability and run a text scan.

    If you run the following in the external database you should see the text you just analyzed :   

    select title, started_date from scans order by id desc;

     

    Was this article helpful?
    0 out of 0 found this helpful

    Comments