DevTech101

DevTech101

Create configuration on every node
makebootconfig.sh

java -jar $KVHOME/lib/kvstore.jar makebootconfig \
    -root /home/oracle/kvroot \
    -port 5000 \
    -admin 5001 \
    -host n01 \
    -harange 5010,5025 \
    -num_cpus 12 \
    -memory_mb 2096 \
    -store-security none \
    -capacity 12 \
    -storagedir /u01/nosql/data \
    -storagedir /u02/nosql/data \
    -storagedir /u03/nosql/data \
    -storagedir /u04/nosql/data \
    -storagedir /u05/nosql/data \
    -storagedir /u06/nosql/data \
    -storagedir /u07/nosql/data \
    -storagedir /u08/nosql/data \
    -storagedir /u09/nosql/data \
    -storagedir /u10/nosql/data \
    -storagedir /u11/nosql/data \
    -storagedir /u12/nosql/data

Create the directory’s
makenosqldata.sh

mkdir -p /u01/nosql/data
mkdir -p /u02/nosql/data
mkdir -p /u03/nosql/data
mkdir -p /u04/nosql/data
mkdir -p /u05/nosql/data
mkdir -p /u06/nosql/data
mkdir -p /u07/nosql/data
mkdir -p /u08/nosql/data
mkdir -p /u09/nosql/data
mkdir -p /u10/nosql/data
mkdir -p /u11/nosql/data
mkdir -p /u12/nosql/data

chown -R oracle:oinstall /*/nosql

Modify the XML file, on each node change the storageNodeId


  
    
    
    
    
    
    
    
    
    
    
    
    
    
  
  
    
    
    
    
    
    
    
    
    
    
    
    
  

Start NoSQL Storage on every node

nohup java -jar $KVHOME/lib/kvstore.jar start -root $KVROOT > /home/oracle/startNoSQL.log 2>&1 &

Once all nodes are up create the global store file

configure -name testdb1
plan deploy-zone -name "testdb1" -rf 3 -wait 
plan deploy-sn -znname "testdb1" -port 5000 -host n01 -wait
plan deploy-admin -sn sn1 -port 5001 -wait
pool create -name AllStorageNodes
plan deploy-sn -znname "testdb1" -port 5000 -host n02 -wait
plan deploy-sn -znname "testdb1" -port 5000 -host n03 -wait
plan deploy-sn -znname "testdb1" -port 5000 -host n04 -wait
plan deploy-sn -znname "testdb1" -port 5000 -host n05 -wait
plan deploy-admin -sn sn5 -port 5001 -wait
plan deploy-sn -znname "testdb1" -port 5000 -host n06 -wait
plan deploy-admin -sn sn6 -port 5001 -wait
topology create -name 24x3 -pool AllStorageNodes -partitions 720
topology preview -name 24x3
plan deploy-topology -name 24x3 -wait

Start the global store

java -Xmx256m -Xms256m -jar $KVHOME/lib/kvstore.jar runadmin -port 5000 -host n01 load -file $1

To connect with CLI

java -Xmx256m -Xms256m -jar $KVHOME/lib/kvstore.jar runadmin -port 5000 -host n01 

To connect with javascript and NodeJS

npm install [-g] nosqldb-oraclejs
https://www.npmjs.com/package/nosqldb-oraclejs

Documentation
http://docs.oracle.com/cd/NOSQL/html/index.html

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
%d bloggers like this: