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. Also, some features are accessible only via the Couchbase UI which can be accessed by pointing your browser at one of your Couchbase nodes at http://<host>:8091 (make sure you have the security groups setup properly to allow access to this port)</host>
Table of Contents
The following Boot scripts are listed in order.
Description: A RightScale provided script to set the timezone of this instance.
Required Inputs and Default Settings
Description: A RightScale provided script to install the integrated monitoring capabilities.
Required Inputs and Default Settings
Description: A RightScale provided script to create a large LVM under /mnt.
Required Inputs and Default Settings:
Description: A RightScale provided script to configure an amount of swap on this instance. While actively using a system in swap is not recommended, Couchbase's best-practice recommendation is to have at least some swap configured so as to prevent the Linux OOM killer from terminating the Membase processes.
Required Inputs and Default Settings: (a detailed description of this RightScript can be found here)
Description: A RightScale provided script needed for EBS functionality.
Required Inputs and Default Settings:
none
Description: A RightScale provided script to install the tools needed for EBS functionality.
Required Inputs and Default Settings:
none
Description: A RightScale-provided (and Couchbase-modified) script to create a new EBS stripe volume.
Required Inputs and Default Settings:
EBS_STRIPE_COUNT | 2
EBS_TOTAL_VOLUME_GROUP_SIZE_GB | 10
CB_DNS_NAME | $ignore
( In the context of this script, CB_DNS_NAME is used to rename the EBS stripe volume so that it can be identified at a later boot time.)CB_INITIAL_LAUNCH | TRUE
(In the context of this script, CB_INITIAL_LAUNCH controls whether or not to run this script. When recovering from an backup of this instance, it is not necessary to re-run the script.)CB_USE_EBS | TRUE
(Whether or not this instance should use the EBS functionality.Description: A RightScale-provided (and Couchbase-modified) script to restore from an existing EBS stripe volume snapshot.
Required Inputs and Default Settings:
EBS_LINEAGE_PREFIX_OVERRIDE | $ignore
EBS_SNAPSHOT_TIMESTAMP | $ignore
CB_DNS_NAME | $ignore
(In the context of this script, the CB_DNS_NAME is used to identify the EBS stripe volume snapshot to be restored from.)CB_INITIAL_LAUNCH | TRUE
(In the context of this script, CB_INITIAL_LAUNCH controls whether or not to run this script. When recovering from an backup of this instance, it is necessary to run this script.)CB_USE_EBS | TRUE
(Whether or not this instance should use the EBS functionality.)Description: A RightScale-provided (and Couchbase-modified) script to create the appropriate EBS backup scripts.
Required Inputs and Default Settings:
CB_DNS_NAME | $ignore
(In the context of this script, the CB_DNS_NAME is used to identify the EBS volume.)CB_USE_EBS | TRUE
(Whether or not this instance should use the EBS functionality.)Description: A RightScale-provided (and Couchbase-modified) script to configure this instance for automatic and continuous EBS backups.
Required Inputs and Default Settings:
EBS_BACKUP_FREQUENCY | $ignore (random)
EBS_BACKUP_KEEP_DAILY | $ignore (14)
EBS_BACKUP_KEEP_LAST | $ignore (60)
EBS_BACKUP_KEEP_MONTHLY | $ignore (12)
EBS_BACKUP_KEEP_WEEKLY | $ignore (6)
EBS_BACKUP_KEEP_YEARLY | $ignore (2)
CB_DNS_NAME | $ignore
(In the context of this script, the CB_DNS_NAME is used to identify the EBS volume.)CB_USE_EBS | TRUE
(Whether or not this instance should use the EBS functionality.)Description: This script will install the Couchbase Server Enterprise Edition.
Required Inputs and Default Settings:
none
Description: This script will configure the Couchbase Server software to use the EBS stripe volume attached to the instance.
Required Inputs and Default Settings:
CB_INITIAL_LAUNCH | TRUE
(In the context of this script, CB_INITIAL_LAUNCH controls whether or not to run this script. When recovering from an backup of this instance, it is not necessary to re-run the script.)CB_USE_EBS | TRUE
(Whether or not this instance should use the EBS functionality.)Description: This script will edit an instance's configuration to identify itself using a hostname rather than it's internal IP address.
Required Inputs and Default Settings:
CB_DNS_NAME | $ignore
(Used to denote the DNS name of this particular instance. A value here will cause this instance to identify itself via a DNS in the Membase UI. When combined with an EBS volume, this field is necessary for disaster recovery. It is essential that this DNS name resolves to the IP address of this server from any other Membase servers. We recommend using DNSMadeEasy (http://www.rightscale.com/library/ri...nal-id-de/7165) If you are using some other DNS system, it will be necessary to ensure (either via a script or manually) that this DNS name gets updated with the appropriate value.)CB_INITIAL_LAUNCH | TRUE
( In the context of this script, CB_INITIAL_LAUNCH controls whether or not to run this script. When recovering from an backup of this instance, it is not necessary to re-run the script. )Description: This script will attempt to join this instance to a Couchbase cluster located at CB_CLUSTER_ADDRESS with username set to CB_USER and password set to CB_PASS. Optionally, CB_AUTOREBALANCE can be set to TRUE to have this script kick off a rebalance after joining.
Required Inputs and Default Settings:
CB_AUTOREBALANCE | FALSE
(When set to TRUE, the server will automatically rebalance the clusters upon joining the cluster denoted by CB_CLUSTER_ADDRESS.)CB_CLUSTER_ADDRESS | $ignore
(Used to denote the cluster to be joined. Populate CB_CLUSTER_ADDRESS with the IP address of one of the servers in an existing Couchbase cluster and the new server will automatically join that cluster. An IP address, or an ENV type input with EC2_PRIVATE_HOSTNAME set to the Name of the server may be used. This approach automatically fetches the IP address of the server indicated by EC2_PRIVATE_HOSTNAME instead of hardcoding a specific (but temporary) IP address into the input. IP addresses of servers in EC2 are dynamically assigned and will change upon shutdown and restart. Therefore, the use of EC2_PRIVATE_HOSTNAME results in less need for manual configuration. When launching the first Couchbase server of a cluster set to $ignore. Then return to give it the EC2_PRIVATE_HOSTNAME of one of the other machines in the Couchbase cluster.)CB_INITIAL_LAUNCH | TRUE
(In the context of this script, CB_INITIAL_LAUNCH controls whether or not to run this script. When recovering from an backup of this instance, it is not necessary to re-run the script.)CB_JOIN | FALSE
(Set to TRUE to activate the cluster joining script. This is useful when you want to have the CB_CLUSTER_ADDRESS, CB_PASS and CB_USER fields defined, but still be able to toggle whether to run the join script or not. )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. )Description: This script extends the decommissioning timeout in an EC2 environment. The purpose is to allow enough time for a node to be rebalanced out of the cluster before the instance is terminated (see "Couchbase - Leave Cluster" below).
Required Inputs and Default Settings:
CB_DELAY_SECONDS | 3600
(The number of seconds to delay the hard-termination of this instance. Depending on the amount of data, rebalancing can take a significant amount of time so it is best to set this value quite high.)Description: A RightScale provided script to manually resume the automatic backups of the EBS volume.
Required Inputs and Default Settings:
CB_USE_EBS| TRUE
(Whether or not this instance should use the EBS functionality.)Description: A RightScale provided script to manually stop the automatic backups of the EBS volume
Required Inputs and Default Settings:
MB_USE_EBS | TRUE
(Whether or not this instance should use the EBS functionality.)Description: A RightScale provided script to manually perform a backup of the EBS volume.
Required Inputs and Default Settings:
EBS_BACKUP_KEEP_DAILY | $ignore (14)
EBS_BACKUP_KEEP_LAST | $ignore (60)
EBS_BACKUP_KEEP_MONTHLY | $ignore (12)
EBS_BACKUP_KEEP_WEEKLY | $ignore (6)
EBS_BACKUP_KEEP_YEARLY | $ignore (2)
MB_USE_EBS | TRUE
(Whether or not this instance should use the EBS functionality.)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 (one hour by default should be plenty of time).
Note: This runbook is not meant to provide a substantial background of the underlying architecture of Couchbase.
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. When the 1st server is launched, there is no cluster to join yet.
Performing backups with the Couchbase Enterprise Edition in RightScale is performed the same way as on any other deployment. See the instructions provided here.
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-configureable 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:
Create a new server from the same ServerTemplate as the original instance.
Set the DNS_ID of the new instance to be the same value as the instance you are recovering.
Set the CB_INITIAL_LAUNCH value to FALSE and make sure the CB_USE_EBS is still set to TRUE.
© 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.