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

Configurable Manager endpoint #31

Closed
markusweigelt opened this issue Aug 10, 2023 · 3 comments · Fixed by #37
Closed

Configurable Manager endpoint #31

markusweigelt opened this issue Aug 10, 2023 · 3 comments · Fixed by #37

Comments

@markusweigelt
Copy link
Collaborator

markusweigelt commented Aug 10, 2023

In monitor template ocrdmonitor/server/templates/jobs.html.j2 there is following js function with a fixed manager endpoint call. The manager endpoint should be configurable from outside.

function killjob(pid) {
    console.log(fetch(`http://ocrd-manager:4004/cancel_job/${pid}`));
}

Additionally the fetch should be a await call.

@markusweigelt markusweigelt mentioned this issue Aug 10, 2023
@bertsky
Copy link
Member

bertsky commented Aug 14, 2023

Additionally the fetch should be a await call.

Yes, @SvenMarcus noticed that as well.

The manager endpoint should be configurable from outside.

Why? Monitor cannot run without Manager, so we can rely on the Docker network for the name resolution and internal port here.

@markusweigelt
Copy link
Collaborator Author

Yes, @SvenMarcus noticed that as well.

Indeed, due to this suggestion, I initiated the issue to complete the pull request without incorporating additional fixes and detailed enhancements.

Why? Monitor cannot run without Manager, so we can rely on the Docker network for the name resolution and internal port here.

I have some uncertainties regarding this matter. The image can function independently, without requiring the ocrd_kitodo repository or specific names in the Docker Compose setup. This opens up alternative possibilities. It's plausible that the containers operate on distinct networks or that a reverse proxy has been implemented to manage various services separately.

@bertsky
Copy link
Member

bertsky commented Aug 15, 2023

I have some uncertainties regarding this matter. The image can function independently, without requiring the ocrd_kitodo repository or specific names in the Docker Compose setup. This opens up alternative possibilities. It's plausible that the containers operate on distinct networks or that a reverse proxy has been implemented to manage various services separately.

Indeed. And for the same reason, we already introduced CONTROLLER_HOST and CONTROLLER_PORT_SSH for the Manager. Since we already did introduce MANAGER_HOST and MANAGER_PORT_WEB, let's use it here.

@markusweigelt markusweigelt linked a pull request Aug 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants