Hello, hi! My name is Anand Chandak and I work as a Product Manager for Oracle
NoSQL Database group, here at Oracle. And I welcome you to this webinar on Oracle
NoSQL Database setup and run Oracle NoSQL cluster in less than 30 minutes.
So, let's look at the program agenda for today. So, I start by giving a brief
introduction about what Oracle NoSQL Database is all about and then we'll do
a hands-on lab. So, in this hands-on lab we will set up a nine, NoSQL nine node
NoSQL cluster and you'll see how easy and simple it is to do that.
So, let's get started with what really is Oracle NoSQL Database. So, Oracle NoSQL
database is simple, fast, reliable, and flexible data management solution.
So, it is simple. You can really set up a nine node NoSQL cluster in less than 30
minutes. It's fast. We have tested Oracle NoSQL Database with 1.25
million operations per second internally. It is flexible. It provides a variety of
data modeling options. So, you can either model it as a raw key-value pair, a table
format, as well as there is an option to model as a JSON data type. So, depending
on the type of the application that you are trying build, you can pick the model
which is most suited for your app. And, of course, it is extremely reliable.
So, before we actually do the lab, let's just spend some time understanding some of
the key concept. In Oracle NoSQL Database. So, what you see on your screen
is the full key space or the set of keys that you want model in NoSQL database
database is hashed into multiple, you know, hash buckets or fixed set of partitions,
what you call as partitions.
Now, the Oracle NoSQL drivers are aware about this hash function.
So, given a key, it will return the.. the partition ID. Now, the set of
partitions are grouped together and what we call as a shard which is really a
logical container for subset of the data. And all of this
is managed by Oracle NoSQL Database.
The distribution of partitions in a
shard is even. So, for example if you have three shards and 30 partitions,
each shard gets ten partitions. Inside the shard, there are one or more replication
nodes or RN. These are really the Java multi-threaded server process for high
availability and each scalability reasons we recommend you know having
three such RNs inside a shard. uh.. The..uh.. each.. the the replication nodes are
actually deployed on storage node which is really a physical or virtual machine.
You can think of storage node as a single unit of failure.
So now with this as introduction, let's look at the overview of the hands-on lab. So, in this
hands-on lab, we want to focus on, you know how one can go about downloading
and installing Oracle NoSQL Database and then what does it take to
really deploy a NoSQL cluster. So, download and install. So, it's pretty
straightforward. Visit our OTN page.. Oracle Technology
Network page. On the download tab, you will see the links to download different
editions of Oracle NoSQL Database. You'll also find links to download the
drivers. We support multiple drivers - Java, Python, NodeJS and so on so forth.
So, depending on the track that you've chosen, so if you are really testing and
evaluating Oracle NoSQL Database, we recommend you can set up a single node
NoSQL. And can be really done in less than five minutes.
Or if you are doing production or performance kind of thing we recommend setting up a multi node
NoSQL cluster or a three by three store and that can be done in less than
30 minutes. So, let's look at the lab. So, in today's
lab what we really want to do is we want to set up a data center we call it the
Houston data center. And, in that we want to set up a 3 X 3
NoSQL clusters, three shards each having three copies of the data. So you can see
there are three shards. Shard1, Shard2 and Shard3. And inside the shard,
there are three nodes. There is one node which is elected as a master node and
the other nodes are what we call as a replica nodes. So, before we actually do
the hands-on lab, let's just understand the cluster deployment step. So, at high
level these are steps what you really need to do to set up and deploy a NoSQL
cluster. The first step is to bootstrap the storage node that will be used in
NoSQL deployment. So, this step creates a config file in the KVROOT folder.
The second step is to really start the storage node agent which works as a
listener. You have to really perform both the steps on each of the storage node
that will be used on the deployment of NoSQL database. Having done that, the
final step is to really run the set of admin commands..uh uh.. the commands are,
first we create a store or we name the store. Then we create a data center. Then we
assign the storage node that we bootstrap to our data center. And finally deploy the
NoSQL cluster. So, this is all it takes to really deploy the NoSQL
cluster. So, before we actually start doing a cluster deployment,
let's look at a utility that we provide which can assist in the deployment.
So, it's called as makebootconfig command. uh.. So, makebootconfig command..uh.. is utility
uh.. that we ship and which can assist the deployment. So, let's look at some of the
parameters. The root is where the KVROOT folder is pointing to. The capacity is,
uh.. you know..uh..how many number of disk that you have for the storage node.
The harange port.. uh.. memory, you know, what is kind of memory that you want to allocate for
the replication node. So, if you don't provide any thing,
the system automatically takes eighty percent of that. The hostname.. uh uh.. and the
storage node..uh.. so....
So.. let's look at the uh uh.. hands-on lab now.
So, I have a virtual machine and what I'm going to do here is, I'll quickly jump to the folder where I
have written some script which can be used for
today's deployment. So, I am at this folder called /u01/nosql/scripts
and I like I said I have some scripts written which we can use further for
this hands-on lab. So, if you remember correctly the first step was to daily
run the makeboot command. So, let's open the makebootconfig.
So, mind you I am simulating the situation, I am running this lab in my virtual
machine. So, we are really simulating a situation of three storage node each having
you know capacity of 3. So, this is all done in a single virtual machine in the
production environment you can do it in a single storage node. So.. the.. so the first
step is really point to the data folders on each storage node. So, I have created three
storage nodes - sn1, sn2, sn3. And, if you look at the makebootconfig, so the root is
inside each of storage node. We don't want to set up the security, so it's set to None.
The capacity is three. We want.. we.. we assimilating a situation where each
storage node has three direct attached disks. The harange port.. and then the memory
we are allocating 200 MB for each storage node. The kvhost is I've created
multiple hosts and in my /etc/host file and they are all pointing to the single
machine. The storage node directory for each of the storage node I'm calling it
as a u01, u02 and u03. And likewise, I do it for each of the
storage node. So remember we are setting up a 3x3 store. So, we are bootstrapping
three storage nodes. So, let me come out of this command and..uh..uh run the script.
Bootstrap storage node. It is done bootstrapping. The next step was to start the storage
node agent or SNA. Let's look at the script for doing that. So as you can see I
am calling the start utility and I am passing the root of each of the storage
node to the kvstore start block. So, let's start the SNA. Okay
It returns pretty quickly. And if you recall the third step was to run those
series of admin commands. So, in the interest of time, I have scripted those.
So I have written those in a file called 3X3.kvs. So, let's look at that.
So if you recall the first step was to name the store. We are calling it as
a kvstore. We are creating a data center. We named it houston and we are saying a
replication factor of 3 or number of copies that we want to keep as 3. And now
we deploy our first storage node in this data center. And we do it and we set the
port as 5000. Likewise we can do it for each of this storage node and finally we
create a topology we call it as 3X3 we have created 120 partitions and
before we actually go ahead and deploy this we do a preview and as a final step
we deploy the topology. So, this is all it takes to set up and deploy NoSQL
cluster. So, if you noticed, about 15 or 20 lines of code that can give you high
availability, your applications and all of that. How simple it can get. So what
I'm going to do is I'll run this. so..
Let's see what happens. So, this is going to take some time..
What I have done is that I have opened another terminal and I am entering the admin port..admin prompt
So, in this prompt we can see this topology. So.. so I run the admin
shell script. Okay.. so we are in the admin prompt and I would use this command
called show topology. It can show me the status of the deployment. So, it is still
doing. So as you can see, on the left of the screen what we are asking is 3
shards, 9 rns and 120 partitions. So, in my introduction I mentioned we evenly
distribute the partitions across the shard. So, there are 3 shards and 120
partitions which means each shard gets 40 partitions. So, let me fire the
show topology command again. So if you can see the output the three storage nodes
are deployed. It is.. it is running the plan to deploy each of the rns into
the shard. So, let's give it some more time before the command returns.
Once it returns, you should be able to see all the three shards each having the
three replication nodes and the distribution of the partitions.
Let's look at where we are. So let me expand the screen for you. So..uh.. 2 shards
are deployed. So, we'll give it some more time
Let's see where we are on the topology. All the three shards are deployed.
As again three all the rns are deployed as well. So, now.. in.. this command is going to return
in any time. As you can see.. you know, we also show some you know.. you know the
status of each RN, what is the latency.. you know.. so this information can
be very useful if you are triaging, you know.. some issue.. you know.. on..
So, just wait for..you know..
a couple of more seconds and then we have our NoSQL 3x3 NoSQL deployed and running.
So, now you see the partitions are distributed. So, like I said each shard
gets 40 partition. And so the command has returned successfully. All
the status of each RN process is running. Right, so.. so.. so with that our
NoSQL topology is deployed. So, we can come out of of this admin prompt.
So, that concludes this webinar. I hope you found it easy and simple. Thank you.