Skip to content

Commit

Permalink
Wait for sample data to be loaded in couchbase healthcheck (#9057)
Browse files Browse the repository at this point in the history
This will also ensure that credentials are installed before healthcheck
goes healthy.

Fixes #7769
  • Loading branch information
jsoriano authored Nov 14, 2018
1 parent 1dd4fbf commit a8230bf
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 a8230bf

Please sign in to comment.