From 113b90483e2028ea2895d7cb1ea82dba5975c1c5 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Mon, 4 Jul 2022 09:00:51 +0200 Subject: [PATCH 1/8] delegate to Monitor's Dozzle container config --- docker-compose.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 7b4a82cc..2d9ddbbb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,11 @@ services: file: _modules/ocrd_manager/ocrd_monitor/docker-compose.yml service: ocrd-monitor + dozzle: + extends: + file: _modules/ocrd_manager/ocrd_monitor/docker-compose.yml + service: dozzle + # not defined here (to be replaced by docker-compose.managed.yml if needed): # service ocrd-controller From e9418b3eb46691ff04ba8f75480a3efb79063310 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Mon, 4 Jul 2022 09:01:26 +0200 Subject: [PATCH 2/8] share job info between containers --- docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 2d9ddbbb..2bd7f2e8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,3 +24,6 @@ services: # - kitodo-db # - kitodo-es # - kitodo-mq + +volumes: + lock: From 72b9fb382bea487f658539a8cf05f4c60129c3a3 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Mon, 4 Jul 2022 09:09:39 +0200 Subject: [PATCH 3/8] configure exposed Dozzle port --- .env | 1 + README.md | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.env b/.env index f21c7107..a0b01142 100644 --- a/.env +++ b/.env @@ -16,6 +16,7 @@ MONITOR_IMAGE=bertsky/ocrd_monitor MONITOR_HOST=ocrd-monitor MONITOR_PORT_WEB=5000 MONITOR_PORT_GTK=8085 +MONITOR_PORT_LOG=8088 MONITOR_DATA=${PWD}/kitodo/data/metadata MANAGER_IMAGE=markusweigelt/ocrd_manager diff --git a/README.md b/README.md index 582a84e7..ab333f53 100644 --- a/README.md +++ b/README.md @@ -180,8 +180,9 @@ The following environment variables must be defined. | --- | --- | --- | | MONITOR_IMAGE | bertsky/ocrd_monitor | name of image | | MONITOR_HOST | ocrd-monitor | name of host | -| MONITOR_PORT_WEB | 5000 | host-side port to exposed Web server of container | -| MONITOR_PORT_GTK | 8085 | host-side port to exposed Broadwayd of container | +| MONITOR_PORT_WEB | 5000 | host-side port to exposed Web server | +| MONITOR_PORT_GTK | 8085 | host-side port to exposed Broadwayd (Gtk Web server) | +| MONITOR_PORT_LOG | 8088 | host-side port to exposed Dozzle (Docker log viewer) | | MONITOR_DATA | `./kitodo/data/metadata` | data volume to mount | (Currently, `MONITOR_DATA` should be the same as `MANAGER_DATA`.) @@ -221,9 +222,9 @@ the UID and GID of the Controller and Manager in our Makefile are taken from the Shell environment variables take precedence over `.env` file variables in Docker Compose. For example: - export CONTROLLER_ENV_UID=$(id -u) CONTROLLER_HOST=ocrserver + export CONTROLLER_ENV_UID=$(id -u) CONTROLLER_HOST=ocrserver CONTROLLER_PORT_SSH=8022 docker-compose up -d - + ### Install OCR-D models For practical workflows, you first have to install models into the OCR-D Controller. @@ -245,9 +246,9 @@ Open your browser and navigate to http://localhost:8080/kitodo after OCR-D and K Enter the user name `testadmin` and the password `test` in the login dialog. -> Note: If it is the first launch of Kitodo.Production, +> Note: If it is the first launch of Kitodo.Production, > then the `Indexing` tab of the system page is displayed, -> because indexing still needs to be done. +> because indexing still needs to be done. > To perform the indexing, click on the button `Create ElasticSearch mapping`. > After the mapping is created, click on the button `Start indexing` next to > the `Whole index` label. After a few seconds, the index is created and you @@ -274,6 +275,13 @@ is finished.) Watch `docker logs`, or browse to http://localhost:5000 to look under the hood with the Monitor. +### Monitor + +Provides a simplistic Web interface for +- browsing workspaces with [OCR-D Browser](https://github.com/hnesk/browse-ocrd) to inspect intermediate/final processing results +- getting statistics of running and terminated jobs +- reading logs + ## References - [OCR-D Controller](https://github.com/bertsky/ocrd_controller) From dfcbe54e2e4a349b2b8af53ea0e7d9d31874da8b Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Mon, 4 Jul 2022 09:10:16 +0200 Subject: [PATCH 4/8] update Manager to extended Monitor --- _modules/ocrd_manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index 393e9f26..081976d7 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit 393e9f2669783033163596f35f89362588081797 +Subproject commit 081976d72c2b512a16ea58b29497de9aa2fe8e12 From 832d8943a9eb5d7d6eec02fea9c9dbf8343fe00a Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Mon, 4 Jul 2022 09:15:45 +0200 Subject: [PATCH 5/8] update Manager to extended Monitor --- _modules/ocrd_manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index 081976d7..06843f34 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit 081976d72c2b512a16ea58b29497de9aa2fe8e12 +Subproject commit 06843f346d0010b24b6624bb38697f66ad0bc9e2 From 724600c683e9da1aa5c2513ac988d9e91a081a37 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Mon, 4 Jul 2022 09:23:06 +0200 Subject: [PATCH 6/8] replace stable with latest for Manager/Monitor images --- .env | 4 ++-- Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 04c88067..b3e67e33 100644 --- a/.env +++ b/.env @@ -12,7 +12,7 @@ CONTROLLER_MODELS=${PWD}/ocrd/controller/models CONTROLLER_CONFIG=${PWD}/ocrd/controller/config CONTROLLER_WORKERS=1 -MONITOR_IMAGE=markusweigelt/ocrd_monitor:ocrd-stable-20220701 +MONITOR_IMAGE=markusweigelt/ocrd_monitor MONITOR_HOST=ocrd-monitor MONITOR_PORT_WEB=5000 MONITOR_PORT_GTK=8085 @@ -20,7 +20,7 @@ MONITOR_PORT_LOG=8088 MONITOR_DATA=${PWD}/kitodo/data/metadata MANAGER_IMAGE=markusweigelt/ocrd_manager -MANAGER_IMAGE_TAG=ocrd-stable-20220701 +MANAGER_IMAGE_TAG=latest MANAGER_HOST=ocrd-manager MANAGER_ENV_UID=1001 MANAGER_ENV_GID=1001 diff --git a/Makefile b/Makefile index 7e616535..14fbd1ec 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ start: down: docker-compose down - + stop: docker-compose stop @@ -77,7 +77,7 @@ Targets: - build create directories, ssh key files - create build kitodo resources and images before starting containers using docker-compose up in detached mode - start run docker-compose up in detached mode - - down stop and remove docker-compose up + - down stop and remove docker-compose up - stop stops docker-compose up - config dump all the composed files - status list running containers From 82d6caaa1c3922e4c6580d67d7870d7c0f2272fe Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Mon, 4 Jul 2022 11:47:28 +0200 Subject: [PATCH 7/8] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 59b7d7c1..1b6fafe5 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,7 @@ the UID and GID of the Controller and Manager in our Makefile are taken from the Shell environment variables take precedence over `.env` file variables in Docker Compose. For example: - export CONTROLLER_ENV_UID=$(id -u) CONTROLLER_HOST=ocrserver CONTROLLER_PORT_SSH=8022 + export CONTROLLER_ENV_UID=$(id -u) CONTROLLER_HOST=ocrserver CONTROLLER_SSH_PORT=8022 docker-compose up -d ### Install OCR-D models From 2f7427f8104bd866173e744e1e96cccd306428fe Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Mon, 4 Jul 2022 11:56:20 +0200 Subject: [PATCH 8/8] =?UTF-8?q?rename=20lock=20=E2=86=92=20shared?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _modules/ocrd_manager | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index 06843f34..df0d9a7d 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit 06843f346d0010b24b6624bb38697f66ad0bc9e2 +Subproject commit df0d9a7d6bbe9bd0e08371f15fad4947e4fcc189 diff --git a/docker-compose.yml b/docker-compose.yml index 2bd7f2e8..2039d3aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,4 +26,4 @@ services: # - kitodo-mq volumes: - lock: + shared: