Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

261-erroneous-values-in-database-for-moisture-variables #285

Merged
17 changes: 15 additions & 2 deletions mats_metadata_and_indexes/index_creation_scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# How to build the indexes
# Indexes

## Overview

### Cluster roles

#### ingest / development
The standalone cluster on adb-cb1 is used for ingest data creation and import. The ingest processes query this cluster and the import processes import to this cluster.
#### production
The production cluster is what the apps read. This cluster is populated by xdcr from the ingest cluster

## Index Creation Scripts
We are trying to keep an up to date N1QL script for the standalone cluster and a different one for the production cluster (they are not the same index set) that contain the index creation statements necessary to recreate a proper set of indexes for either of those environments, or for a new environment that has one of thse roles.

There are three index creation scripts

- mats_metadata_and_indexes/index_creation_scripts/create_indexes-0-replicas.n1ql
This is for the standalone server since it cannot support index replication (only one node)
This is for the standalone server since it cannot support index replication (it only has one node)
Copy the contents of this N1QL script and either execute it in the query window of the UI of the
standalone server or execute it with the command line interface cbq.
After that you must also execute the N1QL in the build_indexes.n1ql script.
Expand All @@ -18,3 +28,6 @@ There are three index creation scripts
This is for creating the full text search index. You can execute it as a bash script from any machine
that has connectivity to the couchbase server. This script takes one parameter - the full hostname of
the couchbase server. It will prompt for the avid user password.

## Index Backups
It is difficult to keep these scripts up to date because it is essentially a manual operation. For that reason we keep a set of backups. These backups are small files that are derived from the curl based admin interface for Couchbase.

This file was deleted.

This file was deleted.

ian-noaa marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

if [ $# -ne 1 ]; then
echo "Usage $0 credentials-file"
exit 1
fi
if [[ ! -f "$1" ]]; then
echo "$1 is not a file - exiting"
exit 1
fi
credentials_file=$1

host=`grep cb_host ${credentials_file} | awk '{print $2}'`
user=`grep cb_user ${credentials_file} | awk '{print $2}'`
pwd=`grep cb_password ${credentials_file} | awk '{print $2}'`

cred="${user}:${pwd}"

curl --user ${cred} "http://${host}:8091/indexStatus" | jq -r '.indexes | .[] .definition'
Loading
Loading