LoginSignup
4
4

More than 5 years have passed since last update.

docker-composeでetcd/registratorを構成する

Last updated at Posted at 2015-09-09

まだetcdバージョン0.4.6系の情報が結構残っていますが、etcd-2.1.x系とregistratorを使った構成をdocker-composeで行ってみました。以下 docker-compose.yml:

etcd:
  image: quay.io/coreos/etcd
  ports: ["2379:2379", "2380:2380"]
  command: >-
    -listen-client-urls http://0.0.0.0:2379
    -listen-peer-urls http://0.0.0.0:2380
    -advertise-client-urls http://etcd:2379
registrator:
  image: gliderlabs/registrator:latest
  command: --internal=true etcd://etcd:2379
  volumes:
    - /var/run/docker.sock:/tmp/docker.sock
  links:
    - etcd 

とりあえず1台構成ですが、

curl -L http://<host ip>:2379/v2/keys | jq .

等とすれば registrator がきちんと動作しているのが確認できます。

4
4
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4