본문 바로가기
Server

Etcd docker 설치

by ByteBridge 2023. 9. 29.
반응형

두개 노드 설치용 컴포즈 파일

version: '3.4'

services:
  etcd0:
    image: quay.io/coreos/etcd:v3.5.0
    ports:
      - "23790:2379"
      - "23800:2380"
    environment:
      ETCD_NAME: etcd0
      ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd0:2380
      ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
      ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
      ETCD_ADVERTISE_CLIENT_URLS: http://etcd0:2379
      ETCD_INITIAL_CLUSTER: etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380
      ETCD_INITIAL_CLUSTER_TOKEN: etcd-cluster-token
      ETCD_INITIAL_CLUSTER_STATE: new

  etcd1:
    image: quay.io/coreos/etcd:v3.5.0
    ports:
      - "23791:2379"
      - "23801:2380"
    environment:
      ETCD_NAME: etcd1
      ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd1:2380
      ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
      ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
      ETCD_ADVERTISE_CLIENT_URLS: http://etcd1:2379
      ETCD_INITIAL_CLUSTER: etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380
      ETCD_INITIAL_CLUSTER_TOKEN: etcd-cluster-token
      ETCD_INITIAL_CLUSTER_STATE: new

  etcd2:
    image: quay.io/coreos/etcd:v3.5.0
    ports:
      - "23792:2379"
      - "23802:2380"
    environment:
      ETCD_NAME: etcd2
      ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd2:2380
      ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
      ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
      ETCD_ADVERTISE_CLIENT_URLS: http://etcd2:2379
      ETCD_INITIAL_CLUSTER: etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380
      ETCD_INITIAL_CLUSTER_TOKEN: etcd-cluster-token
      ETCD_INITIAL_CLUSTER_STATE: new
반응형

'Server' 카테고리의 다른 글

Etcd docker 설치  (0) 2023.09.29
etcd란 무엇인가?  (0) 2023.09.29
mongo db docker-compose  (0) 2020.08.20
파일 비교 하여 다른 부분만 출력  (0) 2017.12.20
find 와 xargs 사용  (0) 2017.09.13