# Step 3: Initializing the Cluster Topology Configuration

__*TiDB deployment steps*__
__*TiUP topology file*__
__*zz-BGL*__
__*zz-Jeff*__


![`smart`](./student-guide/diagram/ClusterTopologyFile_aa_003_20240527.png)
------------------------------------------------------------------------
Edit the cluster initialization configuration file required by `TiUP` according to the different cluster topologies.

The cluster initialization configuration file can be used to create a YAML format configuration file on the control machine using the `TiUP` tool, such as `topology.yaml`:
```
tiup cluster template > topology.yaml
```

For example, the minimal configuration entries are listed below:
```
global:
  user: "tidb"
  ssh_port:22
  deploy_dir: "/tidb-deploy"
  data_dir: "/tidb-data"
server_configs: {}
pd_servers:
  - host: 10.0.1.4
  - host: 10.0.1.5
  - host: 10.0.1.6
tidb_servers:
  - host: 10.0.1.7
  - host: 10.0.1.8
  - host: 10.0.1.9
tikv_servers:
  - host: 10.0.1.1
  - host: 10.0.1.2
  - host: 10.0.1.3
monitoring_servers:
  - host: 10.0.1.4
grafana_servers:
  - host: 10.0.1.4
alertmanager_servers:
  - host: 10.0.1.4
```

For hybrid topology deployment, multiple instances are deployed on a single machine, use `--full` option to generate a helpful sample configuration file. For details, see `https://docs.pingcap.com/tidb/stable/hybrid-deployment-topology/`.
```
tiup cluster template --full > topology.yaml
```

For geo-distributed deployment: `TiDB` clusters are deployed in geographically distributed data centers, use `--multi-dc` option to generate corresponding sample configuration file to get started. For details, see `https://docs.pingcap.com/tidb/stable/geo-distributed-deployment-topology`.
```
tiup cluster template --multi-dc > topology.yaml
```

For detailed and up-to-date guide for step 3, go to `https://docs.pingcap.com/tidb/stable/production-deployment-using-tiup`.




































