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-iconinstall-sync-gateway
file-type-iconREADME.md
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-iconinstall-sync-gateway
file-type-iconREADME.md
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

Sync Gateway Install Script

This folder contains a script for installing Couchbase Sync Gateway and its dependencies. Use this script along with the run-sync-gateway script to create a Sync Gateway 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 Sync Gateway, use git to clone this repository at a specific tag (see the releases page for all available tags) and run the install-sync-gateway script:

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

The install-sync-gateway script will install Sync Gateway, its dependencies, and the run-sync-gateway script. You can execute the run-sync-gateway script when the server is booting to start Sync Gateway and configure it to automatically join other nodes to form a cluster.

We recommend running the install-sync-gateway script as part of a Packer template to create a Sync Gateway 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-sync-gateway --help to see all available arguments.

Usage: install-sync-gateway [options]

This script can be used to install Couchbase Sync Gateway and its dependencies. This script has been tested with Ubuntu 16.04 and Amazon Linux 2.

Options:

  --edition		The edition of Sync Gateway to install. Must be one of: enterprise, community. Default: enterprise.
  --version		The version of Sync Gateway to install. Default: 2.0.0-beta2.
  --checksum		The checksum of the Sync Gateway 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.
  --config		Configure Sync Gateway to use the specified JSON config file.

Example:

  install-sync-gateway --edition enterprise --config my-custom-config.json

How it works

The install-sync-gateway script does the following:

  1. Install Sync Gateway binaries and scripts

Install Sync Gateway binaries and scripts

Install the following:

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?