Skip to content

How to Run Decision Engine

Dmitry Litvintsev edited this page Feb 24, 2020 · 31 revisions

Decision engine uses postgresql database back-end.

Install postgresql

Default postgresql installed on RH7 is 9.2 which is outdated. Suggest to remove it and install 11 instead :

  1. Remove old postgresql
yum erase -y postgresql*
  1. Install postgresql 11
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install -y postgresql11 postgresql11-server
  1. Enable postgresql
systemctl enable postgresql-11
``
4. Init db 

/usr/pgsql-11/bin/postgresql-11-setup initdb

5. edit `/var/lib/pgsql/11/data/pg_hba.conf` like so:

[root@fermicloud371 ]# diff /var/lib/pgsql/11/data/pg_hba.conf /var/lib/pgsql/11/data/pg_hba.conf 80c80 < local all all peer

local all all trust 82c82 < host all all 127.0.0.1/32 ident


host all all 127.0.0.1/32 trust 84c84 < host all all ::1/128 ident


host all all ::1/128 trust

(that is setting authentication method is `trust`) 
1. start database 

systemctl start postgresql-11

1. create decisionengine 

createdb -U postgres decisionengine

1. create database schema

psql -U postgres decisionengine -f /usr/lib/python2.7/site-packages/decisionengine/framework/dataspace/datasources/postgresql.sql