Previously officially available ansible scripts, now available in the Docker version, can be easily tested using
Installing TIDB
git clone https://github.com/pingcap/tidb-docker-compose.git
- Start
Pull the mirror a little slow, wait a minute
cd tidb-docker-compose && docker-compose pull # Get the latest Docker imagesdocker-compose up -d
Initializing the Prisma Project
prisma init
- Modify the database for TIDB configuration
version: ‘3‘services: prisma: image: prismagraphql/prisma:1.13 ports: - "4466:4466" environment: PRISMA_CONFIG: | port: 4466 # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security # managementApiSecret: my-secret databases: default: connector: mysql host: 10.6.201.9 # ip 地址 port: 4000 user: root migrations: true
docker-compose up -d
prisma deploy
http://localhost:4466
mutation { createUser(data:{ name:"rongfengliang" }){ id name }}
- Tidb Monitoring Interface
Resources
https://pingcap.com/docs/op-guide/docker-compose/
Prisma Integrated TIDB installation trial