Note: If you cannot find a topic, go to where all RightScale documentation will soon be located. Also, feel free to Chat with us!
Home > Partners > Couchbase > ST and Runbooks > Couchbase Community Edition ServerTemplate

Couchbase Community Edition ServerTemplate

You can access the "Couchbase Server - Community Edition" ServerTemplate published by Couchbase from the MultiCloud Marketplace. 

The ServerTemplate has numerous inputs that are used to configure the instance when it's launched.  Many of these inputs have default values that can be modified, if desired.  Note that the same input may be used by more than one script and in some cases will take on a slightly different meaning for that script.

Table of Contents

Description and Inputs

Boot Scripts

The following Boot Scripts are listed in order.

RightScript: SYS Timezone set
  • Description: A RightScale provided script to set the timezone of this instance.
  • Required Inputs and Default Settings:
RightScript: SYS Monitoring install
  • Description: A RightScale provided script to install the integrated monitoring capabilities.
  • Required Inputs and Default Settings:
    • MON_PROCESSES | memcached 



RightScript: Couchbase Server - Community Edition Install
  • Description: This script will install the Couchbase Server Community Edition.
  • Required Inputs and Default Settings:
    • none

Operational Scripts

RightScript: Couchbase Server - Leave Cluster
  • Description: This script will remove this instance from its Couchbase cluster and initiate a rebalance.   The CB_USER and CB_PASS values are required to authenticate to the API.
  • Required Inputs and Default Settings:
    • CB_PASS | $ignore - Used to denote the password for the server that this instance is attempting to join.  Note that this does not actually apply the password to the running instance, it is simply used for connecting to the remote cluster.

    • CB_USER | $ignore - Used to denote the username for the server that this instance is attempting to join. Note that this does not actually apply the username to the running instance, it is simply used for connecting to the remote cluster  

Decommission Scripts

While no Decommission Scripts are provided by default, the Operational Script "Couchbase Server - Leave Cluster" can be used as a decommission script. Make sure that the "Couchbase Server - Delay Decommission" script is set to run on boot and that the decommission delay is long enough for the rebalancing event to take place (the default one hour setting should be plenty of time).

Common Runbook Operations

Note: This runbook is not meant to provide a substantial background of the underlying architecture of Couchbase. Documentation for Couchbase Server itself can be found at

Security Group Settings

  • The security groups for these servers need to allow these ports between nodes: 8091 (web port), 11211 (data port), 11210 (direct Couchbase port), 4369 (epmd) and the port range 21100 to 21199, inclusive (dynamic ns_server usage). 
  • You'll also need ports 11211 and 11210 open between your clients and the Couchbase servers.
  • For external access, port 8091 should be open to whatever system will be accessing the management UI (GUI or REST API).

Setting up Your First Node

  • A cluster of Couchbase servers is created by telling the member servers the network address of one of the servers, and the username and password that allows it to authenticate.
  • Launch the first server and wait for its status to change to "operational". Once the server is operational, go to its "Info" tab and copy the "Public DNS Name". Paste it into your web browser, and change the port to 8091:  Example:
  • If the server is operational but it's refusing connections to port 8091 then it is likely that the security group for the server doesn't have port 8091 open to the IP address that it's attempting to connect to it. Allowing all IP addresses to connect to port 8091 temporarily is a way to test if this is the case.
  • Once you have connected to the Couchbase web console, configure the servers using the UI. See for more documentation and support information.


 Adding Nodes to a Cluster

  • After configuring a new Couchbase server using its web console, set its username and password. When launching additional servers, they must be configured with the proper credentials to join a cluster.
  • Set the [CB|MC]_CLUSTER_ADDRESS to ENV[EC2_PRIVATE_HOSTNAME] or to an IP/DNS name of the nickname of one of the servers in the cluster.  See the inputs section here for more details.
  • When a server has joined a cluster it will show up in the web console as shown below:



Performing Backups

  • Performing backups with the Couchbase Community Edition in RightScale is performed the same way as on any other deployment.  See the instructions provided here.

Disaster Recovery

Note: Applies only to the "Couchbase Enterprise Edition" ServerTemplate.

  • When using Couchbase in a production and mission critical environment, it is best to have a disaster recovery plan in the event that all servers within a cluster are lost.  Couchbase is designed to be highly available via a user-configurable number of replicas.  However, a total cluster outage will require the data to be reloaded from disk.  The only way to recover your data in EC2 is by using EBS volumes that will persist even after its instance has been terminated.

  • The two prerequisites to performing a recovery is that all Couchbase servers were originally configured to use a DNS name (via the DNS_ID input to the ServerTemplate) and that all the Couchbase servers were configured to use an EBS volume (via the CB_USE_EBS input).  All data and configuration information is saved on the EBS volume.  Additionally, the volume will have been automatically renamed to match the DNS_ID provided so that the administrator can properly signal the RightScale recovery process.

  • To recover an instance that had its configuration and data saved on an EBS volume:

    1. Create a new server from the same ServerTemplate as the original instance.

    2. Set the DNS_ID of the new instance to be the same value as the instance you are recovering.

    3. Set the CB_INITIAL_LAUNCH value to FALSE and make sure the CB_USE_EBS is still set to TRUE.

  •  That's it!  Just let the new instance come up and it will automatically attach an EBS volume based upon the last snapshot that was taken.
You must to post a comment.
Last modified
23:39, 16 May 2013


This page has no custom tags.


This page has no classifications.



© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.