Skip to content
This repository was archived by the owner on Sep 18, 2019. It is now read-only.

Conversation

@amatas
Copy link

@amatas amatas commented Sep 20, 2018

This upgrades CouchDB to 2.2.0 and apply the two patches needed to use the couchdiscover sidecar container in AWS.

wohali and others added 28 commits November 6, 2017 16:27
HAProxy is included in the "dev-cluster" image to proxy requests to the
three nodes deployed via that image. The production image runs a single
CouchDB instance in each image and does not need or want a proxy server
in the image.

Closes apache#56
This change moves the configuration overrides that are built into the
image into `etc/default.d` instead of `etc/local.d`, which allows
systems like Kubernetes to come in and own `default.d` as a config
volume mount point while still allowing for online overrides to take
highest precedence.
This paves the way for a simpler dev image Dockerfile.
This dev image configuration is modeled after the 2.1.1 Dockerfile with
a few modifications useful for day-to-day development:

* The Dockerfile builds from git rather than the official source
  releases. The build is configurable using the following build_args:

  clone_url (default: https://gitbox.apache.org/repos/asf/couchdb.git)
  checkout_branch (default: master)
  configure_options (default: <blank>)

  The configure_options are passed directly to ./configure and can be
  used to e.g. --disable-docs or --disable-fauxton:

  docker build --build-arg checkout_branch=my-cool-feature dev/

* We take advantage of multi-stage builds [1] to create a series of
  layers that optimize build time without inflating the final image
  size. In normal development the layers that install runtime and
  build dependencies will be cached, and the build will start by
  updating and configuring the existing git clone.

This work includes the changes proposed in apache#50 and apache#57.
This patch ensures that configuration properties set using the _config
endpoint survive container restarts. Previously these settings would be
erased by the code in the entrypoint that writes down the admin user
and cookie auth secret.

The patch also takes care to ensure that the admin user and secret are
not accidentally left on the disk in plaintext -- i.e., it ensures that
the entrypoint writes these settings into the last entry in the config
chain.

Finally, the patch ensures that local.d is always used to store custom
configuration. Backing local.d by a persistent volume should allow for
the config properties to survive a Pod being rescheduled onto another
node by Kubernetes.
On restart configuration saved in local.d/ was lost
Closes apache#78
@mrtyler
Copy link

mrtyler commented Sep 20, 2018

I'm not sure how to review this. Can you tell us more about how you constructed this branch?

Did you PR our local changes back to upstream? It would be nice if we didn't have to manage them ourselves.

@amatas
Copy link
Author

amatas commented Sep 20, 2018

I've merged the upstream commits until today, which includes the 2.2.0 branch. On top of them I included
96378db and f581380 from #1 . Nothing else added. I will send a PR to upstream with these changes.

@stepanstipl
Copy link

Yep, difficult to review - I've looked at your last 2 commits and it seems OK. +1 for upstream PR and better process - in general, I would like to move all our charts out of main repo, as those are independent artifacts with their own versioning.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants