# Generating and Editing the Cluster Initialization Configuration

+ **`tiup dm template > dm-topology.yaml`**
+ The topology template is used to demonstrate deploying a minimal `DM` cluster
+ Contains 3 master nodes and 3 worker nodes

```
~!@global:@!~
  user: "tidb"
  ssh_port: 22
  deploy_dir: "/home/tidb/dm/deploy"
  data_dir: "/home/tidb/dm/data"
  # arch: "amd64"

~!@master_servers:@!~
  - host: 172.19.0.101
  - host: 172.19.0.102
  - host: 172.19.0.103
```
```
~!@worker_servers:@!~
  - host: 172.19.0.101
  - host: 172.19.0.102
  - host: 172.19.0.103

~!@monitoring_servers:@!~
  - host: 172.19.0.101

~!@grafana_servers:@!~
  - host: 172.19.0.101

~!@alertmanager_servers:@!~
  - host: 172.19.0.101
```
```
```
-------------------------------------------------------------
You can use the command `tiup dm template > dm-topology.yaml` to generate a configuration file template quickly.

It is not recommended to run too many `DM-workers` on one host. Each `DM-worker` should be allocated at least `2 core CPU` and `4 GiB` memory.

Make sure that the ports among the following components are interconnected:
- The `peer_port` (8291 by default) among the `DM-master` nodes are interconnected.
- Each `DM-master` node can connect to the port of all `DM-worker` nodes (8262 by default).
- Each `DM-worker` node can connect to the port of all `DM-master` nodes (8261 by default).
- The `TiUP` nodes can connect to the port of all `DM-master` nodes (8261 by default).
- The `TiUP` nodes can connect to the port of all `DM-worker` nodes (8262 by default).