From b0ebb500e944a572e1054cce57a7a948845bc9bf Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Wed, 20 Dec 2023 12:37:30 +0100 Subject: [PATCH 01/28] Update Kitodo.Production to current state and update manager --- .env | 5 ++- Makefile | 10 ++++-- _modules/ocrd_manager | 2 +- .../kitodo-sample/sql/kitodo_post_init.sql | 36 +++++++++---------- .../data/scripts/script_ocr_process_dir.sh | 3 ++ 5 files changed, 30 insertions(+), 26 deletions(-) diff --git a/.env b/.env index 1144471..239cd5e 100644 --- a/.env +++ b/.env @@ -39,8 +39,8 @@ CONTROLLER_WORKERS=1 # number of workers for processing # Application Kitodo.Production (with-kitodo-production) APP_IMAGE=ghcr.io/slub/ocrd_kitodo/kitodo_production_ocrd:latest # name and tag of image APP_BUILD_CONTEXT=${PWD}/_modules/kitodo-production-docker/ # directory of Dockerfile -APP_BUILDER_GIT_REF=ocrd-main # branch "ocrd-main" of git repository (cause using `git` as `BUILDER_TYPE`) -APP_BUILDER_GIT_REPOSITORY=markusweigelt/kitodo-production # repository of `BUILDER_GIT_COMMIT` (cause using `git` as `BUILDER_TYPE`) +APP_BUILDER_GIT_REF=master # branch "ocrd-main" of git repository (cause using `git` as `BUILDER_TYPE`) +APP_BUILDER_GIT_REPOSITORY=kitodo/kitodo-production # repository of `BUILDER_GIT_COMMIT` (cause using `git` as `BUILDER_TYPE`) APP_DATA=${PWD}/kitodo/data # persistent volume of application data to mount, e.g. config and modules APP_KEY=${PWD}/kitodo/.ssh/id_rsa # file path with private SSH key of `ocrd` user (should match one of `MANAGER_KEYS`) APP_PORT=8080 # host-side port of Kitodo.Production @@ -65,4 +65,3 @@ ES_NODE_PORT=9300 # host-side port to inter-node protocol MQ_IMAGE=ghcr.io/slub/kitodo-production-activemq:latest # name and tag of image MQ_HOST=kitodo-mq # name/address of server (for Kitodo/Manager) MQ_PORT=61616 # host-side port to exposed TCP Transport -MQ_CLIENT_QUEUE=TaskActionQueue diff --git a/Makefile b/Makefile index f8a9d40..78c8e36 100644 --- a/Makefile +++ b/Makefile @@ -139,13 +139,19 @@ $(CONTROLLER_MODELS)/ocrd-resources/ocrd-tesserocr-recognize/frak2021.traineddat wget -O $@ https://ub-backup.bib.uni-mannheim.de/~stweil/tesstrain/frak2021/tessdata_best/frak2021-0.905.traineddata build: - docker compose build + docker compose build $(SERVICES) + +rebuild: + docker compose stop $(SERVICES) + docker compose build $(SERVICES) + docker compose start start: docker compose up -d down: - docker compose down + @echo -n "Are you sure? [y/N] " && read ans && [ $${ans:-N} = y ] + docker compose down -v stop: docker compose stop diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index e8c06e0..60022d9 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit e8c06e0e0a71a4249394f3f3790c3dbcc0e5fdbf +Subproject commit 60022d93f44a53c15669c92e67c17720460a3665 diff --git a/_resources/kitodo-sample/sql/kitodo_post_init.sql b/_resources/kitodo-sample/sql/kitodo_post_init.sql index 61cb3b6..4020166 100644 --- a/_resources/kitodo-sample/sql/kitodo_post_init.sql +++ b/_resources/kitodo-sample/sql/kitodo_post_init.sql @@ -1,15 +1,12 @@ -INSERT INTO `ocrprofile` (`id`, `title`, `file`, `client_id`) VALUES - (1, 'OCR Workflow Example', '/workflows/ocr-workflow-default.sh', 1); - INSERT INTO `ruleset` (`id`, `title`, `file`, `orderMetadataByRuleset`, `indexAction`, `active`, `client_id`) VALUES (4, 'Ruleset', 'ruleset_default.xml', 0, 'INDEX', 1, 1); INSERT INTO `workflow` (`id`, `title`, `status`, `indexAction`, `client_id`, `separateStructure`) VALUES (2, 'OCR_Workflow', 'ACTIVE', 'INDEX', 1, 0); -INSERT INTO `template` (`id`, `title`, `creationDate`, `sortHelperStatus`, `ruleset_id`, `docket_id`, `indexAction`, `workflow_id`, `active`, `client_id`, `ocr_profile_id`) VALUES - (1, 'Example Template', '2021-11-22 17:52:48', NULL, 4, 1, 'INDEX', 1, 1, 1, 1), - (2, 'Template_OCR', '2022-03-10 16:42:15', NULL, 4, 1, 'INDEX', 2, 1, 1, 1); +INSERT INTO `template` (`id`, `title`, `creationDate`, `sortHelperStatus`, `ruleset_id`, `docket_id`, `indexAction`, `workflow_id`, `active`, `client_id`) VALUES + (1, 'Example Template', '2021-11-22 17:52:48', NULL, 4, 1, 'INDEX', 1, 1, 1), + (2, 'Template_OCR', '2022-03-10 16:42:15', NULL, 4, 1, 'INDEX', 2, 1, 1); INSERT INTO `process` (`id`, `title`, `inChoiceListShown`, `sortHelperStatus`, `sortHelperImages`, `sortHelperArticles`, `sortHelperDocstructs`, `sortHelperMetadata`, `creationDate`, `wikiField`, `project_id`, `ruleset_id`, `docket_id`, `indexAction`, `processBaseUri`, `template_id`, `parent_id`, `ordering`, `exported`) VALUES (3, 'CaelCaFeD_1761630636', 0, '060020000020', 0, 0, 0, 0, '2022-03-10 16:43:28', '', 1, 4, 1, 'INDEX', '3/', 2, NULL, NULL, 0); @@ -43,13 +40,13 @@ INSERT INTO `task` (`id`, `title`, `ordering`, `processingStatus`, `editType`, ` (8, 'Export DMS', 4, 0, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 1, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 1, NULL, 'Task_4', 0, 1, 0, 0, 0, 0), (18, 'Scanning', 1, 1, 4, '2022-03-10 16:42:51', NULL, NULL, 0, 0, 0, 1, 1, 0, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_1', 0, 0, 0, 0, 0, 0), (19, 'QC', 2, 0, 0, NULL, NULL, NULL, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_2', 0, 0, 0, 0, 0, 0), - (20, 'OCR from Process Dir', 3, 0, 0, NULL, NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --workflow {ocrprofilefile} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0), + (20, 'OCR from Process Dir', 3, 0, 0, NULL, NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0), (21, 'Structure and Metadata', 4, 0, 0, NULL, NULL, NULL, 0, 1, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_3', 0, 0, 0, 0, 0, 0), (22, 'Export DMS', 5, 0, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 1, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_4', 0, 0, 0, 0, 0, 0), (23, 'OCR from Export Dir', 6, 0, 0, NULL, NULL, NULL, 0, 0, 1, 0, 0, 0, 0, 'OCR Export Dir', '/usr/local/kitodo/scripts/script_ocr_export_dir.sh {processtitle} {stepid}', 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Activity_12zha6z', 0, 1, 0, 0, 0, 0), (24, 'Scanning', 1, 3, 3, NOW(), NULL, NULL, 0, 0, 0, 1, 1, 0, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_1', 0, 0, 0, 0, 0, 0), (25, 'QC', 2, 3, 3, NOW(), NULL, NULL, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_2', 0, 0, 0, 0, 0, 0), - (26, 'OCR from Process Dir', 3, 1, 3, NOW(), NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --workflow {ocrprofilefile} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0), + (26, 'OCR from Process Dir', 3, 1, 3, NOW(), NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0), (27, 'Structure and Metadata', 4, 0, 3, NOW(), NULL, NULL, 0, 1, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_3', 0, 0, 0, 0, 0, 0), (28, 'Export DMS', 5, 0, 3, NOW(), NULL, NULL, 0, 0, 0, 0, 0, 1, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_4', 0, 0, 0, 0, 0, 0), (29, 'OCR from Export Dir', 6, 0, 3, NOW(), NULL, NULL, 0, 0, 1, 0, 0, 0, 0, 'OCR Export Dir', '/usr/local/kitodo/scripts/script_ocr_export_dir.sh {processtitle} {stepid}', 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Activity_12zha6z', 0, 1, 0, 0, 0, 0); @@ -166,17 +163,16 @@ INSERT INTO `role_x_authority` (`role_id`, `authority_id`) VALUES (1, 189), (1, 190), (1, 191), - (1, 192), - (1, 193), - (1, 194), - (1, 195), - (1, 196), - (1, 197), - (1, 198), - (1, 199), - (1, 200), - (1, 201), - (1, 202); + (1, 192), + (1, 193), + (1, 194), + (1, 195), + (1, 196), + (1, 197), + (1, 198), + (1, 199), + (1, 200), + (1, 201); INSERT INTO `task_x_role` (`role_id`, `task_id`) VALUES (1, 5), @@ -228,4 +224,4 @@ INSERT INTO `workpiece_x_property` (`process_id`, `property_id`) VALUES (3, 39), (3, 40); -UPDATE project SET dmsImportRootPath = '/usr/local/kitodo/dms-export/' WHERE id = 1; +UPDATE project SET dmsImportRootPath = '/usr/local/kitodo/export/' WHERE id = 1; diff --git a/_resources/kitodo/data/scripts/script_ocr_process_dir.sh b/_resources/kitodo/data/scripts/script_ocr_process_dir.sh index 4258e39..7a84056 100755 --- a/_resources/kitodo/data/scripts/script_ocr_process_dir.sh +++ b/_resources/kitodo/data/scripts/script_ocr_process_dir.sh @@ -66,6 +66,9 @@ if test -n "$WORKFLOW"; then COMMAND+=" --workflow $WORKFLOW" fi +if test -n "$MQ_HOST" -a -n "$MQ_PORT"; then + COMMAND+=" --activemq-url tcp://$MQ_HOST:$MQ_PORT?closeAsync=false --activemq-queue TaskActionQueue" +fi COMMAND+=" /data/$PROCESS_ID" From 25e3262fbadcd361076eed20f79582b2b95e554c Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Wed, 20 Dec 2023 14:24:06 +0100 Subject: [PATCH 02/28] Update manager --- _modules/ocrd_manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index 60022d9..85f228f 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit 60022d93f44a53c15669c92e67c17720460a3665 +Subproject commit 85f228f43cc8e2dccd32551a9c8e6a8d364276e2 From dfa4afeb7a2de9723081894f3250b075e7097c6b Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Wed, 20 Dec 2023 14:30:44 +0100 Subject: [PATCH 03/28] Update manager --- _modules/ocrd_manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index 85f228f..82d4ac9 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit 85f228f43cc8e2dccd32551a9c8e6a8d364276e2 +Subproject commit 82d4ac9f251dcbbc6b44c9c1d5713ce781230d08 From 5a42219299598e52894057fbf86a35749e496b8e Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Wed, 20 Dec 2023 14:54:29 +0100 Subject: [PATCH 04/28] Remove confirmation before docker compose down --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 78c8e36..98d37f8 100644 --- a/Makefile +++ b/Makefile @@ -150,7 +150,6 @@ start: docker compose up -d down: - @echo -n "Are you sure? [y/N] " && read ans && [ $${ans:-N} = y ] docker compose down -v stop: From 31ca84cd0ed8ae2bf8e8d92a4c14f90b0c294c1c Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Wed, 20 Dec 2023 15:09:33 +0100 Subject: [PATCH 05/28] Update manager --- _modules/ocrd_manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index 82d4ac9..fffeae6 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit 82d4ac9f251dcbbc6b44c9c1d5713ce781230d08 +Subproject commit fffeae619c96ebf0323348fb981f5985cf112553 From 56bb6d9f9021b81847f8141fc56079a8c5cc18b7 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Wed, 20 Dec 2023 17:31:27 +0100 Subject: [PATCH 06/28] Improve example sql and add example for workflow selection and ensure processing --- .../kitodo-sample/data/{dms-export => export}/.gitkeep | 0 _resources/kitodo-sample/sql/kitodo_post_init.sql | 10 +++++----- _resources/kitodo/before_startup.sh | 8 ++++---- .../kitodo/data/scripts/script_ocr_process_dir.sh | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) rename _resources/kitodo-sample/data/{dms-export => export}/.gitkeep (100%) diff --git a/_resources/kitodo-sample/data/dms-export/.gitkeep b/_resources/kitodo-sample/data/export/.gitkeep similarity index 100% rename from _resources/kitodo-sample/data/dms-export/.gitkeep rename to _resources/kitodo-sample/data/export/.gitkeep diff --git a/_resources/kitodo-sample/sql/kitodo_post_init.sql b/_resources/kitodo-sample/sql/kitodo_post_init.sql index 4020166..459b169 100644 --- a/_resources/kitodo-sample/sql/kitodo_post_init.sql +++ b/_resources/kitodo-sample/sql/kitodo_post_init.sql @@ -4,9 +4,9 @@ INSERT INTO `ruleset` (`id`, `title`, `file`, `orderMetadataByRuleset`, `indexAc INSERT INTO `workflow` (`id`, `title`, `status`, `indexAction`, `client_id`, `separateStructure`) VALUES (2, 'OCR_Workflow', 'ACTIVE', 'INDEX', 1, 0); -INSERT INTO `template` (`id`, `title`, `creationDate`, `sortHelperStatus`, `ruleset_id`, `docket_id`, `indexAction`, `workflow_id`, `active`, `client_id`) VALUES - (1, 'Example Template', '2021-11-22 17:52:48', NULL, 4, 1, 'INDEX', 1, 1, 1), - (2, 'Template_OCR', '2022-03-10 16:42:15', NULL, 4, 1, 'INDEX', 2, 1, 1); +INSERT INTO `template` (`id`, `title`, `creationDate`, `sortHelperStatus`, `ruleset_id`, `docket_id`, `indexAction`, `workflow_id`, `active`, `client_id`, `ocrd_workflow_id` ) VALUES + (1, 'Example Template', '2021-11-22 17:52:48', NULL, 4, 1, 'INDEX', 1, 1, 1, NULL), + (2, 'Template_OCR', '2022-03-10 16:42:15', NULL, 4, 1, 'INDEX', 2, 1, 1, 'ocr-workflow-default.sh'); INSERT INTO `process` (`id`, `title`, `inChoiceListShown`, `sortHelperStatus`, `sortHelperImages`, `sortHelperArticles`, `sortHelperDocstructs`, `sortHelperMetadata`, `creationDate`, `wikiField`, `project_id`, `ruleset_id`, `docket_id`, `indexAction`, `processBaseUri`, `template_id`, `parent_id`, `ordering`, `exported`) VALUES (3, 'CaelCaFeD_1761630636', 0, '060020000020', 0, 0, 0, 0, '2022-03-10 16:43:28', '', 1, 4, 1, 'INDEX', '3/', 2, NULL, NULL, 0); @@ -40,13 +40,13 @@ INSERT INTO `task` (`id`, `title`, `ordering`, `processingStatus`, `editType`, ` (8, 'Export DMS', 4, 0, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 1, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 1, NULL, 'Task_4', 0, 1, 0, 0, 0, 0), (18, 'Scanning', 1, 1, 4, '2022-03-10 16:42:51', NULL, NULL, 0, 0, 0, 1, 1, 0, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_1', 0, 0, 0, 0, 0, 0), (19, 'QC', 2, 0, 0, NULL, NULL, NULL, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_2', 0, 0, 0, 0, 0, 0), - (20, 'OCR from Process Dir', 3, 0, 0, NULL, NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0), + (20, 'OCR from Process Dir', 3, 0, 0, NULL, NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --workflow {ocrdworkflowid} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0), (21, 'Structure and Metadata', 4, 0, 0, NULL, NULL, NULL, 0, 1, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_3', 0, 0, 0, 0, 0, 0), (22, 'Export DMS', 5, 0, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 1, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_4', 0, 0, 0, 0, 0, 0), (23, 'OCR from Export Dir', 6, 0, 0, NULL, NULL, NULL, 0, 0, 1, 0, 0, 0, 0, 'OCR Export Dir', '/usr/local/kitodo/scripts/script_ocr_export_dir.sh {processtitle} {stepid}', 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Activity_12zha6z', 0, 1, 0, 0, 0, 0), (24, 'Scanning', 1, 3, 3, NOW(), NULL, NULL, 0, 0, 0, 1, 1, 0, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_1', 0, 0, 0, 0, 0, 0), (25, 'QC', 2, 3, 3, NOW(), NULL, NULL, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_2', 0, 0, 0, 0, 0, 0), - (26, 'OCR from Process Dir', 3, 1, 3, NOW(), NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0), + (26, 'OCR from Process Dir', 3, 1, 3, NOW(), NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --workflow {ocrdworkflowid} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0), (27, 'Structure and Metadata', 4, 0, 3, NOW(), NULL, NULL, 0, 1, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_3', 0, 0, 0, 0, 0, 0), (28, 'Export DMS', 5, 0, 3, NOW(), NULL, NULL, 0, 0, 0, 0, 0, 1, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_4', 0, 0, 0, 0, 0, 0), (29, 'OCR from Export Dir', 6, 0, 3, NOW(), NULL, NULL, 0, 0, 1, 0, 0, 0, 0, 'OCR Export Dir', '/usr/local/kitodo/scripts/script_ocr_export_dir.sh {processtitle} {stepid}', 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Activity_12zha6z', 0, 1, 0, 0, 0, 0); diff --git a/_resources/kitodo/before_startup.sh b/_resources/kitodo/before_startup.sh index 3043bb8..60cee25 100755 --- a/_resources/kitodo/before_startup.sh +++ b/_resources/kitodo/before_startup.sh @@ -26,10 +26,10 @@ if [ -n "$OCRD_MANAGER" ]; then ssh-keyscan -H -p ${OCRD_MANAGER_PORT:-22} $OCRD_MANAGER_HOST,$OCRD_MANAGER_IP >>/etc/ssh/ssh_known_hosts fi -# link OCR-D Manager workflow into OCR profiles folder -if [ ! -d "/tmp/kitodo/overwrites/data/ocr/profiles" ]; then - mkdir -p /tmp/kitodo/overwrites/data/ocr/profiles/ +# link OCR-D Manager workflow into OCR-D workflows directory +if [ ! -d "/tmp/kitodo/overwrites/data/ocrd_workflows" ]; then mkdir -p /usr/local/ocrd-manager/workflows/ - ln -s /usr/local/ocrd-manager/workflows /tmp/kitodo/overwrites/data/ocr/profiles/workflows + ln -s /usr/local/ocrd-manager/workflows/ /tmp/kitodo/overwrites/data/ + mv /tmp/kitodo/overwrites/data/workflows /tmp/kitodo/overwrites/data/ocrd_workflows fi diff --git a/_resources/kitodo/data/scripts/script_ocr_process_dir.sh b/_resources/kitodo/data/scripts/script_ocr_process_dir.sh index 7a84056..67be547 100755 --- a/_resources/kitodo/data/scripts/script_ocr_process_dir.sh +++ b/_resources/kitodo/data/scripts/script_ocr_process_dir.sh @@ -63,7 +63,7 @@ if test -n "$SCRIPT"; then fi if test -n "$WORKFLOW"; then - COMMAND+=" --workflow $WORKFLOW" + COMMAND+=" --workflow /workflows/$WORKFLOW" fi if test -n "$MQ_HOST" -a -n "$MQ_PORT"; then From cae886d676304afc925d8fa5650c500a2f96f215 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Thu, 21 Dec 2023 16:55:38 +0100 Subject: [PATCH 07/28] Update manager and add manager docker logs in makefile ci --- .github/workflows/makefile-ci.yml | 2 +- _modules/ocrd_manager | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/makefile-ci.yml b/.github/workflows/makefile-ci.yml index 59095d7..16e367d 100644 --- a/.github/workflows/makefile-ci.yml +++ b/.github/workflows/makefile-ci.yml @@ -163,7 +163,7 @@ jobs: run: make start - name: Test - run: make test + run: make test || { docker compose logs ocrd-manager; false; } - name: Clean testdata run: make clean-testdata diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index fffeae6..a78e793 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit fffeae619c96ebf0323348fb981f5985cf112553 +Subproject commit a78e7934f4f01230268c8252e1b27e0cd71bc87a From 1297393ea896ba7217a496047147622557ae3272 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Thu, 21 Dec 2023 17:23:00 +0100 Subject: [PATCH 08/28] Improve makefile and update manager --- Makefile | 3 +-- _modules/ocrd_manager | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 98d37f8..be87666 100644 --- a/Makefile +++ b/Makefile @@ -143,8 +143,7 @@ build: rebuild: docker compose stop $(SERVICES) - docker compose build $(SERVICES) - docker compose start + docker compose up -d --build $(SERVICES) start: docker compose up -d diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index a78e793..fe6b94a 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit a78e7934f4f01230268c8252e1b27e0cd71bc87a +Subproject commit fe6b94a8a09f8c8a307c8763989a4b2cc922313c From cd8d86f13886fff1e0b575df3a60de22a97a0db9 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Tue, 9 Jan 2024 11:27:13 +0100 Subject: [PATCH 09/28] Change default behaviour sync/async --- _modules/ocrd_manager | 2 +- _resources/kitodo/data/scripts/script_ocr_process_dir.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index fe6b94a..b86c666 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit fe6b94a8a09f8c8a307c8763989a4b2cc922313c +Subproject commit b86c666287841baaee6349ee1ac0fe892b64d835 diff --git a/_resources/kitodo/data/scripts/script_ocr_process_dir.sh b/_resources/kitodo/data/scripts/script_ocr_process_dir.sh index 67be547..f3b476e 100755 --- a/_resources/kitodo/data/scripts/script_ocr_process_dir.sh +++ b/_resources/kitodo/data/scripts/script_ocr_process_dir.sh @@ -67,7 +67,7 @@ if test -n "$WORKFLOW"; then fi if test -n "$MQ_HOST" -a -n "$MQ_PORT"; then - COMMAND+=" --activemq-url tcp://$MQ_HOST:$MQ_PORT?closeAsync=false --activemq-queue TaskActionQueue" + COMMAND+=" --activemq-url tcp://$MQ_HOST:$MQ_PORT?closeAsync=false --activemq-queue TaskActionQueue --async true" fi COMMAND+=" /data/$PROCESS_ID" From 9ea19abb22ac1bd11932e086575f9d08cfa48a75 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Tue, 9 Jan 2024 11:43:54 +0100 Subject: [PATCH 10/28] Update manager --- _modules/ocrd_manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index b86c666..56980dc 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit b86c666287841baaee6349ee1ac0fe892b64d835 +Subproject commit 56980dc604cd251cf2781e0d5f60e0c70e85ae27 From 657a6cfb2b28e1c0c3abf19ab5d24e41aea24857 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Fri, 1 Mar 2024 13:52:50 +0100 Subject: [PATCH 11/28] Update _resources/kitodo/data/scripts/script_ocr_process_dir.sh Co-authored-by: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> --- _resources/kitodo/data/scripts/script_ocr_process_dir.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_resources/kitodo/data/scripts/script_ocr_process_dir.sh b/_resources/kitodo/data/scripts/script_ocr_process_dir.sh index f3b476e..fc3d7d6 100755 --- a/_resources/kitodo/data/scripts/script_ocr_process_dir.sh +++ b/_resources/kitodo/data/scripts/script_ocr_process_dir.sh @@ -67,7 +67,7 @@ if test -n "$WORKFLOW"; then fi if test -n "$MQ_HOST" -a -n "$MQ_PORT"; then - COMMAND+=" --activemq-url tcp://$MQ_HOST:$MQ_PORT?closeAsync=false --activemq-queue TaskActionQueue --async true" + COMMAND+=" --activemq-url tcp://$MQ_HOST:$MQ_PORT?closeAsync=false --activemq-queue TaskActionQueue --async" fi COMMAND+=" /data/$PROCESS_ID" From ca326b0ef17a989f32116c8750b3e27b9c577ec7 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Fri, 1 Mar 2024 17:34:05 +0100 Subject: [PATCH 12/28] Update submodules --- _modules/kitodo-production-docker | 2 +- _modules/ocrd_controller | 2 +- _modules/ocrd_manager | 2 +- _modules/ocrd_monitor | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_modules/kitodo-production-docker b/_modules/kitodo-production-docker index 46c6fde..ace63bc 160000 --- a/_modules/kitodo-production-docker +++ b/_modules/kitodo-production-docker @@ -1 +1 @@ -Subproject commit 46c6fdeb08392bbcde61155bb9fbe5f98ac9c483 +Subproject commit ace63bc9ec19f4bcdde1c6ffca5b58b370016efb diff --git a/_modules/ocrd_controller b/_modules/ocrd_controller index 4b92961..b589666 160000 --- a/_modules/ocrd_controller +++ b/_modules/ocrd_controller @@ -1 +1 @@ -Subproject commit 4b929615254859b7c03ba320a2ffee3989e9fa10 +Subproject commit b589666768a01f0347a395221fa966f6c25d748f diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index 56980dc..d6cf314 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit 56980dc604cd251cf2781e0d5f60e0c70e85ae27 +Subproject commit d6cf314edbfc2df44382036683edd4b5404e2501 diff --git a/_modules/ocrd_monitor b/_modules/ocrd_monitor index 9fee686..9eb7b1a 160000 --- a/_modules/ocrd_monitor +++ b/_modules/ocrd_monitor @@ -1 +1 @@ -Subproject commit 9fee68676165e553caa6b265d756fbc032b727a9 +Subproject commit 9eb7b1aebd59f9098a74fa4ce6b23657ff497273 From d38aca58fb75079c8ccde012af77d546ea5dfdc5 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Mon, 4 Mar 2024 14:54:11 +0100 Subject: [PATCH 13/28] Update files --- .env | 2 +- Makefile | 2 +- _resources/kitodo/data/scripts/script_ocr_process_dir.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 239cd5e..48e7907 100644 --- a/.env +++ b/.env @@ -23,7 +23,7 @@ MONITOR_DB_ROOT_USER=root # root user of OCR-D database MONITOR_DB_ROOT_USER=root_password # root password of OCR-D database # Controller SSH server (with-ocrd-controller) -CONTROLLER_BASE_VERSION=maximum-cuda # tag of ocrd/all from stage version +CONTROLLER_BASE_VERSION=2023-07-03 # tag of ocrd/all from stage version CONTROLLER_IMAGE=ghcr.io/slub/ocrd_controller:latest # name and tag of image CONTROLLER_HOST=ocrd-controller # name/address of server (for Manager/Monitor) CONTROLLER_PORT_SSH=22 # SSH port (for Manager/Monitor) diff --git a/Makefile b/Makefile index be87666..c8fc244 100644 --- a/Makefile +++ b/Makefile @@ -139,7 +139,7 @@ $(CONTROLLER_MODELS)/ocrd-resources/ocrd-tesserocr-recognize/frak2021.traineddat wget -O $@ https://ub-backup.bib.uni-mannheim.de/~stweil/tesstrain/frak2021/tessdata_best/frak2021-0.905.traineddata build: - docker compose build $(SERVICES) + docker compose build $(SERVICES) --no-cache rebuild: docker compose stop $(SERVICES) diff --git a/_resources/kitodo/data/scripts/script_ocr_process_dir.sh b/_resources/kitodo/data/scripts/script_ocr_process_dir.sh index fc3d7d6..a07e409 100755 --- a/_resources/kitodo/data/scripts/script_ocr_process_dir.sh +++ b/_resources/kitodo/data/scripts/script_ocr_process_dir.sh @@ -63,7 +63,7 @@ if test -n "$SCRIPT"; then fi if test -n "$WORKFLOW"; then - COMMAND+=" --workflow /workflows/$WORKFLOW" + COMMAND+=" --workflow $WORKFLOW" fi if test -n "$MQ_HOST" -a -n "$MQ_PORT"; then From 19dd109798eb2ae85e5e504df013572a861de0bb Mon Sep 17 00:00:00 2001 From: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> Date: Tue, 5 Mar 2024 09:46:13 +0100 Subject: [PATCH 14/28] test-kitodo: run docker exec without terminal --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c8fc244..ff6c752 100644 --- a/Makefile +++ b/Makefile @@ -182,7 +182,7 @@ test-kitodo: $(APP_DATA)/metadata/testdata-kitodo # wait until Kitodo.Production directory structure is initialized docker exec -t $(APP_CONTAINER) bash -c "/wait-for-it.sh -t 0 kitodo-app:$$APP_PORT" # run asynchronous ocr processing, which should return within 5 seconds with exit status 1 - timeout --preserve-status 5 docker exec -t $(APP_CONTAINER) bash -c '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id "testdata-kitodo" --task-id 1'; test $$? = 1 + timeout --preserve-status 5 docker exec $(APP_CONTAINER) bash -c '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id "testdata-kitodo" --task-id 1'; test $$? = 1 # check with interval of 1 second if ocr folder exists. It fails if the ocr folder is not created within 5 minutes. timeout 10m bash -c 'until test -s $(APP_DATA)/metadata/testdata-kitodo/ocr/alto/00000014.tif.original.xml; do sleep 5; done' # rest if the alto directory and file exist From ada6a2116e67dd7d8f5bc9d8c6bd8cfecd08e697 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Tue, 5 Mar 2024 10:06:21 +0100 Subject: [PATCH 15/28] Update makefile-ci.yml --- .github/workflows/makefile-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/makefile-ci.yml b/.github/workflows/makefile-ci.yml index 16e367d..757f682 100644 --- a/.github/workflows/makefile-ci.yml +++ b/.github/workflows/makefile-ci.yml @@ -163,13 +163,19 @@ jobs: run: make start - name: Test - run: make test || { docker compose logs ocrd-manager; false; } + run: make test - name: Clean testdata run: make clean-testdata - name: Test parallel using multiple workers run: CONTROLLER_WORKERS=3 make -j test + + - name: Dump docker logs on failure + if: failure() + uses: jwalton/gh-docker-logs@v2 + with: + images: 'ghcr.io/slub/ocrd_controller,ghcr.io/slub/ocrd_manager,ghcr.io/slub/ocrd_monitor,ghcr.io/slub/ocrd_kitodo/kitodo_production_ocrd' - name: Setup upterm session when failure if: ${{ failure() && github.event_name == 'workflow_dispatch' }} From c620c67ee67a82260daa0bb5c63b2e2cbdf7c28f Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Tue, 5 Mar 2024 10:30:24 +0100 Subject: [PATCH 16/28] Update makefile-ci.yml --- .github/workflows/makefile-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/makefile-ci.yml b/.github/workflows/makefile-ci.yml index 757f682..57ee6be 100644 --- a/.github/workflows/makefile-ci.yml +++ b/.github/workflows/makefile-ci.yml @@ -74,6 +74,12 @@ jobs: - name: Test parallel using multiple workers run: CONTROLLER_WORKERS=3 make -j test + + - name: Dump docker logs on failure + if: failure() + uses: jwalton/gh-docker-logs@v2 + with: + images: 'ghcr.io/slub/ocrd_controller,ghcr.io/slub/ocrd_manager,ghcr.io/slub/ocrd_monitor,ghcr.io/slub/ocrd_kitodo/kitodo_production_ocrd' - name: Setup upterm session when failure if: ${{ failure() && github.event_name == 'workflow_dispatch' }} From 5ef0b194be304b5a4a153287a68f5c588c9eb480 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Tue, 5 Mar 2024 11:04:26 +0100 Subject: [PATCH 17/28] Update makefile-ci.yml --- .github/workflows/makefile-ci.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/makefile-ci.yml b/.github/workflows/makefile-ci.yml index 57ee6be..3852de9 100644 --- a/.github/workflows/makefile-ci.yml +++ b/.github/workflows/makefile-ci.yml @@ -79,7 +79,25 @@ jobs: if: failure() uses: jwalton/gh-docker-logs@v2 with: - images: 'ghcr.io/slub/ocrd_controller,ghcr.io/slub/ocrd_manager,ghcr.io/slub/ocrd_monitor,ghcr.io/slub/ocrd_kitodo/kitodo_production_ocrd' + images: 'ghcr.io/slub/ocrd_controller,ghcr.io/slub/ocrd_manager,ghcr.io/slub/ocrd_monitor' + + - name: Collect docker logs on failure + if: failure() + uses: jwalton/gh-docker-logs@v2 + with: + images: 'ghcr.io/slub/ocrd_controller,ghcr.io/slub/ocrd_manager,ghcr.io/slub/ocrd_monitor' + dest: './docker-logs' + + - name: Tar logs + if: failure() + run: tar cvzf ./docker-logs.tgz ./docker-logs + + - name: Upload logs to GitHub + if: failure() + uses: actions/upload-artifact@master + with: + name: docker-logs.tgz + path: ./docker-logs.tgz - name: Setup upterm session when failure if: ${{ failure() && github.event_name == 'workflow_dispatch' }} From b8a38856dc3fee1e5d45ce4ea1b1b6d834db077b Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Tue, 5 Mar 2024 11:37:36 +0100 Subject: [PATCH 18/28] Update makefile-ci.yml --- .github/workflows/makefile-ci.yml | 32 +++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/makefile-ci.yml b/.github/workflows/makefile-ci.yml index 3852de9..6b0d27e 100644 --- a/.github/workflows/makefile-ci.yml +++ b/.github/workflows/makefile-ci.yml @@ -39,7 +39,7 @@ jobs: sudo systemctl restart docker - name: Checkout repository and submodules - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive @@ -75,31 +75,24 @@ jobs: - name: Test parallel using multiple workers run: CONTROLLER_WORKERS=3 make -j test - - name: Dump docker logs on failure - if: failure() - uses: jwalton/gh-docker-logs@v2 - with: - images: 'ghcr.io/slub/ocrd_controller,ghcr.io/slub/ocrd_manager,ghcr.io/slub/ocrd_monitor' - - name: Collect docker logs on failure if: failure() uses: jwalton/gh-docker-logs@v2 with: - images: 'ghcr.io/slub/ocrd_controller,ghcr.io/slub/ocrd_manager,ghcr.io/slub/ocrd_monitor' dest: './docker-logs' - - name: Tar logs + - name: Tar docker logs on failure if: failure() run: tar cvzf ./docker-logs.tgz ./docker-logs - - name: Upload logs to GitHub + - name: Upload docker logs to GitHub if: failure() uses: actions/upload-artifact@master with: name: docker-logs.tgz path: ./docker-logs.tgz - - name: Setup upterm session when failure + - name: Setup upterm session on failure if: ${{ failure() && github.event_name == 'workflow_dispatch' }} uses: lhotari/action-upterm@v1 @@ -130,7 +123,7 @@ jobs: sudo systemctl restart docker - name: Checkout repository and submodules - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive @@ -195,11 +188,22 @@ jobs: - name: Test parallel using multiple workers run: CONTROLLER_WORKERS=3 make -j test - - name: Dump docker logs on failure + - name: Collect docker logs on failure if: failure() uses: jwalton/gh-docker-logs@v2 with: - images: 'ghcr.io/slub/ocrd_controller,ghcr.io/slub/ocrd_manager,ghcr.io/slub/ocrd_monitor,ghcr.io/slub/ocrd_kitodo/kitodo_production_ocrd' + dest: './docker-logs' + + - name: Tar docker logs on failure + if: failure() + run: tar cvzf ./docker-logs.tgz ./docker-logs + + - name: Upload docker logs to GitHub + if: failure() + uses: actions/upload-artifact@master + with: + name: docker-logs.tgz + path: ./docker-logs.tgz - name: Setup upterm session when failure if: ${{ failure() && github.event_name == 'workflow_dispatch' }} From c59b4cbd81f57b4de377b78ac641f977df2cd4c5 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> Date: Thu, 7 Mar 2024 20:39:19 +0100 Subject: [PATCH 19/28] .env: set MONITOR_DB_ROOT_PASSWORD --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 48e7907..28ef14e 100644 --- a/.env +++ b/.env @@ -20,7 +20,7 @@ MONITOR_PORT_WEB=5000 # host-side port to exposed Web server MONITOR_PORT_LOG=8088 # host-side port to exposed Dozzle (Docker log viewer) MONITOR_PORT_DBM=8082 # host-side port to exposed OCR-D Database Management (Mongo Express) MONITOR_DB_ROOT_USER=root # root user of OCR-D database -MONITOR_DB_ROOT_USER=root_password # root password of OCR-D database +MONITOR_DB_ROOT_PASSWORD=root_password # root password of OCR-D database # Controller SSH server (with-ocrd-controller) CONTROLLER_BASE_VERSION=2023-07-03 # tag of ocrd/all from stage version From a578e287984ada446c4e41fdb91b6a1c59a87796 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> Date: Thu, 7 Mar 2024 20:39:19 +0100 Subject: [PATCH 20/28] .env: set MONITOR_DB_ROOT_PASSWORD --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 48e7907..28ef14e 100644 --- a/.env +++ b/.env @@ -20,7 +20,7 @@ MONITOR_PORT_WEB=5000 # host-side port to exposed Web server MONITOR_PORT_LOG=8088 # host-side port to exposed Dozzle (Docker log viewer) MONITOR_PORT_DBM=8082 # host-side port to exposed OCR-D Database Management (Mongo Express) MONITOR_DB_ROOT_USER=root # root user of OCR-D database -MONITOR_DB_ROOT_USER=root_password # root password of OCR-D database +MONITOR_DB_ROOT_PASSWORD=root_password # root password of OCR-D database # Controller SSH server (with-ocrd-controller) CONTROLLER_BASE_VERSION=2023-07-03 # tag of ocrd/all from stage version From 0532c585096c44517b4975a02808ac356271fc21 Mon Sep 17 00:00:00 2001 From: ocrd Date: Thu, 7 Mar 2024 22:47:56 +0100 Subject: [PATCH 21/28] test-kitodo: try to wait for ocrd-database, too --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index ff6c752..ee9ddd5 100644 --- a/Makefile +++ b/Makefile @@ -181,6 +181,7 @@ test-kitodo: $(APP_DATA)/metadata/testdata-kitodo rm -rf $(APP_DATA)/metadata/testdata-kitodo/ocr # wait until Kitodo.Production directory structure is initialized docker exec -t $(APP_CONTAINER) bash -c "/wait-for-it.sh -t 0 kitodo-app:$$APP_PORT" + docker exec -t $(APP_CONTAINER) bash -c "/wait-for-it.sh -t 0 ocrd-database:27017" # run asynchronous ocr processing, which should return within 5 seconds with exit status 1 timeout --preserve-status 5 docker exec $(APP_CONTAINER) bash -c '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id "testdata-kitodo" --task-id 1'; test $$? = 1 # check with interval of 1 second if ocr folder exists. It fails if the ocr folder is not created within 5 minutes. From 98a91a7a600b5dc1a195cad26fe6db85afcffff2 Mon Sep 17 00:00:00 2001 From: ocrd Date: Thu, 7 Mar 2024 22:49:26 +0100 Subject: [PATCH 22/28] update Controller --- _modules/ocrd_controller | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_modules/ocrd_controller b/_modules/ocrd_controller index b589666..9a18399 160000 --- a/_modules/ocrd_controller +++ b/_modules/ocrd_controller @@ -1 +1 @@ -Subproject commit b589666768a01f0347a395221fa966f6c25d748f +Subproject commit 9a183991661686200b7a173d038fe8fa59cf3580 From 4e7495b755dc1877905bfe3d259be90508a461ae Mon Sep 17 00:00:00 2001 From: ocrd Date: Thu, 7 Mar 2024 22:50:35 +0100 Subject: [PATCH 23/28] update Monitor (no Controller dependency) --- _modules/ocrd_monitor | 2 +- docker-compose.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/_modules/ocrd_monitor b/_modules/ocrd_monitor index 9eb7b1a..6aa918b 160000 --- a/_modules/ocrd_monitor +++ b/_modules/ocrd_monitor @@ -1 +1 @@ -Subproject commit 9eb7b1aebd59f9098a74fa4ce6b23657ff497273 +Subproject commit 6aa918bf1157b6e4a820b08ec4343c8d4f3ea231 diff --git a/docker-compose.yml b/docker-compose.yml index 1af93ab..2d089d1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,6 @@ services: file: _modules/ocrd_monitor/docker-compose.yml service: ocrd-monitor depends_on: - - ocrd-controller - ocrd-database ocrd-logview: From c88ecce0722c654b09d966a19e3a05b0219282ed Mon Sep 17 00:00:00 2001 From: ocrd Date: Fri, 8 Mar 2024 00:12:38 +0100 Subject: [PATCH 24/28] update Controller to new ocrd/all --- .env | 2 +- _modules/ocrd_controller | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 28ef14e..8caa124 100644 --- a/.env +++ b/.env @@ -23,7 +23,7 @@ MONITOR_DB_ROOT_USER=root # root user of OCR-D database MONITOR_DB_ROOT_PASSWORD=root_password # root password of OCR-D database # Controller SSH server (with-ocrd-controller) -CONTROLLER_BASE_VERSION=2023-07-03 # tag of ocrd/all from stage version +CONTROLLER_BASE_VERSION=2024-03-07 # tag of ocrd/all from stage version CONTROLLER_IMAGE=ghcr.io/slub/ocrd_controller:latest # name and tag of image CONTROLLER_HOST=ocrd-controller # name/address of server (for Manager/Monitor) CONTROLLER_PORT_SSH=22 # SSH port (for Manager/Monitor) diff --git a/_modules/ocrd_controller b/_modules/ocrd_controller index 9a18399..b74eadd 160000 --- a/_modules/ocrd_controller +++ b/_modules/ocrd_controller @@ -1 +1 @@ -Subproject commit 9a183991661686200b7a173d038fe8fa59cf3580 +Subproject commit b74eadd66b9693e6d98bed709bc0691a424a96ea From 4ad77d015de2cd2e44fa525293c2997c6bdf2631 Mon Sep 17 00:00:00 2001 From: ocrd Date: Fri, 8 Mar 2024 00:28:51 +0100 Subject: [PATCH 25/28] update Manager to #73 --- _modules/ocrd_manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index d6cf314..66572aa 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit d6cf314edbfc2df44382036683edd4b5404e2501 +Subproject commit 66572aad386a8ebc6433919a906da3d203ad8ecb From f2066a6b794ef47260f260ff82b71f0584304059 Mon Sep 17 00:00:00 2001 From: ocrd Date: Fri, 8 Mar 2024 01:47:02 +0100 Subject: [PATCH 26/28] update Monitor --- _modules/ocrd_monitor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_modules/ocrd_monitor b/_modules/ocrd_monitor index 6aa918b..690fe64 160000 --- a/_modules/ocrd_monitor +++ b/_modules/ocrd_monitor @@ -1 +1 @@ -Subproject commit 6aa918bf1157b6e4a820b08ec4343c8d4f3ea231 +Subproject commit 690fe6467241db72b694b71e467cb8e7bbc9d5fe From 9e013c63ea1c512de2fa80e538b83b09b872cb13 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> Date: Fri, 8 Mar 2024 23:00:17 +0100 Subject: [PATCH 27/28] update CONTROLLER_BASE_VERSION --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 8caa124..f2cb72b 100644 --- a/.env +++ b/.env @@ -23,7 +23,7 @@ MONITOR_DB_ROOT_USER=root # root user of OCR-D database MONITOR_DB_ROOT_PASSWORD=root_password # root password of OCR-D database # Controller SSH server (with-ocrd-controller) -CONTROLLER_BASE_VERSION=2024-03-07 # tag of ocrd/all from stage version +CONTROLLER_BASE_VERSION=2024-03-08 # tag of ocrd/all from stage version CONTROLLER_IMAGE=ghcr.io/slub/ocrd_controller:latest # name and tag of image CONTROLLER_HOST=ocrd-controller # name/address of server (for Manager/Monitor) CONTROLLER_PORT_SSH=22 # SSH port (for Manager/Monitor) From 74321e95f8666525e70f8b02f642cf4bc6a9bf3d Mon Sep 17 00:00:00 2001 From: ocrd Date: Sat, 9 Mar 2024 00:54:17 +0100 Subject: [PATCH 28/28] update submodules to master/main --- _modules/ocrd_controller | 2 +- _modules/ocrd_manager | 2 +- _modules/ocrd_monitor | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_modules/ocrd_controller b/_modules/ocrd_controller index b74eadd..6f7bcf7 160000 --- a/_modules/ocrd_controller +++ b/_modules/ocrd_controller @@ -1 +1 @@ -Subproject commit b74eadd66b9693e6d98bed709bc0691a424a96ea +Subproject commit 6f7bcf7d3ff573401dbd2a6ed755dc3bbad464f8 diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index 66572aa..3461853 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit 66572aad386a8ebc6433919a906da3d203ad8ecb +Subproject commit 3461853de28408e9ed0baac799f6ce7614b18b7d diff --git a/_modules/ocrd_monitor b/_modules/ocrd_monitor index 690fe64..f2f0975 160000 --- a/_modules/ocrd_monitor +++ b/_modules/ocrd_monitor @@ -1 +1 @@ -Subproject commit 690fe6467241db72b694b71e467cb8e7bbc9d5fe +Subproject commit f2f097531dd9322f6e1684a88328677d05a0d4bc