playground: support tiup dm playground
Feature Request
Is your feature request related to a problem? Please describe:
For TiDB cluster users can start a tidb cluster quickly by tiup playground. But dm must deploy a complicated cluster. It's hard for users to take a try.
Describe the feature you'd like:
Support a function like tiup playground for dm cluster. For example, tiup dm playground
Why the featue is needed:
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
I was thinking about this again. I see two issues for implementing the tiup playground --dm 3 feature:
There already is a "dm" component, but that is to manage DM installations with TiUP. I don't think that makes the dm-worker and dm-master binaries available locally? How to re-use this component or avoid the collision? Create a new dm-playground component?
I think --dm 3 should give you 1 master with 3 workers. So it should start the master if the number of workers is more than one. Anything to watch out for? Or should I do something like --dm-master 1 --dm-worker 3 ? Or is something like a mode like "tikv-slim" better?
This could be implemented similar to what there is for TiCDC: tiup playground --ticdc 1 ... or as part of the dm component: tiup dm playground ...
I prefer tiup dm playground --worker 3 --master 1. tiup playground --dm-master 1 --dm-worker 3 is also okay to me. But we need to change some contraints of tiup playground.
I prefer similar way as TiCDC ' tiup playground --dm-master 1 --dm-worker 3'... ,which can provide an aligned user experience
I can (try to) modify the code in my branch to do something similar to what we do for ticdc, pump, drainer, etc.
But how do I get the binaries like ~/.tiup/components/dm/{version}/dm-worker ? Or should it be ~/.tiup/components/dm-worker/{version}/dm-worker ?
https://github.com/pingcap/tiup/tree/master/doc/dev doesn't have a lot of information on how to do this unfortunately.
This would be a very useful feature for local testing.
For launching, I also prefer a similar way to TiCDC: tiup playground --dm-master 1 --dm-worker 3