Skip to content

Commit

Permalink
chore: docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
YenchangChan committed Jun 10, 2024
1 parent 8c5d36c commit 0d4dbd7
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 12 deletions.
11 changes: 7 additions & 4 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
# You can run command like: "docker build -f Dockerfile.test -t ckman-clickhouse:centos-7 ."
# the offical image is eoitek/ckman-clickhouse:centos-7, You can pull it from dockerhub.

FROM centos:7

#FROM centos:7
FROM ccr.ccs.tencentyun.com/library/centos:7
WORKDIR /var/

RUN yum -y update && yum install -y openssh* \
&& yum install -y epel-release && yum install -y jq \
&& yum install -y epel-release && yum install -y jq net-tools nc vim \
&& yum install -y initscripts.x86_64 \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo 'Asia/Shanghai' >/etc/timezone \
&& echo '123456' |passwd --stdin root

ENTRYPOINT /usr/sbin/init
CMD ["systemctl", "start", "sshd"]
CMD ["systemctl", "start", "sshd"]
101 changes: 93 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,98 @@
version: "3"
services:
zookeeper:
image: zookeeper:3.7.0
ports:
- "12181:2181"
node1:
image: eoitek/ckman-clickhouse:centos-7
hostname: node1
privileged: true
extra_hosts:
- "node1:192.168.122.101"
- "node2:192.168.122.102"
- "node3:192.168.122.103"
- "node4:192.168.122.104"
- "node5:192.168.122.105"
- "node6:192.168.122.106"
networks:
extnetwork:
ipv4_address: 192.168.122.101

node2:
image: eoitek/ckman-clickhouse:centos-7
hostname: node2
privileged: true
extra_hosts:
- "node1:192.168.122.101"
- "node2:192.168.122.102"
- "node3:192.168.122.103"
- "node4:192.168.122.104"
- "node5:192.168.122.105"
- "node6:192.168.122.106"
networks:
extnetwork:
ipv4_address: 192.168.122.102

node3:
image: eoitek/ckman-clickhouse:centos-7
hostname: node3
privileged: true
extra_hosts:
- "node1:192.168.122.101"
- "node2:192.168.122.102"
- "node3:192.168.122.103"
- "node4:192.168.122.104"
- "node5:192.168.122.105"
- "node6:192.168.122.106"
networks:
extnetwork:
ipv4_address: 192.168.122.103

cknode:
node4:
image: eoitek/ckman-clickhouse:centos-7
hostname: node4
privileged: true
deploy:
mode: replicated
replicas: 4
extra_hosts:
- "node1:192.168.122.101"
- "node2:192.168.122.102"
- "node3:192.168.122.103"
- "node4:192.168.122.104"
- "node5:192.168.122.105"
- "node6:192.168.122.106"
networks:
extnetwork:
ipv4_address: 192.168.122.104

node5:
image: eoitek/ckman-clickhouse:centos-7
hostname: node5
privileged: true
extra_hosts:
- "node1:192.168.122.101"
- "node2:192.168.122.102"
- "node3:192.168.122.103"
- "node4:192.168.122.104"
- "node5:192.168.122.105"
- "node6:192.168.122.106"
networks:
extnetwork:
ipv4_address: 192.168.122.105

node6:
image: eoitek/ckman-clickhouse:centos-7
hostname: node6
privileged: true
extra_hosts:
- "node1:192.168.122.101"
- "node2:192.168.122.102"
- "node3:192.168.122.103"
- "node4:192.168.122.104"
- "node5:192.168.122.105"
- "node6:192.168.122.106"
networks:
extnetwork:
ipv4_address: 192.168.122.106

networks:
extnetwork:
ipam:
config:
- subnet: 192.168.122.0/24
gateway: 192.168.122.1

0 comments on commit 0d4dbd7

Please sign in to comment.