Hi,
I am interested in trying it out and tyring to run it in docker.
I found this tidb-docker-compose/docker-compose.yml at master · pingcap/tidb-docker-compose · GitHub
but looks like it’s quite old.
I normally would expect to use a single image like other databases (Cassandra, MongoDB etc). But this example give me a big list of image to run together? Is that necessary?
The recommended way to run a cluster on a single machine (e.g. for development) is to use tiup playground. This is tested and gives you a complete system including monitoring and with the option to add DM, TiCDC and TiProxy if so required.
Another option is to use tiup cluster with a local VM. This is similar to how production deployments look with tiup cluster but it can be done with a single VM if you want to save on resources and don’t require anything to be HA.
If you don’t want to use tiup cluster then you can use kind, minikube or something like k3s to deploy locally with Kubernetes. This allows you to test and play with the operator.
It is possible (but not recommended) to run a single pingcap/tidb container. This will give you most functionality by using Unistore instead of TiKV. However there are some limitations and this is a very minimal setup. It has more differences from production deployments as it isn’t using TiKV. Besides the container you can also do this with directly running the ./bin/tidb-server binary. This can be a good option for CI/CD and when you need to test changes made to TiDB.
You could run a set of containers. For example PD, TiDB and TiKV. You first need to start one or more PD nodes and then when starting TiDB and TiKV point them to the PD cluster. However this is not a common way of doing this and using any of the other methods is probably easier.
And lastly, in some cases using TiDB Cloud Serverless could be a good option.