-
Notifications
You must be signed in to change notification settings - Fork 0
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
Configuration file schema #137
Comments
My first draft of an example configuration file:
possibly open questions:
|
Hi, why do you need Your file structure was what I had in mind at the beginning, but then I realized that it's better to group items by host since we tend to deploy multiple processors per host, and the code structure is also easier later (just loop through all hosts and do things). So, I would suggest something like this: message_queue:
address: localhost
port: 5672
ssh:
username: cloud
password: 1234
hosts:
- localhost:
address: localhost
username: cloud
password: 1234
deploy_processors:
- name: ocrd-cis-ocropy-binarize
number_of_instance: 2
type: native
- name: ocrd-olena-binarize
number_of_instance: 1
type: docker
- vm01:
address: 123.456.789
username: tdoan
path_to_privkey: /path/to/file
deploy_processors:
- name: ocrd-eynollah-segment
number_of_instance: 1
type: native Regarding your questions:
|
why do you need host and port under each processor:
|
Suggestion/Discussion: remove How to replace: ~/.ssh/config is read per default from python-docker-sdk (and can be used with paramiko too) and authentification is completely done with it. Reason: python-docker-sdk cannot easily (if at all) be used with password or with specifying the path to keyfile: www.github.com/docker/docker-py/issues/2416. When I started to use ~/.ssh/config for that reason for authentification it seemd resonable to me to completely rely on ~/.ssh/config. But maybe I am missing something and providing password or keyfile must be possible. In this case we could think about dropping docker-sdk and completely rely on paramiko and shell commands. Drawbacks: no login without keyfile(s), which is better anyway in my opinion. And maybe more ... |
We should not remove it, since it's a nice feature and it works well with the native deployment. After checking the source code, the Python Docker SDK uses Paramiko under the hood for At the moment, I would suggest focusing on the native deployment only. |
Ok, thanks for your opinion/decision. I will look deeper into the adapter, just tried briefly. And I will change my implementation for the native deployment to use password and path. |
@joschrew: there should be a part in the configuration file for the MongoDB as well. I think the Processing Broker should be able to deploy, re-use, and shutdown the database in the same way as it does with the Message Queue and Processing Servers. |
@joschrew: after thinking more about it, I think an example configuration file should look like this. The detailed description can be found in this PR OCR-D/spec#222. message_queue:
address: localhost
port: 5672
ssh:
username: cloud
password: 1234
mongo_db:
address: localhost
port: 27017
credentials:
username: admin
password: admin
ssh:
username: cloud
password: 1234
hosts:
- address: localhost
username: cloud
password: 1234
deploy_processors:
- name: ocrd-cis-ocropy-binarize
number_of_instance: 2
type: native
- name: ocrd-olena-binarize
number_of_instance: 1
type: docker
- address: 134.76.1.1
username: tdoan
path_to_privkey: /path/to/file
deploy_processors:
- name: ocrd-eynollah-segment
number_of_instance: 1
type: native |
@joschrew I have created a schema for the configuration file. You can find it in this PR OCR-D/spec#222. Please try using it to validate the file. Basically, and example valid file would look like this: message_queue:
address: localhost
port: 5672
credentials:
username: admin
password: admin
ssh:
username: cloud
path_to_privkey: /path/to/file
mongo_db:
address: localhost
port: 27017
credentials:
username: admin
password: admin
ssh:
username: cloud
password: "1234"
hosts:
- address: localhost
username: cloud
password: "1234"
deploy_processors:
- name: ocrd-cis-ocropy-binarize
number_of_instance: 2
deploy_type: native
- name: ocrd-olena-binarize
number_of_instance: 1
deploy_type: docker
- address: 134.76.1.1
username: tdoan
path_to_privkey: /path/to/file
deploy_processors:
- name: ocrd-eynollah-segment
number_of_instance: 1
deploy_type: native |
Closed because it is available in ocrd_network in core |
This file is required by the Processing Broker at startup. By parsing this file, the broker knows:
ssh
, with username-password or username-private key.Use the ocrd_tool.schema.yml as a reference implementation to write this schema.
The text was updated successfully, but these errors were encountered: