Deploying a Non-Secure Store

The Concepts Guide, as well as the Administrator's Guide, each presents several different ways to deploy and configure an Oracle NoSQL Database store that does not require secure access. For convenience, this appendix describes one particular set of steps you can take to deploy and configure such a store. Whether you prefer the technique presented here or one of the techniques presented in the concepts manual and administrator's guide, a non-secure store must be deployed and configured to run the example presented in this document in a non-secure environment. For each of the steps presented below, assume the following:

  • The Oracle NoSQL Database distribution is installed under the directory /opt/oracle/kv-ee.
  • A store named example-store is deployed to three hosts.
  • The hosts are named, kv-host-1, kv-host-2, and kv-host-3, respectively.
  • An admin service, listening on port 5000, is deployed on each of the three hosts.
  • The contents of the shards managed by the store will be located under the storage directory /u01/nosql/sn1/data for host kv-host-1, /u02/nosql/sn2/data for host kv-host-2, and /u03/nosql/sn3/data for host kv-host-3.

Given the above assumptions, you can follow the steps below to deploy a non-secure store, where each item from the given assumptions should be replaced with its comparable value specific to your particular environment.

Generate Configuration Files For Each Storage Node (SN)

Login to each host kv-host-1, kv-host-2, kv-host-3, and, from each respective command line, type commands like those shown.

On kv-host-1:
java -jar /opt/oracle/kv-ee/lib/kvstore.jar \
    makebootconfig \
    -root /u01/nosql/sn1/kvroot \
    -config config.xml \
    -port 5000 \
    -host kv-host-1 \
    -harange 5002,5007 \
    -num_cpus 0 \
    -memory_mb 200 \
    -capacity 1 \
    -storagedir /u01/nosql/sn1/data \
    -storagedirsize 10000000 \
    -store-security none

On kv-host-2:
java -jar /opt/oracle/kv-ee/lib/kvstore.jar \
    makebootconfig \
    -root /u02/nosql/sn2/kvroot \
    -config config.xml \
    -port 5000 \
    -host kv-host-2 \
    -harange 5002,5007 \
    -num_cpus 0 \
    -memory_mb 200 \
    -capacity 1 \
    -storagedir /u02/nosql/sn2/data \
    -storagedirsize 10000000 \
    -store-security none

On kv-host-3:
java -jar /opt/oracle/kv-ee/lib/kvstore.jar \
    makebootconfig \
    -root /u03/nosql/sn3/kvroot \
    -config config.xml \
    -port 5000 \
    -host kv-host-3 \
    -harange 5002,5007 \
    -num_cpus 0 \
    -memory_mb 200 \
    -capacity 1 \
    -storagedir /u03/nosql/sn3/data \
    -storagedirsize 10000000 \
    -store-security none

Launch a Storage Node Agent (SNA) On Each Host Making Up the Store

From each host’s command line, type a command like the following:

nohup java -jar /opt/oracle/kv-ee/lib/kvstore.jar start \
    -root /u0<n>/nosql/sn<n>/kvroot -config config.xml &

where the token <n> corresponds to the integer associated with the given host from which the above command is executed.

Configure and Deploy the Non-secure Store

From the command line of any host that has network connectivity to the nodes making up the store type the following command to enter the store’s administrative command line interface (Admin CLI), connected to the boot storage node agent (the boot SNA).

Note:

The node from which you execute the command only requires network connectivity and an Oracle NoSQL Database installation. Thus, although you can execute the command from a separate node that satisfies that requirement, you can also execute that command from any of the nodes making up the store (kv-host-1, kv-host-2, or kv-host-3); as those hosts, by default, satisfy the requirements for launching the Admin CLI.

java -jar /opt/oracle/kv-ee/lib/kvstore.jar runadmin \
    -helper-hosts kv-host-1:5000,kv-host-2:5000,kv-host-3:5000

Once the Admin CLI has been launched, you can deploy the store in one of two ways. First, you can enter the following commands, in succession, at the Admin CLI’s command prompt.

configure -name example-store
plan deploy-zone -name zn1 -rf 3 -wait

plan deploy-sn -znname zn1 -host kv-host-1 -port 5000 -wait
plan deploy-admin -sn 1 -wait
pool create -name snpool
pool join -name snpool -sn sn1

plan deploy-sn -znname zn1 -host kv-host-2 -port 5000 -wait
plan deploy-admin -sn 2 -wait
pool join -name snpool -sn sn2

plan deploy-sn -znname zn1 -host kv-host-3 -port 5000 -wait
plan deploy-admin -sn 3 -wait
pool join -name snpool -sn sn3

change-policy -params "loggingConfigProps=oracle.kv.level=INFO;"

topology create -name store-layout -pool snpool -partitions 120
topology preview -name store-layout
plan deploy-topology -name store-layout -plan-name deploy-plan -wait
Rather than submitting each of the above commands as separate entries to the Admin CLI’s command prompt, you may find it more convenient to instead copy each of those commands to a text file and then specify the single load command on the CLI’s command prompt; for example,
load -file <path-to-command-file>