tiup icon indicating copy to clipboard operation
tiup copied to clipboard

playground: support tiup dm playground

Open lichunzhu opened this issue 4 years ago • 6 comments

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:

lichunzhu avatar Nov 16 '21 08:11 lichunzhu

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?

dveeden avatar Feb 01 '23 07:02 dveeden

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 ...

dveeden avatar Feb 01 '23 07:02 dveeden

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.

lichunzhu avatar Feb 01 '23 08:02 lichunzhu

I prefer similar way as TiCDC ' tiup playground --dm-master 1 --dm-worker 3'... ,which can provide an aligned user experience

qqqdan avatar Feb 01 '23 08:02 qqqdan

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.

dveeden avatar Feb 01 '23 09:02 dveeden

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

bolt-leandro avatar Mar 29 '23 06:03 bolt-leandro