Creates an Active-Active database.

crdb-cli crdb create --name <name>
         --memory-size <maximum_memory>
         --instance fqdn=<cluster_fqdn>,username=<username>,password=<password>[,url=<url>,replication_endpoint=<endpoint>]
         --instance fqdn=<cluster_fqdn>,username=<username>,password=<password>[,url=<url>,replication_endpoint=<endpoint>]
         [--port <port_number>]
         [--no-wait]
         [--default-db-config <configuration>]
         [--default-db-config-file <filename>]
         [--compression <0-6>]
         [--causal-consistency { true | false } ]
         [--password <password>]
         [--replication { true | false } ]
         [--encryption { true | false } ]
         [--sharding { false | true } ]
         [--shards-count <number_of_shards>]
         [--shard-key-regex <regex_rule>]
         [--oss-sharding { true | false } ]
         [--oss-cluster { true | false } ]
         [--bigstore { true | false }]
         [--bigstore-ram-size <maximum_memory>]
         [--with-module name=<module_name>,version=<module_version>,args=<module_args>]

Prerequisites

Before you create an Active-Active database, you must have:

Parameters

Parameter Value Description
name <CRDB_name> string Name of the Active-Active database (required)
memory-size <maximum_memory> size in bytes, kilobytes (KB), or gigabytes (GB) Maximum database memory (required)
instance fqdn=<cluster_fqdn>,username=<username>,password=<password> strings The connection information for the participating clusters (required for each participating cluster)
port <port_number> integer TCP port for the Active-Active database on all participating clusters
default-db-config <configuration> string Default database configuration options
default-db-config-file <filename> filepath Default database configuration options from a file
no-wait Prevents crdb-cli from running another command before this command finishes
compression 0-6 The level of data compression:

0 = No compression

6 = High compression and resource load (Default: 3)
causal-consistency true
false (default)
Causal consistency applies updates to all instances in the order they were received
password <password> string Password for access to the database
replication true
false (default)
Activates or deactivates database replication where every master shard replicates to a replica shard
encryption true
false (default)
Activates or deactivates encryption
sharding true
false (default)
Activates or deactivates sharding (also known as database clustering). Cannot be updated after the database is created
shards-count <number_of_shards> integer If sharding is enabled, this specifies the number of Redis shards for each database instance
oss-sharding true
false (default)
Use OSS sharding policy instead of regex rules
oss-cluster true
false (default)
Activates OSS cluster API
shard-key-regex <regex_rule> string If clustering is enabled, this defines a regex rule (also known as a hashing policy) that determines which keys are located in each shard (defaults to {u'regex': u'.*\\{(?<tag>.*)\\}.*'}, {u'regex': u'(?<tag>.*)'} )
bigstore true

false (default)
If true, the database uses Redis on Flash to add flash memory to the database
bigstore-ram-size <size> size in bytes, kilobytes (KB), or gigabytes (GB) Maximum RAM limit for the Redis on Flash database
–with-module name=<module_name>,version=<module_version>,args=<module_args> strings Creates a database with a specific module
eviction-policy noeviction (default)
allkeys-lru
allkeys-lfu
allkeys-random
volatile-lru
volatile-lfu
volatile-random
volatile-ttl
Sets eviction policy
proxy-policy all-nodes
all-master-shards
single
Sets proxy policy

Returns

Returns the task ID of the task that is creating the database.

If --no-wait is specified, the command exits. Otherwise, it will wait for the database to be created and then return the CRDB GUID.

Examples

$ crdb-cli crdb create --name database1 --memory-size 1GB --port 12000 \
           --instance fqdn=cluster1.redis.local,username=[email protected],password=admin \
           --instance fqdn=cluster2.redis.local,username=[email protected],password=admin
Task 633aaea3-97ee-4bcb-af39-a9cb25d7d4da created
  ---> Status changed: queued -> started
  ---> CRDB GUID Assigned: crdb:d84f6fe4-5bb7-49d2-a188-8900e09c6f66
  ---> Status changed: started -> finished

To create an Active-Active database with two shards in each instance and with encrypted traffic between the clusters:

crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=[email protected],password=admin --instance fqdn=cluster2.redis.local,username=[email protected],password=admin --shards-count 2 --encryption true

To create an Active-Active database with two shards and with RediSearch 2.0.6 module:

crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=[email protected],password=admin --instance fqdn=cluster2.redis.local,username=[email protected],password=admin --shards-count 2 --with-module name=search,version="2.0.6",args="PARTITIONS AUTO"

To create an Active-Active database with two shards and with encrypted traffic between the clusters:

crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=[email protected],password=admin --instance fqdn=cluster2.redis.local,username=[email protected],password=admin --encryption true --shards-count 2

To create an Active-Active database with 1 shard in each instance and not wait for the response:

crdb-cli crdb create --name mycrdb --memory-size 100mb --port 12000 --instance fqdn=cluster1.redis.local,username=[email protected],password=admin --instance fqdn=cluster2.redis.local,username=[email protected],password=admin --no-wait