Skip to content

Commit

Permalink
Wait for sample data to be loaded in couchbase healthcheck (elastic#9057
Browse files Browse the repository at this point in the history
) (elastic#9066)

This will also ensure that credentials are installed before healthcheck
goes healthy.

Fixes elastic#7769

(cherry picked from commit 1062b8b)
  • Loading branch information
jsoriano authored Nov 19, 2018
1 parent 88cf6e7 commit 23daf04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion metricbeat/module/couchbase/_meta/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM couchbase:4.5.1
HEALTHCHECK --interval=1s --retries=90 CMD [ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8091/pools/default/buckets)" -eq "200" ]
HEALTHCHECK --interval=1s --retries=90 CMD [ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8091/pools/default/buckets/beer-sample)" -eq "200" ]
COPY configure-node.sh /opt/couchbase

CMD ["/opt/couchbase/configure-node.sh"]
2 changes: 1 addition & 1 deletion metricbeat/module/couchbase/_meta/configure-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ curl -v http://127.0.0.1:8091/node/controller/setupServices -d services=kv%2Cn1q
# Setup credentials
curl -v http://127.0.0.1:8091/settings/web -d port=8091 -d username=Administrator -d password=password

# Load travel-sample bucket
# Load beer-sample bucket
curl -v -u Administrator:password -X POST http://127.0.0.1:8091/sampleBuckets/install -d '["beer-sample"]'

fg 1

0 comments on commit 23daf04

Please sign in to comment.