From 173c869d11489f969d46a36014ca98e550f09b85 Mon Sep 17 00:00:00 2001 From: Alan Malta Rodrigues Date: Wed, 19 Jun 2024 16:06:05 -0400 Subject: [PATCH] Update readme --- docker/couchdb/README.md | 59 +++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/docker/couchdb/README.md b/docker/couchdb/README.md index 91728f869..26e4fb36e 100644 --- a/docker/couchdb/README.md +++ b/docker/couchdb/README.md @@ -1,31 +1,28 @@ - - -### build image -docker build -t cmssw/couchdb . - -### list images -docker images - -### list of running containers -docker ps --no-trunc -aq - -### remove all running containers -docker rm -f `docker ps --no-trunc -aq` - -### run given image -docker run --rm -h `hostname -f` -v /tmp/vk:/etc/secrets -i -t cmssw/couchdb /bin/bash - -### remove existing image -docker rmi cmssw/couchdb - -### inspect running container -docker ps # find docker id -docker inspect | grep IPAddress - -### push image to docker.com -docker push cmssw/couchdb - -### references -https://stackoverflow.com/questions/18497688/run-a-docker-image-as-a-container#18498313 -https://stackoverflow.com/questions/17236796/how-to-remove-old-docker-containers#17237701 -http://goinbigdata.com/docker-run-vs-cmd-vs-entrypoint/ +### CouchDB image construction +Image is built with the expected `_couchdb` user, also used to run the service. +* latest version has been tagged as `3.2.2-stable`. +* **configuration**: available under `/data/srv/auth/couchdb/`, +* **database**: both database and views are available under `/data/srv/state/couchdb/database/`. +* **couchapps**: couchapps libraries and code is available under `/data/srv/state/couchdb/stagingarea/`. +* **logs**: finally, service logs can be found at `/data/srv/logs/couchdb/`. + +### Run CouchDB container +Connect to the cmsweb backend VM with the cmsweb account and: +``` +cd /data/srv +curl https://raw.githubusercontent.com/dmwm/CMSKubernetes/ffb19657b8a768b5a03557bb97021006270fb28b/docker/couchdb/docker-run.sh > docker-run.sh +chmod +x docker-run.sh +./docker-run.sh +``` + +### Stop CouchDB container +Connect to the cmsweb backend VM with the cmsweb account and: +``` +docker stop couchdb +docker rm couchdb +``` + +### Checking status of CouchDB service +``` +docker exec -it couchdb sh -c "/data/srv/current/config/couchdb/manage status" +``` \ No newline at end of file