gradle-war-deployer for karuta embed deployed app on tomcat, like the tomcat-manager, psi-probe
For installation and migration details please read the documentation on the wiki
Following are only additional informations for the project !
run with java 11 minimum
- customize tomcat path install
cp build.properties.sample build.propertiesand editbuild.properties - run
./gradlew tomcatInstallto- unzip tomcat from offical sources
- deploy custom conf from
etc/tomcat/- this task call thetomcatConfigtask that could be used for deploying only a new tomcat conf on an existing tomcat - copy karuta backend and filserver config from
etc/karuta/into$PROJECT_HOMEpath.- the default path use
$CATALINA_BASEif set, orserver.baseproperty frombuild.properties - this variable will be overriden by
$KARUTA_HOMEif set - if no
$KARUTA_HOMEis set, this can be overriden byproject.homeproperty frombuild.propertiesor passed in argument of all gradle commands - WARNING:
etc/karuta/path is defined fromappNameproperty intogradle.properties, don't modify it !
- the default path use
- run
./gradlew tomcatDeploy --refresh-dependencieswill deploy on tomcat webapps directorypsi-probefor tomcat overview and managementkaruta-backendkaruta-fileserverkaruta-frontend(onkaruta)
- run
./gradlew deployKarutaConfigto deploy into tomcat webapps thekaruta-configwebapp frometc/karuta-config/ - customize your jvm env with a such configuration example to adapt:
You should set jvm env variables
You can set the env conf into the ${karutaDeployerPath}/etc/tomcat/bin/setenv.sh or in your script runing the tomcat start command.
NOTE 1: You can have a git repository to manage karuta-backend_config and karuta-fileserver_config, or have a NFS shared directory for all *_config + fileserver_data on which you apply snapshot save.
NOTE 2: You can set KARUTA_REPORT_FOLDER environnement variable to customize the folder where log reports will be produced.
The database should be created first with required grants for the server where is deployed Karuta. For that you can use the sql script etc/database/karuta-account.sql as example.
NB: The database should be tuned with this conf:
- create custom file for mariadb 10.5 on debian 11 like
/etc/mysql/mariadb.conf.d/51-custom.cnf - edit and add the content
[mariadb]
tmp_memory_table_size=2G
max_heap_table_size=2G
Following provide all commands that you should run from the project (it's an example on what can be done):
mysql -h${sql.server.host} -u ${user} -p ${password} ${database} < etc/database/karuta-backend-func.sqlmysql -h${sql.server.host} -u ${user} -p ${password} ${database} < etc/database/karuta-backend.sqlmysql -h${sql.server.host} -u ${user} -p ${password} ${database} < etc/database/report-helper.sql
Most important file to watch on is etc/tomcat/server.xml:
- the connector configured by default is for proxy HTTP and not for AJP
- you can set the
<resource></resource>to use a secured, managed, monitored from jmx JDBC pool. The default conf is nearly a good one for production - accesslog valve is configured for a HAproxy frontend
You should set a proxy http configurations on a frontal server
./gradlew tomcatStart
Connect to the Karuta app and import the ZIP files that are into etc/model/ in the order of file names (a number provide the order to import).
Before any upgrade, consider to make:
- a dump of the database
- a backup of the fileserver data (path from $KARUTA_HOME/karuta-fileserver_data/)
For most case you should only do some git command updates to upgrade the karuta-deployer which permit to upgrade all karuta's apps. But see all docs indicated, or watch around commit change on this project for more actions during upgrade process.
# save local change and sync remote repositories
git stash && git fetch --all
# Checkout the version of your choice
git checkout -b v1.0.8 v1.0.8
# re-apply local changes
git stash --apply
# watch all files properties for changes (_init.js, configKaruta.properties)
./gradlew tomcatInstall
./gradlew tomcatDeploy
./gradlew deployKarutaConfig- When migrating from kapc1.2 or 1.3.x, apply :
mysql -h${sql.server.host} -u ${user} -p ${password} ${database} -e "DROP TABLE vector_table;"mysql -h${sql.server.host} -u ${user} -p ${password} ${database} < etc/database/report-helper.sql