Skip to content

Commit

Permalink
add an exporter for the couchdb 2 cluster in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Dec 1, 2018
1 parent d4a6df3 commit d50d69f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions examples/compose/docker-compose-integrationtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- "4895:5984"

couchdb1:
image: apache/couchdb:2.1.1
image: couchdb:2.2
command: -name [email protected] -setcookie thecookie
restart: always
networks:
Expand All @@ -21,7 +21,7 @@ services:
- "15984:5984"

couchdb2:
image: apache/couchdb:2.1.1
image: couchdb:2.2
command: -name [email protected] -setcookie thecookie
restart: always
networks:
Expand All @@ -31,7 +31,7 @@ services:
- "25984:5984"

couchdb3:
image: apache/couchdb:2.1.1
image: couchdb:2.2
command: -name [email protected] -setcookie thecookie
restart: always
networks:
Expand All @@ -52,6 +52,18 @@ services:
ports:
- "9984:9984"

couchdbstats2:
image: "gesellix/couchdb-prometheus-exporter:${COUCHDB_EXPORTER_VERSION:-latest}"
command: -couchdb.uri=http://couchdb2:5984 -logtostderr
environment:
- "COUCHDB.USERNAME=${COUCHDB_USER:-root}"
- "COUCHDB.PASSWORD=${COUCHDB_PASSWORD:-a-secret}"
networks:
couchdb-cluster:
ipv4_address: 172.16.238.20
ports:
- "9985:9984"

cluster-setup:
image: gesellix/couchdb-cluster-config:8
command: setup --username ${COUCHDB_USER:-root} --password ${COUCHDB_PASSWORD:-a-secret} -nodes 172.16.238.11 -nodes 172.16.238.12 -nodes 172.16.238.13
Expand Down
2 changes: 1 addition & 1 deletion integrationtest-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -o errexit
# We want to use overlay networks to make them `attachable`.
# Overlay networks are only available in swarm mode, though.
# See https://docs.docker.com/compose/compose-file/compose-file-v2/#network-configuration-reference
if [ "$(docker info --format '{{ .Swarm.LocalNodeState }}')" == "inactive" ];then
if [[ "$(docker info --format '{{ .Swarm.LocalNodeState }}')" == "inactive" ]];then
echo "Initialize swarm manager."
docker swarm init
fi
Expand Down

0 comments on commit d50d69f

Please sign in to comment.