Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create many dnodes in one pnode and how to write these dnodes'config files? #26236

Open
Wetcue opened this issue Jun 21, 2024 · 3 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@Wetcue
Copy link

Wetcue commented Jun 21, 2024

在官网文档搭建集群案例中,使用的是不同物理节点的数据节点,这样编辑配置文件更容易理解,但就我了解到,同一个物理节点可��通过修改端口号,生成不同数据节点,那是否可以将这些不同的数据节点组合成一个新的集群?如果可以,该如何编辑配置文件并分别启动这些数据节点的服务?

@Wetcue Wetcue added help wanted Extra attention is needed question Further information is requested labels Jun 21, 2024
@Wetcue Wetcue changed the title 如何在同一台服务器上创建不同数据节点并编辑配置文件? Jun 21, 2024
@Wetcue
Copy link
Author

Wetcue commented Jun 21, 2024

版本3.3.0.3

@Wetcue
Copy link
Author

Wetcue commented Jun 21, 2024

微信图片_20240621145632

@yu285
Copy link
Contributor

yu285 commented Jun 26, 2024

放在一个节点上不太好,没有实质起到集群的效果。如果是为了验证功能,建议使用docker-compose.yaml:

version: "3"
services:
taosnode1:
#开机自启
restart: always
#指定镜像
image: tdengine/tdengine:3.2.3.0
#指定容器hostname
hostname: taosnode1
#容器名称
container_name: taosnode1
#创建容器后默认执行的命令
privileged: true
#容器的映射端口
ports:
- 6020:6020
- 6030-6042:6030-6042/tcp
- 6030-6042:6030-6042/udp
#定义挂载点
volumes:
- /etc/localtime:/etc/localtime:ro #同步主机时区到容器
- ./data/node1data:/var/lib/taos
- ./etc/node1etc:/etc/taos
- ./log/node1log:/var/log/taos

taosnode2:
restart: always
image: tdengine/tdengine:latest
hostname: taosnode2
container_name: taosnode2
privileged: true
ports:
- 7020:7020
- 7030-7042:7030-7042/tcp
- 7030-7042:7030-7042/udp
volumes:
- /etc/localtime:/etc/localtime:ro #同步主机时区到容器
- ./data/node2data:/var/lib/taos
- ./etc/node2etc:/etc/taos
- ./log/node2log:/var/log/taos

taosnode3:
restart: always
image: tdengine/tdengine:latest
hostname: taosnode3
container_name: taosnode3
privileged: true
ports:
- 8020:8020
- 8030-8042:8030-8042/tcp
- 8030-8042:8030-8042/udp
volumes:
- /etc/localtime:/etc/localtime:ro #同步主机时区到容器
- ./data/node3data:/var/lib/taos
- ./etc/node3etc:/etc/taos
- ./log/node3log:/var/log/taos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
2 participants