Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add monitor jobs and logs #27

Merged
merged 9 commits into from
Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ 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
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
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ start:

down:
docker-compose down

stop:
docker-compose stop

Expand All @@ -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
Expand Down
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,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`.)
Expand Down Expand Up @@ -240,9 +241,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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed port to CONTROLLER_SSH_PORT cause it is a more contextual way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where? Manager still uses CONTROLLER_SSH_PORT, and Controller still does not use that variable at all.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sry, understood! (Typo on my side.)

docker-compose up -d

### Install OCR-D models

For practical workflows, you first have to install models into the OCR-D Controller.
Expand All @@ -264,9 +265,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
Expand All @@ -293,6 +294,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)
Expand Down
2 changes: 1 addition & 1 deletion _modules/ocrd_manager
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -19,3 +24,6 @@ services:
# - kitodo-db
# - kitodo-es
# - kitodo-mq

volumes:
lock: