oraclenosql_kvstore_deployment1

download oraclenosql_kvstore_deployment1

of 13

Transcript of oraclenosql_kvstore_deployment1

  • 8/19/2019 oraclenosql_kvstore_deployment1

    1/13

    Oracle NoSQL Kvstore deployment demoVersion 1.0

  • 8/19/2019 oraclenosql_kvstore_deployment1

    2/13

    Table of ContentsOverview..............................................................................................................................................3

    NoSQL: The Introduction.....................................................................................................................3Assumptions.........................................................................................................................................3Products used and system requirements...............................................................................................

    System setup in!ormation....................................................................................................................."ep#oyment o! Orac#e NoSQL $vstore...............................................................................................%&eri!yin' the (vstore...........................................................................................................................))*onc#usion..........................................................................................................................................)3

  • 8/19/2019 oraclenosql_kvstore_deployment1

    3/13

    OverviewOracle NoSQL offers a non relational, distributed and horizontally scalable datastore to achievehigh availability with a simplified data model.

    The article describes how to setup a !node Oracle NoSQL "vstore datacenter on Oracle#irtualbo$. The ob%ective of the demonstration is to allow users to setup the datacenter on theirlocal environment and carry out hands!on activities in regards to NoSQL administration.

    The article starts with a brief introduction to NoSQL and the Oracle offering. &t lists the prere'uisiteproducts used for the demonstration and summarizes the setup information. Later the datacenterdeployment has been demonstrated in detail supported with re'uired screenshots.

    NoSQL T!e "ntrod#ctionNoSQL is one of the emerging database solution in the world today. #ery often, it is misunderstoodas anti SQL, but it is not true. &t carries the name (Not Only SQL( for the fact that it doesn)t usesSQL, contrary to the conventional database systems.

    The *ey ob%ective behind the evolution of NoSQL solution was to cope up the high growth of semistructured data and real time processing. The +eb .- platforms e$pressed their concerns overthe availability, scalability, and fle$ibility of /01S products. On the other hand, NoSQL databasefacilitates, perhaps meant for high availability, fle$ibility and its scaling out capabilities. Several toptier websites li*e 2mazon, 3aceboo* and Twitter employ NoSQL solution to yield ma$imumavailability and 'uic* performance by virtue of its high throughput and low latency features.

    Overall, NoSQL doesn)t provides a soul database management system but %ust a data repository.4ontrary to the 24&/ 52tomicity, 4onsistency, &ntegrity and /urability6 compliance, NoSQLdatabase solution complies with 02S7 50asically 2vailable, Soft state, 7ventually consistent6model. 1ost of NoSQL databases are *ey value stores, while several database products have also

    been registered as columnar, document based and graph based under NoSQL category.Oracle brings its own NoSQL database product which is built on 0er*ley /0 %ava platform. 0er*ley/0 has been a proven 81L based storage model over the last decade. Oracle NoSQL database isa distributed *ey value store which is built on set of storage nodes. &n recent times, Oracle NoSQLproduct has caught the attention in the community by to its inclusion in the Oracle 0ig /ata solutionfor real time data processing.

    4urrently, the NoSQL database is available in two flavors namely, 4ommunity edition and7nterprise edition.

    The Oracle NoSQL database product can be downloaded from the below lin*

    http9::www.oracle.com:technetwor*:database:nos'ldb:downloads:default!;>.html

    $ss#mptionsThe article presumes that the user has preliminary understanding of the Oracle NoSQL databasearchitecture and related terminologies.

    3or 'uic* recapitulation, Oracle NoSQL wor*s as a *ey!value store where all the operations5populating the store and data retrieval6 are carried out using %ava. 2 storage node is the physicalmachine which hosts the set of replication nodes 5preferably one6. eplication nodes are evenlygrouped under replication groups. +ithin each replication group, one of the replication nodes actsas the Master , while all other nodes its Replicas. +hile only the master replication node services

    the write re'uests, all the replication nodes are available for reading re'uests.

    http://www.oracle.com/technetwork/database/nosqldb/downloads/default-495311.htmlhttp://www.oracle.com/technetwork/database/nosqldb/downloads/default-495311.html

  • 8/19/2019 oraclenosql_kvstore_deployment1

    4/13

    %rod#cts #sed and system reirements3or demonstration, we shall use a system with ?@0 21 as the demo hosts three virtual bo$machines. &n addition, below software installations are re'uired

    >. Oracle #irtualbo$ ;.>.>?. Oracle 7nterprise Linu$ =.= 5or above6 for virtual bo$ machines. Oracle NoSQL e$ecutables 53or demonstration, we will use enterprise edition6

    System set#p information4reate three linu$ virtual bo$ machines in the virtualbo$ namely, NoSQL>, NoSQL , and NoSQL .

    7nsure that the below activities are done to effectively communicate across the virtual machines.

    >. #irtualbo$ guest additions are installed on all the three virtual machines. 7nable the networ* adapter to attach to Aost!only adapter in order to communicate across

    the virtualbo$ machines. Bava edition in the virtual machines must be (>.C.-D =(. Ese #java -version and

    #which java to verify the %ava path.;. The Oracle NoSQL database software has been shared with all the three virtual machines

    and moved to a static directory=. Try to display the Oracle NoSQL version using the below command. The output

    11gR2.1.2.123 verifies the activity successfully.

    #java -jar kvclient-1.2.123.jar11gR2.1.2.123

    C. #erify the communication among the virtual machine. Obtain the virtual machine ip!addressusing #ifconfig command and use #ping -c 3 to chec* thecommunication.

  • 8/19/2019 oraclenosql_kvstore_deployment1

    5/13

  • 8/19/2019 oraclenosql_kvstore_deployment1

    6/13

  • 8/19/2019 oraclenosql_kvstore_deployment1

    7/13

    Step , %in+ t!e Stora+e Nodes from t!e !ost

    Now all the three nodes are ready for deployment. Try to ping the storage nodes from the host i.e.NoSQL>.

    /o not misunderstand the message (No further information is available( as it appears. 0ut itconfirms that the SN2 process is running the node which is not yet configured.

    // ing the (torage Node No( '1// [root@ o!" 1 li %# java -jar .'kvstore-1.2.123.jar ping -port /))) -host102.1 ./ .1)1! : at hostna&eC 102.1 ./ .1)1 registr6 portC /))) is not registered. o f(rther infor&ation is availa le

    // ing the (torage Node No( '2// [root@ o!" 1 li %# java -jar .'kvstore-1.2.123.jar ping -port /))) -host102.1 ./ .1)2! : at hostna&eC 102.1 ./ .1)2 registr6 portC /))) is not registered. o f(rther infor&ation is availa le

    // ing the (torage Node No( '3// [root@ o!" 1 li %# java -jar .'kvstore-1.2.123.jar ping -port /))) -host102.1 ./ .1)3! : at hostna&eC 102.1 ./ .1)3 registr6 portC /))) is not registered. o f(rther infor&ation is availa le

    Step - Start t!e KV admin and create plans to deploy datacenter stora+e nodes and t!eS*/KVstore

    //(tart the kv ad#inistration on ' // [root@ o!" 1 li %# java -jar .'kvstore-1.2.123.jar r(nad&in -port /)))-host 102.1 ./ .1)1

    The first step is to configure the *vstore using (configure Hstore nameJ( command.

    // onfigure the store// kv-> config(re !*+, store

    Oracle NoSQL database configuration can be carried out either from the 4L& or the web basedinterface. &n both the cases, the configuration is done by the creation and e$ecution of (plans(. 2plan is a direction to the *vadmin to perform certain activity in lieu of *vstore configuration. 2 plancan e$ist in K7N/&N@, 2KK O#7/, ENN&N@, SE4477/7/, 7 O , &NT7 EKT7/, and

    42N47LL7/ status.

    Our first (plan( deploys the datacenter (S0A!KTS( as shown below. Note that the *vadmin consolereturns the plan id after the successful e$ecution of the plan.

    // reate and e,ecute plan to deploy the datacenter ()$- (// kv-> plan -e5ec(te -na&e 8Keplo6 !*+, store8 deplo6-datacenter 8!*+-9 !88Ho&&ent-, !tore 6 !a(ra h81

    +e use (show plans( or (show plan Hplan numberJ( command to list all:individual plan5s6 issued bythe *vadmin, along with their latest status.

    //'ist all the plans//

  • 8/19/2019 oraclenosql_kvstore_deployment1

    8/13

    kv-> show plans 1 Keplo6 !*+, store !NHH K K

    The (plan ( deploys the first storage node NoSQL>.

    // reate and e,ecute plan to deploy storage node No( '1 in the store// kv-> plan -e5ec(te -na&e 8Keplo6 ode)18 deplo6-sn 1 102.1 ./ .1)1 /)))8Ho&&ent-Keplo6ed ode)182

    // et the list of plans// kv-> show plans

    1 Keplo6 !*+, store !NHH K K 2 Keplo6 ode)1 !NHH K K

    +e use (show topology( command to display the current topology of the store.

    // heck the store topology// kv-> show topolog6dc7[dc1% na&e7!*+-9 ! sn7[sn1% dc7dc1 102.1 ./ .1)1C/))) stat(s7RN = ?

    7very storage node must have the administration process to complete the creation of a databaseon the node. The (plan ( deploys the admin process for the last deployed storage node NoSQL>.

    // reate and e,ecute plan to deploy ad#in process for No( '1 storage node// kv-> plan -e5ec(te -na&e 8Keplo6 :d&in ode)18 deplo6-ad&in 1 /))13

    //'ist the plans// kv-> show plans 1 Keplo6 !*+, store !NHH K K 2 Keplo6 ode)1 !NHH K K 3 Keplo6 :d&in ode)1 !NHH K K

    The (plan ;( deploys the second storage node NoSQL in the store.

    // reate and e,ecute plan to deploy storage node No( '2 in the store// kv-> plan -e5ec(te -na&e 8Keplo6 ode)28 deplo6-sn 1 102.1 ./ .1)2 /)))8Ho&&ent-Keplo6ed ode)28E

    //'ist the plans// kv-> show plans1 Keplo6 !*+, store !NHH K K

    2 Keplo6 ode)1 !NHH K K 3 Keplo6 :d&in ode)1 !NHH K K E Keplo6 ode)2 !NHH K K

    // s a ne& storage node is added4 let us check the topology// kv-> show topolog6dc7[dc1% na&e7!*+-9 ! sn7[sn1% dc7dc1 102.1 ./ .1)1C/))) stat(s7RN = ? sn7[sn2% dc7dc1 102.1 ./ .1)2C/))) stat(s7RN = ?

    The (plan =( deploys the third storage node NoSQL in the store.

  • 8/19/2019 oraclenosql_kvstore_deployment1

    9/13

    // reate and e,ecute plan to deploy storage node No( '3 in the store// kv-> plan -e5ec(te -na&e 8Keplo6 ode)38 deplo6-sn 1 102.1 ./ .1)3 /)))8Ho&&ent-Keplo6ed ode)38/

    //'ist the plans// kv-> show plans 1 Keplo6 !*+, store !NHH K K 2 Keplo6 ode)1 !NHH K K 3 Keplo6 :d&in ode)1 !NHH K K E Keplo6 ode)2 !NHH K K / Keplo6 ode)3 !NHH K K

    4reate the administration process for the storage nodes NoSQL and NoSQL .

    // reate and e,ecute plan to deploy ad#in process for No( '2 storage node// kv-> plan -e5ec(te -na&e 8Keplo6 :d&in ode)28 deplo6-ad&in 2 /))1

    // reate and e,ecute plan to deploy ad#in process for No( '3 storage node// kv-> plan -e5ec(te -na&e 8Keplo6 :d&in ode)38 deplo6-ad&in 3 /))1F

    The storage node deployment has been done. Our proposed store configuration is over and weshall verify the final topology as below.

    //No& all the storage nodes have been attached to the store. 'et us check the final topology// kv-> show topolog6dc7[dc1% na&e7!*+-9 ! sn7[sn1% dc7dc1 102.1 ./ .1)1C/))) stat(s7RN = ? sn7[sn2% dc7dc1 102.1 ./ .1)2C/))) stat(s7RN = ? sn7[sn3% dc7dc1 102.1 ./ .1)3C/))) stat(s7RN = ?

    +e will create a node pool to hold the available storage nodes during store deployment.

    // reate a pool of nodes// kv-> addpool L6! 9ool

    // dd storage node 1 to the pool// kv-> joinpool L6! 9ool 1:ll!torage odesC sn1 sn2 sn3

    L6! 9oolC sn1 // dd storage node 2 to the pool// kv-> joinpool L6! 9ool 2:ll!torage odesC sn1 sn2 sn3L6! 9oolC sn1 sn2

    // dd storage node 3 to the pool// kv-> joinpool L6! 9ool 3:ll!torage odesC sn1 sn2 sn3L6! 9oolC sn1 sn2 sn3

    //'ist the pools in the store// kv-> show pools

  • 8/19/2019 oraclenosql_kvstore_deployment1

    10/13

    :ll!torage odesC sn1 sn2 sn3L6! 9oolC sn1 sn2 sn3

    The final step i.e. The deployment of store. Note that this is one time activity in the entire life cycleof the store. The replication factor H J and number of partitions H>--J must be specified whiledeplying the store. Since our replication factor is with three storage nodes, only one logicalreplication group will be created.

    //5eploy the store ()$*+store using the pool My(N ool// kv-> plan -e5ec(te -na&e 8Keplo6 !*+, store8 deplo6-store L6! 9ool 3 1))

    //'ist the plans// kv-> show plans 1 Keplo6 !*+, store !NHH K K 2 Keplo6 ode)1 !NHH K K 3 Keplo6 :d&in ode)1 !NHH K K E Keplo6 ode)2 !NHH K K / Keplo6 ode)3 !NHH K K Keplo6 :d&in ode)2 !NHH K K F Keplo6 :d&in ode)3 !NHH K K Keplo6 !*+, store !NHH K K

    2fter the store deployment, the topology listing would display additional information i.e. thereplication node se'uence in the current replication group.

    //(tore topology after the store deploy#ent// kv-> show topolog6dc7[dc1% na&e7!*+-9 ! sn7[sn1% dc7dc1 102.1 ./ .1)1C/))) stat(s7RN = ? rn7[rg1-rn1% sn7sn1 stat(s7RN = ? sn7[sn2% dc7dc1 102.1 ./ .1)2C/))) stat(s7RN = ? rn7[rg1-rn2% sn7sn2 stat(s7RN = ? sn7[sn3% dc7dc1 102.1 ./ .1)3C/))) stat(s7RN = ? rn7[rg1-rn3% sn7sn3 stat(s7RN = ?

    The store has been deployed successfully.

    The article details step by step demonstration of the configuration and deployment process.Aowever, the process could have been also carried out by using a script which contains all theplans re'uired for the store configuration and deployment. The single script which can be used forthe deployment of S0A"#store loo*s as below

    ### *egin !cript ###config(re !*+, storeplan -e5ec(te -na&e 8Keplo6 !*+, store8 deplo6-datacenter 8!*+-9 !8 8Ho&&ent-, !tore 6 !a(ra h8plan -e5ec(te -na&e 8Keplo6 ode)18 deplo6-sn 1 102.1 ./ .1)1 /))) 8Ho&&ent-Keplo6ed ode)18plan -e5ec(te -na&e 8Keplo6 :d&in ode)18 deplo6-ad&in 1 /))1plan -e5ec(te -na&e 8Keplo6 ode)28 deplo6-sn 1 102.1 ./ .1)2 /))) 8Ho&&ent-Keplo6ed ode)28plan -e5ec(te -na&e 8Keplo6 ode)38 deplo6-sn 1 102.1 ./ .1)3 /))) 8Ho&&ent-Keplo6ed ode)38plan -e5ec(te -na&e 8Keplo6 :d&in ode)28 deplo6-ad&in 2 /))1plan -e5ec(te -na&e 8Keplo6 :d&in ode)38 deplo6-ad&in 3 /))1O(it### nd !cript ###

    The script can be included in the (runadmin( command to configure and deploy the store in singlebatch operation as shown below.

    #java -jar , +;L 'li 'kvstore.jar r(nad&in -port /))) -host 102.1 0./ .1)1 -script scrpt.t5t

  • 8/19/2019 oraclenosql_kvstore_deployment1

    11/13

    Verifyin+ t!e vstore 2s stated earlier, the Oracle NoSQL *vstore supports AT1L based @E& admin console for storeconfiguration and admin activities. The admin console can be opened from a web browser usingbelow lin*

    http9::adminnode9adminport

    &n our demonstration, we have used NoSQL> i.e. >< .>C?.=C.>-> as (adminnode( and =--> as(adminport(, we can open @E& admin console using the lin* http9::>< .>C?.=C.>->9=--> orhttp9::localhost9=--> .

    Let us chec* out few of the screen shots from the admin console

    1. Verify t!e S*/KVstore topolo+y and confi+#ration

    The screenshot from the first tab (Topology( provides the pictorial view of the store. 4lic* the(#erify 4onfiguration( button to verify the store configuration.

    (. Verify t!e plans #sed for store confi+#ration.

    The screenshot from the second tab (Klans 4onfiguration( shows the plan history and their

    status.

    Note that the right section has (4reate a Klan( drop down action field. &t can be used to create,approve, and e$ecute all sorts of plans in the store.

    http://192.168.56.101:5001/http://localhost:5001/http://192.168.56.101:5001/http://localhost:5001/

  • 8/19/2019 oraclenosql_kvstore_deployment1

    12/13

    ,. Lo+s +enerated d#rin+ t!e store activity

    The screenshot from the third tab (Logs( shows the log generated throughout the deploymentprocess.

    -. Verify t!e node pool arran+ement in t!e store

    The screenshot from the fourth tab (1anage Kools( shows the storage node pools in theS0A"#store. &t also offers the utility to create pool, add nodes, delete nodes and delete pools.

  • 8/19/2019 oraclenosql_kvstore_deployment1

    13/13

    Concl#sionThe Oracle NoSQL *vstore deployment has been demonstrated. Oracle NoSQL offers schemaless storage model with much easier maintenance and management but promises high availabilitywith no single point of failure.