Couchbase Server Install Script
This folder contains a script for installing Couchbase server and its dependencies. Use this script to create a Couchbase Amazon Machine Image (AMI) that can be deployed in AWS across an Auto Scaling Group using the couchbase-cluster module.
This script has been tested on the following operating systems:
- Ubuntu 16.04
- Amazon Linux 2
There is a good chance it will work on other flavors of Debian, CentOS, and RHEL as well.
This module depends on bash-commons, so you must install that project first as documented in its README.
To install Couchbase, use
git to clone this repository at a specific tag (see the releases
page for all available tags) and run the
git clone --branch <VERSION> https://github.com/gruntwork-io/terraform-aws-couchbase.git terraform-aws-couchbase/modules/install-couchbase-server/install-couchbase-server
install-couchbase-server script will install Couchbase, its dependencies, and the run-couchbase-server
You can execute the
run-couchbase-server script when the server is booting to start Couchbase and configure it to
automatically join other nodes to form a cluster.
We recommend running the
install-couchbase-server script as part of a Packer template to
create a Couchbase Amazon Machine Image (AMI) (see the
couchbase-ami example for
fully-working sample code). You can then deploy the AMI across an Auto Scaling Group using the couchbase-cluster
module (see the
examples folder for fully-working
Command line Arguments
install-couchbase-server --help to see all available arguments.
Usage: install-couchbase-server [options] This script can be used to install Couchbase Server and its dependencies. This script has been tested with Ubuntu 16.04 and Amazon Linux 2. Options: --edition The edition of Couchbase to install. Must be one of: enterprise, community. Default: enterprise. --version The version of Couchbase to install. Default: 5.1.0. --checksum The checksum of the Couchbase package. Required if --version is specified. You can get it from the downloads page of the Couchbase website. --checksum-type The type of checksum in --checksum. Required if --version is specified. Must be one of: sha256, md5. --swappiness The OS swappiness setting to use. Couchbase recommends setting this to 0. Default: 0. Example: install-couchbase-server --edition enterprise
How it works
install-couchbase-server script does the following:
Install Couchbase binaries and scripts
Install the following:
Couchbase: Install Couchbase using the appropriate Linux installer.
run-couchbase-server: Copy the run-couchbase-server script into
Update swap settings
Set the "swappiness" setting on your OS to 0. See Swap Space and Kernel Swappiness for details.
Disable transparent huge pages
Disable transparent huge pages on your OS. See Disabling Transparent Huge Pages (THP) for details.
Why use Git to install this code?
We needed an easy way to install these scripts that satisfied a number of requirements, including working on a variety
of operating systems and supported versioning. Our current solution is to use
git, but this may change in the future.
See Package Managers
for a full discussion of the requirements, trade-offs, and why we picked