Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconmodules
file-type-iconcouchbase-cluster
file-type-iconcouchbase-commons
file-type-iconcouchbase-iam-policies
file-type-iconcouchbase-server-security-group-rules
file-type-iconinstall-couchbase-server
file-type-iconREADME.md
file-type-icondisable-thp
file-type-iconinstall-couchbase-server
file-type-iconinstall-sync-gateway
file-type-iconload-balancer-target-group
file-type-iconload-balancer
file-type-iconrun-couchbase-server
file-type-iconrun-replication
file-type-iconrun-sync-gateway
file-type-iconsync-gateway-security-group-rules
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-icon.pre-commit-hooks.yaml
file-type-iconCODEOWNERS
file-type-iconCONTRIBUTING.md
file-type-iconLICENSE
file-type-iconNOTICE
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvariables.tf

Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconmodules
file-type-iconcouchbase-cluster
file-type-iconcouchbase-commons
file-type-iconcouchbase-iam-policies
file-type-iconcouchbase-server-security-group-rules
file-type-iconinstall-couchbase-server
file-type-iconREADME.md
file-type-icondisable-thp
file-type-iconinstall-couchbase-server
file-type-iconinstall-sync-gateway
file-type-iconload-balancer-target-group
file-type-iconload-balancer
file-type-iconrun-couchbase-server
file-type-iconrun-replication
file-type-iconrun-sync-gateway
file-type-iconsync-gateway-security-group-rules
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-icon.pre-commit-hooks.yaml
file-type-iconCODEOWNERS
file-type-iconCONTRIBUTING.md
file-type-iconLICENSE
file-type-iconNOTICE
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvariables.tf
Couchbase

Couchbase

Deploy a Couchbase cluster. Supports automatic bootstrapping, Sync Gateway, Web Console UI, cross-region replication, and auto healing.

Code Preview

Preview the Code

mobile file icon

README.md

down

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.

Quick start

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 install-couchbase-server script:

git clone --branch <VERSION> https://github.com/gruntwork-io/terraform-aws-couchbase.git
terraform-aws-couchbase/modules/install-couchbase-server/install-couchbase-server

The install-couchbase-server script will install Couchbase, its dependencies, and the run-couchbase-server script. 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 sample code).

Command line Arguments

Run 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

The install-couchbase-server script does the following:

  1. Install Couchbase binaries and scripts
  2. Update swap settings
  3. Disable transparent huge pages

Install Couchbase binaries and scripts

Install the following:

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 git.

Questions? Ask away.

We're here to talk about our services, answer any questions, give advice, or just to chat.

Ready to hand off the Gruntwork?