couchbase / couchbase/docker

Add environment variables to set up a cluster without manual steps

Open
#59 10 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
155
Forks
154
Avg merge
10h 45m
Merged PRs (30d)
2

Description

I'm trying to run couchbase/server:community-4.5.0 in a Kubernetes StatefulSet. It would be tremendously helpful if this docker image exposed a number of environment variables to configure the nodes automatically.

  • MASTER_NODE
  • PORT
  • RAM_SIZE_MB
  • INDEX_RAM_SIZE_MB
  • FTS_RAM_SIZE_MB
  • SERVICES
  • STORAGE_SETTING
  • USER
  • PASSWORD

On the first node to be created this action could initialize the cluster:

couchbase-cli cluster-init \
  --cluster-username=${USER} \
  --cluster-password=${PASSWORD} \
  --cluster-port=${PORT} \
  --services=${SERVICES} \
  --cluster-ramsize=${RAM_SIZE_MB} \
  --cluster-index-ramsize=${INDEX_RAM_SIZE_MB} \
  --cluster-fts-ramsize=${FTS_RAM_SIZE_MB} \
  --index-storage-setting=${STORAGE_SETTING}

On the other nodes they would run the following command to get added to the cluster:

couchbase-cli rebalance \
  --cluster=${MASTER_NODE}:${PORT} \
  --user=${USER} \
  --password=${PASSWORD} \
  --server-add=$(hostname):${PORT} \
  --server-add-username=${USER} \
  --server-add-password=${PASSWORD} \
  --service=${SERVICES}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the repository's Dockerfiles and configuration scripts for the couchbase/server:community-4.5.0 image, then compare startup behavior with the proposed cluster-init and rebalance commands. Determine how the listed variables should control first-node initialization and additional-node joining in a Kubernetes StatefulSet. Done means the image can create and expand the cluster without manual steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, kubernetes
Domain
devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.