TiUniManager is a database management platform built for operating and managing TiDB, a distributed database.
It allows users to manage TiDB clusters through OpenAPI or TiUniManager UI, the web-based UI.
- library - Common components and resources.
- micro-api - OpenAPI http handler.
- micro-cluster - Core service.
- docs - Documentation.
The followings are required for developing TiUniManager:
Before you can actually run the service, you need to prepare TiUP and certs.
-
Install TiUP by following instructions in Deploy TiUP on the control machine.
-
Prepare
TIUP_HOMEwhich will be used byTiUniManger.$ mkdir -p /home/tidb/.tiup/bin $ TIUP_HOME=/home/tidb/.tiup tiup mirror set https://tiup-mirrors.pingcap.com
You need to prepare the following certs in the directory ./bin/cert, where aes.key contains a 32 character string.
- aes.key
- etcd-ca.pem
- etcd-server-key.pem
- etcd-server.pem
- server.crt
- server.csr
- server.key
You can follow GENERATE CERTS to generate these certs.
-
TiUniManagercan be compiled and used on Linux, OSX, CentOS, It is as simple as:make -
start cluster-server
./bin/cluster-server --host=127.0.0.1 --port=4101 --metrics-port=4104 --registry-address=127.0.0.1:4106 --elasticsearch-address=127.0.0.1:4108 --skip-host-init=true --em-version=InTesting --deploy-user=tidb --deploy-group=tidb
NOTICE:
--skip-host-init=trueis necessary as deployingTiUniManagerusing built binary will not help configure SSH login without password, and you need to refer stepConfigure SSH login without passwordin DEPLOY TiDB to do so.--skip-host-initis set false while deployingTiUniManagerusingTiUP, please refer TiUniManager install and maintain
-
open a new terminal, then start openapi-server
./bin/openapi-server --host=127.0.0.1 --port=4100 --metrics-port=4103 --registry-address=127.0.0.1:4106
Now you can check API using Swagger: http://127.0.0.1:4100/swagger/index.html, and you can use TiUniManager to DEPLOY TiDB.
Read through our contributing guidelines to learn about our submission process and more.
Copyright 2022 PingCAP. All rights reserved.
Licensed under the Apache 2.0 License.