You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/07/09 11:24:38 UTC

[GitHub] [couchdb-docker] willholley opened a new pull request #187: Combined CouchDB / Clouseau dockerfile

willholley opened a new pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187


   <!-- Thank you for your contribution!
   
        Please file this form by replacing the Markdown comments
        with your text. If a section needs no action - remove it.
   
        Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
        of code collaboration. Positive feedback is represented +1 from committers
        and negative is a -1. The -1 also means veto, and needs to be addressed
        to proceed. Once there are no objections, the PR can be merged by a
        CouchDB committer.
   
        See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
   
   ## Overview
   
   This adds a Dockerfile which contains both CouchDB and Clouseau
   in a single container. This is useful because in most containerized
   environments, EPMD runs in the CouchDB container; restarting the
   CouchDB container can therefore lead to Clouseau becoming orphaned
   because EPMD is also killed.
   
   The container is based on the Red Hat UBI and uses runit to supervise
   both CouchDB and Clouseau. UBI is used mostly for familiarity (this
   is how we build a combined container at IBM), but it serves as a
   reference for anybody looking to port to other base images.
   
   The dockerfile entrypoint is modified to configure CouchDB and Clouseau
   in an Erlang cluster. It's equally possible to run the container in
   e.g. Kubernetes or Docker Compose without the dockerfile entrypoint;
   the user would then need to write out the configuration files via their
   configuration management system and call `/sbin/runsvdir-start` directly.
   
   Both CouchDB and Clouseau will, by default, run under the UID 5984
   (CouchDB) and GID 0. If the container is started as a non-root user,
   that ambient UID/GID is used instead.
   
   
   ## Testing recommendations
   
   You can build the image using e.g.:
   ```
   cd 3.1.0-ubi-clouseau
   docker build . -t couchdb3-clouseau 
   ```
   
   Then to run:
   ```
   docker run -d -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password --name couchdb -p 5984:5984 couchdb3-clouseau
   ```
   
   If you then curl/access CouchDB you should see that search is enabled:
   ```
   curl localhost:5984/                                                                                                                                                        ─╯
   {"couchdb":"Welcome","version":"3.1.0","git_sha":"ff0feea20","uuid":"0b56e44a12e2c1ae9840924b3b351065","features":["search","access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
   ```
   
   If you need to inspect the couchdb or search service, you can use `runit`:
   ```
   docker exec -it couchdb /bin/bash
   
   sv status /etc/service/couchdb-search
   sv status /etc/service/couchdb
   ```
   
   ## GitHub issue number
   
   #8 
   
   ## Related Pull Requests
   
   <!-- If your changes affects multiple components in different
        repositories please put links to those pull requests here.  -->
   
   ## Checklist
   
   - [ ] Code is written and works correctly;
   - [ ] Changes are covered by tests;
   - [ ] Documentation reflects the changes;
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] grapevineai commented on pull request #187: Combined CouchDB / Clouseau dockerfile

Posted by GitBox <gi...@apache.org>.
grapevineai commented on pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187#issuecomment-656593843


   @wohali Thanks for the merge! I requested this from @willholley who kindly shared the Docker repo they use at IBM. I might be able to test (as much as possible) since we will be using this image for our prod environment. If you decide not to push this image, please let me know so I can create an image for our use exclusively.
   
   Please note that using CouchDB with Clouseau in the current docker setting (when using helm, it creates two containers in one node) leads to unexpected behavior and should be avoided at all cost! Having this image (coming from IBM) solves the problem we encounter with the available images. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] grapevineai edited a comment on pull request #187: Combined CouchDB / Clouseau dockerfile

Posted by GitBox <gi...@apache.org>.
grapevineai edited a comment on pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187#issuecomment-656705583


   Sure... it happens that the CouchDB container restarts due to cluster instability (network issue, unresponsive container or dead process). When CouchDB restarts, at the same time it restarts EPMD. The Clouseau container doesn't detect this problem and stays on the old EPMD. Resulting in an unresponsive Clouseau that never gets restarted.
   
   Having both processes in the same container solves this issue by restarting both processes (EPMD and Clouseau) at the same time whenever CouchDB restarts.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] wohali commented on pull request #187: Combined CouchDB / Clouseau dockerfile

Posted by GitBox <gi...@apache.org>.
wohali commented on pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187#issuecomment-656702928


   Can you provide more detail on the helm issue?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] wohali commented on pull request #187: Combined CouchDB / Clouseau dockerfile

Posted by GitBox <gi...@apache.org>.
wohali commented on pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187#issuecomment-656300592


   As we're not pushing these downstream at the moment, +1.
   
   If we decide to do that we'll have to talk with the Docker folks who will want to go over this with a fine toothed comb....not a pleasant process ;)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] grapevineai commented on pull request #187: Combined CouchDB / Clouseau dockerfile

Posted by GitBox <gi...@apache.org>.
grapevineai commented on pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187#issuecomment-665363895






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] wohali commented on pull request #187: Combined CouchDB / Clouseau dockerfile

Posted by GitBox <gi...@apache.org>.
wohali commented on pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187#issuecomment-665366827






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] wohali commented on pull request #187: Combined CouchDB / Clouseau dockerfile

Posted by GitBox <gi...@apache.org>.
wohali commented on pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187#issuecomment-658838622


   @grapevineai nope, thanks, got all we need


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] grapevineai edited a comment on pull request #187: Combined CouchDB / Clouseau dockerfile

Posted by GitBox <gi...@apache.org>.
grapevineai edited a comment on pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187#issuecomment-656705583


   Sure... it happens that the CouchDB container restarts due to cluster instability (network issue, unresponsive container or dead process). When CouchDB restarts, at the same time it restarts EPMD. The Clouseau container doesn't detect this problem and stays on the old EPMD. Resulting in an unresponsive Clouseau that never gets restarted.
   
   Having both processes in the same container solve this issue by restarting both processes (EPMD and Clouseau) at the same time whenever CouchDB restarts.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] grapevineai commented on pull request #187: Combined CouchDB / Clouseau dockerfile

Posted by GitBox <gi...@apache.org>.
grapevineai commented on pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187#issuecomment-658707036


   @wohali Do you need more details?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] grapevineai commented on pull request #187: Combined CouchDB / Clouseau dockerfile

Posted by GitBox <gi...@apache.org>.
grapevineai commented on pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187#issuecomment-656705583


   Sure... it happens that the CouchDB container restarts due to cluster instability (network issue, unresponsive container or dead process). When CouchDB restarts and at the same time restarts EPMD. The Clouseau container doesn't detect this problem and stays on the old EPMD. Resulting in an unresponsive Clouseau that never gets restarted.
   
   Having both processes in the same container solve this issue by restarting both processes (EPMD and Clouseau) at the same time whenever CouchDB restarts.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] wohali merged pull request #187: Combined CouchDB / Clouseau dockerfile

Posted by GitBox <gi...@apache.org>.
wohali merged pull request #187:
URL: https://github.com/apache/couchdb-docker/pull/187


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org