LexAccess

LexAccess Web Tools Ci-Cd Procedures

This page describes steps for develop, stage and deploy LexAccess Tools.

I. Annual Updates on Data only

  • Local Development, build & Test (lhc-lx-lexdev)
    • put HsqlDb files (both UTF-8 and ASCII) to ${PROJECTS}/LA/laData/HSqlDb
    • adding ${YEAR} and ${YEAR}ASCII in ${PROJECTS}/LA/laData/WEB-INF/lexiconFile
    • shutdown and restart tomcat (sudo systemctl restart tomcat)
    • test LexAccess Web Tool on lexdev from broswer

  • Ci-Cd Build & Test (lhx-lx-lexdev01) - skip
    • put HsqlDb files (both UTF-8 and ASCII) to /data/HSqlDb/
    • put updated lexiconFile to /data/WEB-INF/
    • restart tomcat server (clear up cached files)

  • Ci-Cd LHC Stage & Production
    Ask Anton to
    • put 6 HsqlDb files (both UTF-8 and ASCII) to /data/HSqlDb/ (EFS share/NFS)
    • put updated lexiconFile to /data/WEB-INF/ (EFS share/NFS)
    • restart tomcat server (clear up cached files)

II. Annual Updates on Software and Data

  • Ci-Cd Concepts
    • use maven to build and get artifacts dependencies from LHC-nexus/lhc-maven-releases/.../lexAccess/...
    • Dockerfile: get LHC-nexus/lhc-lexicon-raw/www/lexAccess/${YEAR}/lexAccess${YEAR}lite.tgz
    • persistent data for LexAccess database over the years installed on /data
      • HSqlDb/* (DB data files)
      • WEB-INF/lexiconFile

  • Local Development, build & Test
    • host: lexdev
    • dependencies: ./src/main/webapp/WEB-INF/lib/lexAccess${YEAR}dist.jar
    • dir: WebLexAccess-p
    • modify contents
      • updates ./src/main/webapp/WEB-INF/web.xml (from web.xml./lexdev)
      • updates ${PROJECTS}/LA/laData/WEB-INF/lexiconFile
      • ...
    • compiler tool: ant (build.xml)
      • ant clean: delete ./build
      • ant: generate ./build/
      • ant deploy: copy ./build to ${TOMCAT}/webapps/lexAccess.${YEAR}
    • update ${TOMCAT}/webapps/lexAccess.${YEAR}/WEB_INF/web.xml with web.xml.lexdev
    • test LexAccess Web Tool on lexdev from broswer

  • Ci-Cd Build & Test

    After passing the test on lexdev, conduct Ci-Cd build and test.

    • host: lexdev01
    • dependencies on LHC-Nexus:
      • lexAccess.2023.2
    • dir: WebLexAccess-p
    • modify contents if needed
      • updates ./src/main/webapp/WEB-INF/web.xml (from web.xml-CiCd)
      • updates /data/WEB-INF/lexiconFile
      • updates /data/HSqlDb/*
      • ...
    • compiler tool: maven (pom.xml)
      • mvn clean
      • mvn package
      • mvn deploy
    • Docker Ci-Cd: - make all_local:
      • make clean
      • make login
      • make build_app
      • make build_nginx
      • make run_local
    • test LexAccess Web Tool on lexdev01 from broswer
    • docker image:
      shell>docker exec -ti weblexaccess-tomcat bash (tunnel in to docker image)
      /lexAccess2023lite
      /data/HsqlDb/*
      /data/WEB-INF/lexiconFile
      /usr/local/tomcat/webapps/WebLexAccess.war
      /usr/local/tomcat/webapps/WebLexAccess
      /usr/local/tomcat/webapps/logs/localhost.yyyy-mm-dd.log
      ...
      		

  • Ci-Cd Build
    • shell>git add -A
    • shell>git commit -m "LEX, ..."
    • shell>git push

  • Ci-Cd Push to Stage
    • shell>git tag (show all tags)
    • shell>git tag -a v.${YEAR}.0 -m "msg"
    • shell>git push origin tagName (push a tag to remote origin)

  • Ci-Cd deploy to Production
    => Login to LHC-Git, press the arrow botton at the end of Ci-Cd pipeline to deploy WebLexAccess to public.