# tiunimanager
**Repository Path**: mirrors_pingcap/tiunimanager
## Basic Information
- **Project Name**: tiunimanager
- **Description**: TiUniManager
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2022-06-17
- **Last Updated**: 2026-01-03
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# TiUniManager
[](./LICENSE)
`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](https://github.com/pingcap/tiunimanager-ui), the web-based UI.
## Contents
- library - Common components and resources.
- micro-api - OpenAPI http handler.
- micro-cluster - Core service.
- docs - Documentation.
## Deploy TiUniManager
### Prerequisites
The followings are required for developing `TiUniManager`:
- [Git](https://git-scm.com/downloads)
- [Go 1.17+](https://go.dev/doc/install)
### Preparation
Before you can actually run the service, you need to prepare TiUP and certs.
#### Prepare TiUP
1. Install TiUP by following instructions in [Deploy TiUP on the control machine](https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup#step-2-deploy-tiup-on-the-control-machine).
2. Prepare `TIUP_HOME` which will be used by `TiUniManger`.
```shell
$ mkdir -p /home/tidb/.tiup/bin
$ TIUP_HOME=/home/tidb/.tiup tiup mirror set https://tiup-mirrors.pingcap.com
```
#### Prepare certs
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](./build_helper/GENERATE_CERTS.md) to generate these certs.
### Build and Run TiUniManager
1. `TiUniManager` can be compiled and used on Linux, OSX, CentOS, It is as simple as:
```
make
```
2. start cluster-server
```shell
./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=true` is necessary as deploying `TiUniManager` using built binary will not help configure SSH login without password, and you need to refer step `Configure SSH login without password` in [DEPLOY TiDB](./build_helper/DEPLOY_TIDB.md) to do so.
> - `--skip-host-init` is set false while deploying `TiUniManager` using `TiUP`, please refer [TiUniManager install and maintain](https://docs.pingcap.com/zh/tidb/dev/tiunimanager-install-and-maintain)
3. open a new terminal, then start openapi-server
```shell
./bin/openapi-server --host=127.0.0.1 --port=4100 --metrics-port=4103 --registry-address=127.0.0.1:4106
```
### Try it out
Now you can check API using Swagger: http://127.0.0.1:4100/swagger/index.html, and you can use `TiUniManager` to [DEPLOY TiDB](./build_helper/DEPLOY_TIDB.md).
## Interested in contributing?
Read through our [contributing guidelines](./CONTRIBUTING.md) to learn about our submission process and more.
## License
Copyright 2022 PingCAP. All rights reserved.
Licensed under the [Apache 2.0 License](./LICENSE).