jefflester / minitrino

A tool that makes it easy to run modular Trino environments locally.
Apache License 2.0
32 stars 3 forks source link

Add --worker-count option to Minipresto provision command #2

Closed jefflester closed 3 years ago

jefflester commented 4 years ago

Minipresto should be able to provision a multi-node cluster if specified. Example:

minipresto provision -c snowflake-jdbc elasticsearch --worker-count 2

The resulting workers should be built using the Docker SDK, as forcing this through Compose would get messy real quick (Compose ought to be used where it is absolutely needed). The high level flow of this should look like:

This will be a semi-substantial lift, but will improve the flexibility of the tool in a way that doesn't bind us more to Compose shell commands.

Update

After some messing around, it's looking like volume copying might be impossible with the way things are currently set up. The current idea is to:

This would be nice and simple, but for simple volumes, there is no accessible link between non-persistent volumes mounted to a container and the container itself. For example, if we mount an elasticsearch.properties file to the coordinator, we cannot detect that relationship through the SDK and copy that to the new worker.

I am thinking of how best to tackle this. The very ugly and inefficient brute force technique would be to copy the entire etc and plugin directories from the coordinator to the host filesystem, then copy those files to the worker. This would be less than ideal...

jefflester commented 3 years ago

Closing this for now. Minipresto is not intended to create a distributed cluster, as that opens the door for users productionizing the tool. Best to stay with a local/testing model for now.