LexBuild

Deploy to A New Machine

The LexBuild system is a web applications requires:

  • Frontend Web GUI by tomcat
  • Backend database
  • Backend: scripts and data files

The configuratin setup for the Web Tools are:
  • ${WEB_LEX_BUILD}/WEB-INF/web.xml
    • lexBuild.cfg
      • DB_**: for database connection
      • LB_**: for lexBuild directory
      • DATA_DIR: for data files to run WebLexBuild
        • tomcat need to have read/access permission to all directories here
        • tomcat need to have write permission (or assign as owner) to directories of MsgTemp & Outputs
      • OUTPUT_DIR: for output data from WebLexBuild
      • GSPELL_**: for gSpell files
      • LB_**_FILE: html files

These components are detailed as follows:

  1. Directory Architecture:

    Copy all related directories and files as follows:

    • Environment Setup
      • Java (JDK): /etc/alternatives/java
      • Ant (Build Tool, only need for development): ${LOCAL}/Applications/Ant

      • Apache (Web documentation server)
      • Tomcat (applications server)

      • JavaDb (Database): ${LOCAL}/Database/JavaDb
    • LexBuild Application Setup
      /usr/local/Lsg/
        +---- Applications (link to filer)
        |      +---- bin: (flds) global script
        |    
        +---- Backup (link to filer)
        |      +---- Routine.${HOST_NAME}
        |             + ---- LexBuild: backup file for LexBuild
        |             + ---- Lexicon: backup file for Lexicon
        |    
        +---- Projects (link to filer)
               +---- LA
               +---- LB
                      + ---- GSpell: GSpell for close match
      				       +----- ${HOST_NAME}
                      + ---- LexBuild: LexBuild main program
      				       +----- data.${HOST_NAME}
      

  2. Prepare data files:

    Get 9 data files for database from Backup directory and put into following locations:
    Dir: ${LB}/data.${HOST_NAME}/DbTables/Tables

    File NameTable NameNotes
    comments.bakLEX_RECORD_COMMENTSComment fields for Lexical records
    eui.bakEUIThe latest EUI used
    inflVars.bakINFL_VARSinflection variables
    inflVarsTemp.bakINFL_VARS_TEMPinflectional variables for records to be approved
    lexicon.bakLEX_RECORDLexical records
    lexiconDeny.bakLEX_RECORD_DENYdenied Lexical records
    lexiconTemp.bakLEX_RECORD_TEMPLexical records to be approved
    newTerms.bakNEW_TERMSNew terms (auto-generated) should be added into LexBuild
    user.bakUSERUser information

  3. Create database and user into database
    • JavaDb
      • /usr/local/Database/JavaDb/bin/shutdownJavaDb
      • Edit /usr/local/Database/JavaDb/data/derby.properties
        add derby.user.lexBuild=lexBuild@2004
      • /usr/local/Database/JavaDb/bin/startJavaDb

  4. Create database tables and load data into database tables
    • Update Config & script:
      • ${LB}/data/WebApp/Config/db.cfg
      • ${LB}/data/WebApp/Config/db1.cfg
      • ${LB}/data/WebApp/Config/db2.cfg
      • ${LB}/Tools/LoadDb/DbScript
    • cd ${LB}/Tools/LoadDb
    • DbScript
      => Update DbScript
      => Also Update GenScript
      => Use this program to create database tables and load data into them

  5. Deploy Web application: WebLexBuild from development (lexdev) to deployment (lexsrv2)
    • Copy webLexBuild from development to public server
    • Update Config file, $WEB_LEX_BUILD/WEB-INF/web.xml

  6. Install GSpell
    • Refer to Close Match pages for details. This step can be skip if GSpell is installed.
    • The dictionary in Gspell need to be in local machine (not in filer)

  7. Update Scripts
  8. Update scripts under ${LB}/Tools/WebScript

  9. Update other scripts under ${LB}/Tools if you want to use them
    => All scripts used in crontab
    => All scripts used in Postprocessing (if used here, usually use in the development)
    => All scripts used in Lib (if used here, usually use in the development)

  10. Index GSpell dictionaries
    • shell> cd ${LB}/Tools/WebScript
    • shell> ReIndexDic 1 foo (>= 30 min.)

  11. Setup Routine crontab job
    • Use crontab for routine backup
    • update ${LB}/Tools/Maint/cronTabAll
    • update ${LB}/Tools/Maint/cronTabLatest
    • shell> crontab cornTabAll

  12. Start up LexBuild Web Application server
    • Update ${LB}/data/WebApp/Config/lexBuild.cfg
    • > sudo systemctl stop tomcat_${HOST_NAME}
    • > systemctl status tomcat_${HOST_NAME}
    • > sudo systemctl start tomcat_${HOST_NAME}
      => This step is needed for the GSpell to be initiated correctly

  13. Reindex & reload GSpell dictionaries in LexBuild
    This step can be skip if GSpell is installed and work fine

  14. Copy LexBuild Web Site (Documents)