EXODUS Knowledge: Difference between revisions

From NEOSYS Technical Support Wiki
Jump to navigationJump to search
No edit summary
mNo edit summary
Line 59: Line 59:
*Backup <dbcode>.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/
*Backup <dbcode>.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/
*Unlike AREV, postgres can perform a "backup" of a database whilst the system is in use.
*Unlike AREV, postgres can perform a "backup" of a database whilst the system is in use.
==Git==
There are two repositories, one for EXODUS and the other for NEOSYS.
As of 22/08/21, each repository has two main branches, master and dev.
The development branch
The Dev branches in each git repos are named: for:
* NEOSYS (linux) - 'dictschema'
* EXODUS        - 'dictdb'
As of 22/08/21, ex1b is a clone of ex1 but used as the development environment.
In order to use ex1b as development environment the
ex1b has to be rebuilt every morning to get the development branch working otherwise it is a pure clone  of ex1 except disabled
I usually do that early in the morning
there is no issue running all processes on ex1b actually since even live process emails to users are all deflected to sysmsg ie neosys
to rebuild as the development branch in ex1b DONT DO THIS IN ex1!!!!!!!!!!!!!!
# in ~/neosys screen 6
# git stash && git pull && git switch dictschema
# ./reinstall o-
note that the development branch in exodus is currently called dictdb, a slightly different name for no good reason
./reinstall first switches exodus to the dictdb branch and rebuilds it


==Converting AREV to EXODUS==
==Converting AREV to EXODUS==
===DECOMPILE AREV to C++===
===Decompile AREV to C++===
(Do in win10a Maintenance mode)
(Do in win10a Maintenance mode)
#Apply tested patch to win10a (master AREV Dev system)
#Apply tested patch to win10a (master AREV Dev system)
Line 69: Line 109:
#*ADECOM <prog1> <prog2> *(CHECK IF THIS WORKS)
#*ADECOM <prog1> <prog2> *(CHECK IF THIS WORKS)


===SEND CPP FILES from win10a to nl19===
===Send c++ files from win10a to nl19===
(Do in win10a Cygwin)
(Do in win10a Cygwin)
#/d/exodus/arev/syncup.sh
#/d/exodus/arev/syncup.sh
===GET CPP FILES from nl19 to exodus===
===Get c++ files from nl19 to exodus===
(Do in Exodus system)
(Do in Exodus system)


Line 79: Line 119:
#Compile single cpp then: c <programname> e.g "c monitor2"
#Compile single cpp then: c <programname> e.g "c monitor2"
#Compile all cpp then: ./compall (PENDING WHICH/WHERE? many compall)
#Compile all cpp then: ./compall (PENDING WHICH/WHERE? many compall)
===INSTALLING INTO TEST SYSTEM===
 
===Compile C++ files to TEST system===
#*./test <DBNAME>
#*./test <DBNAME>
#*~/neosys ./doall TEST <DBNAME> restart    #to get one service to start start using the new lib files
#*~/neosys ./doall TEST <DBNAME> restart    #to get one service to start start using the new lib files
#*~/neosys ./doall TEST all restart                    #to get all the services to start start using the new lib files
#*~/neosys ./doall TEST all restart                    #to get all the services to start start using the new lib files


===INSTALL INTO LIVE SYSTEM===
===Install C++ files to LIVE System===
WARNING
WARNING
#~/exodus/service/ ./copyall            #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services
#~/exodus/service/ ./copyall            #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services
#~/neosys ./doall LIVE all restart
#~/neosys ./doall LIVE all restart

Revision as of 12:13, 23 August 2021

TMUX Screens

To create the EXODUS maintenance/programming environment

exodus#: ./tmux.exodus
SCREEN NAME      STANDARD PATH                            PURPOSE
#ex1_root        - /root                                  - general usage 
#exodus          - /root/exodus                           - 
#exodus src      - /root/exodus/exodus/libexodus/exodus   - LibExodus is the core EXODUS library source files (emulating AREV CRUD)
#exo cli         - /root/exodus/cli/src                   - Core EXODUS program which can be executed from bash (clearfile, edir, edic, compile)
#service         - /root/exodus/service                   - Default working environment for EXODUS only service, including EXODUS core www and data directories. Also used to keep NEOSYS database installation scripts.
#ser src         - /root/exodus/service/src               -
#neosys          - /root/neosys                           - ./doall
#neo src         - /root/neosys/src                       -
#hosts           - /root/hosts                            -   
#test src        - /root/exodus/test/src                  - 
#t10             - ~/                                     - 
#t11             - ~/                                     - 
#t12             - ~/                                     - 


Object Code/Libraries

LIVE and TEST processes use different sets of object code. TEST processes use libraries in ~/lib/, whereas LIVE processes use object code in ~/neo/lib

This means development & testing can be done stress free on TEST database, as opposed to testing on production databases.

When compiling using edic, the TEST object code is updated if the compilation is successful. (~/lib) In order to apply a tested patch to LIVE see Update LIVE programs.

Dictionaries

Dictionaries, the files used to describe the fields of a file's record. Unlike in AREV, there is a copy of all dictionaries in each pgsql database (In AREV, updating a dictionary would affect all the databases).

Processes

The TEST process for all database use the same object code stored in /root/lib, whereas all LIVE process use the object code in /root/neo/.

Postgres

Connect into postgres shell:

sudo -u postgres psql

List databases once in postgres shell:

\l

Delete a database:

sudo -u postgres dropdb <dbcode>

./doall

General

Screen 6: ./doall script contains all the necessary information(codes) to setup an installation. It includes scripts to backup, restore, create an Apache site, create/start/stop/status a service, import an AREV database into postgres and more.

backup_db

  • Does a backup & restore of a LIVE database into the corresponding TEST database.
  • Backup <dbcode>.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/
  • Unlike AREV, postgres can perform a "backup" of a database whilst the system is in use.


Git

There are two repositories, one for EXODUS and the other for NEOSYS.

As of 22/08/21, each repository has two main branches, master and dev. The development branch

The Dev branches in each git repos are named: for:

  • NEOSYS (linux) - 'dictschema'
  • EXODUS - 'dictdb'

As of 22/08/21, ex1b is a clone of ex1 but used as the development environment. In order to use ex1b as development environment the

ex1b has to be rebuilt every morning to get the development branch working otherwise it is a pure clone of ex1 except disabled

I usually do that early in the morning


there is no issue running all processes on ex1b actually since even live process emails to users are all deflected to sysmsg ie neosys


to rebuild as the development branch in ex1b DONT DO THIS IN ex1!!!!!!!!!!!!!!

  1. in ~/neosys screen 6
  1. git stash && git pull && git switch dictschema
  1. ./reinstall o-


note that the development branch in exodus is currently called dictdb, a slightly different name for no good reason

./reinstall first switches exodus to the dictdb branch and rebuilds it



Converting AREV to EXODUS

Decompile AREV to C++

(Do in win10a Maintenance mode)

  1. Apply tested patch to win10a (master AREV Dev system)
  2. ATTACH ADECOMC
    • ADECOM <programname> *single program
    • ADECOMALL *all programs (CHECK THIS FIRST)
    • ADECOM <prog1> <prog2> *(CHECK IF THIS WORKS)

Send c++ files from win10a to nl19

(Do in win10a Cygwin)

  1. /d/exodus/arev/syncup.sh

Get c++ files from nl19 to exodus

(Do in Exodus system)

  1. If cpp in SYS then: ~/exodus/service/src ./getpickos
  2. If cpp in MED JOB FIN GEN AGY then: *~/neosys/src ./getpickos
  3. Compile single cpp then: c <programname> e.g "c monitor2"
  4. Compile all cpp then: ./compall (PENDING WHICH/WHERE? many compall)

Compile C++ files to TEST system

    • ./test <DBNAME>
    • ~/neosys ./doall TEST <DBNAME> restart #to get one service to start start using the new lib files
    • ~/neosys ./doall TEST all restart #to get all the services to start start using the new lib files

Install C++ files to LIVE System

WARNING

  1. ~/exodus/service/ ./copyall #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services
  2. ~/neosys ./doall LIVE all restart