Skip to content

Add environment variables to set up a cluster without manual steps #59

Open
@JorritSalverda

Description

@JorritSalverda

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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions