These scripts are intended for usage to install and cluster multiple VM's, containers, etc.
These scripts are bundled into a single output file with bash_bunder. It can be installed with
go install github.com/malscent/bash_bundler@latest
Bundling:
bash_bundler bundle -e ./main.sh -o ./build/couchbase_installer.sh
This project uses BATS for unit tests.
Usage: ./main.sh -v 6.6.1
Purpose: Specifies the version of couchbase to install
Usage: ./main.sh -os UBUNTU
Purpose: Specifies the Operating System the script is being used to install to.
Options: UBUNTU, MACOS, OSX, RHEL, CENTOS, DEBIAN, AMAZON
Usage: ./main.sh -ch <CLUSTERHOST>
Purpose: Specifies the cluster host name or ip address
Usage: ./main.sh -u couchbase
Purpose: Specifies the username to be used for both the couchbase install and the cluster join mechanism
Usage: ./main.sh -p foo123!
Purpose: Specifies the password to be used for both the couchbase install and the cluster join mechanism
Usage: ./main.sh -d
Purpose: Specifies that the script should be executed in debug mode, increasing output information to assist in debugging the script.
Usage: ./main.sh -g
Purpose: Specifies that the script should install the Couchbase Sync Gateway instead of Couchbase Server
Usage: ./main.sh -r
Purpose: Specifies that the script should run forever to maintain container execution after script completes. Used mainly for testing purposes.
Usage: ./main.sh -c
Purpose: Specifies that the script should run in a no-color mode. This is for environments where colored output can be a net negative to execution.
Usage: ./main.sh -e AZURE
Purpose: Specifies the environment that the script is being run in. Allows installer to execute specific commands depending on where the script is being run.
Options: AZURE, AWS, GCP, DOCKER, KUBERNETES, OTHER
Usage: ./main.sh -s
Purpose: Specifies the install script to run in a mode that is intended to run on every boot of the server
Usage: ```./main.sh -w 5
Purpose: Specifies that the script should not report success until it sees N nodes in the cluster. This is used for GCP notifications on completion
Usage: ```./main.sh -n
Purpose: Specifies that in a Couchbase Server installation, it should not take any actions to cluster the server after installing couchbase
Usage: ```./main.sh -dm 50MiB
Purpose: Specifies the amount of memory to allocate to the data service within the cluster. Values can be MiB, GiB or TiB. No suffix will result in MiB. Defaults to 50% of the available memory.
Usage: ```./main.sh -im 15MiB
Purpose: Specifies the amount of memory to allocate to the index service within the cluster. Values can be MiB, GiB or TiB. No suffix will result in MiB. Defaults to 15% of the available memory.
Usage: ```./main.sh -em 5MiB
Purpose: Specifies the amount of memory to allocate to the eventing service within the cluster. Values can be MiB, GiB or TiB. No suffix will result in MiB. Defaults to 256MiB.
Usage: ```./main.sh -fm 15MiB
Purpose: Specifies the amount of memory to allocate to the search service within the cluster. Values can be MiB, GiB or TiB. No suffix will result in MiB. Defaults to 256MiB.
Usage: ```./main.sh -am 1GiB
Purpose: Specifies the amount of memory to allocate to the query service within the cluster. Values can be MiB, GiB or TiB. No suffix will result in MiB. Defaults to 1GiB.
Usage: ```./main.sh --services data,fts,index,query,eventing,analytics
Purpose: Specifies the services that will be enabled on the Couchbase server
Usage: ./main.sh -h
Purpose: Prints help regarding the parameters to pass to this script
Usage: ./main.sh --cluster-only
Purpose: This is for situations where an existing couchbase server needs added to an existing couchbase cluster, but the instllation does not need to be performed
docker build -t couchbase/ubuntu -f ./test_scripts/ubuntu/Dockerfile .
Docker containers are intended for usage testing and are not representative of the expected use case. Docker Containers only use the latest image of the OS, We do not try to test in older docker images. If you want to use Couchbase Server inside a docker container, see the approved docker container images at DockerHub
First you need to create a network to join your nodes to.
docker network create --driver bridge cb-net
Create a clusterhost
docker run --privileged --hostname clusterhost --expose=8091 -ti --rm --network cb-net --name clusterhost couchbase/ubuntu --version 6.6.1 -u couchbase -p foo123! -ch clusterhost -d -os UBUNTU -r
Create N nodes.
docker run --privileged --hostname nodehost1 -p 8091 -ti --network cb-net --name nodehost1 couchbase/ubuntu --version 6.6.1 -u couchbase -p foo123! -ch clusterhost -d -os UBUNTU -r -e DOCKER
To create a cluster for testing use:
docker-compose -f ./compose-files/<OS SPECIFIC FILE>.yml up
You can then reach the containers on http://localhost:8080 (RallyNode), http://localhost:8081 (NodeOne) and http://localhost:8082 (NodeTwo)
To take down the cluster:
docker-compose -f ./compose-files/<OS SPECIFIC FILE>.yml down
- Use Wget not Curl