[NuoDB]: Overview & Installation
NuoDB is a distributed cloud database management system with a rich SQL implementation and full support for transactions. NuoDB is designed to offer:
* Scale-out Performance
* Continuous Availability
* Geo-Distribution
* Multi-Tenancy
* No Knobs Administration
As a distributed system, a NuoDB installation consists of a collection of hosts, called a Domain, that have been provisioned to work together to support one or more NuoDB databases.
One or more instances of the following kinds of NuoDB processes will be running on the hosts in the Domain:
* Transaction Engine (TE): Provides your application access to a single NuoDB database by processing SQL commands, caching data, and coordinating transactions with other TEs and Storage Managers.
* Storage Manager (SM): Reads and writes transacted data to and from disk
* Broker: Manages access to Transaction Engines and Storage Managers, independent of any particular database in the NuoDB system. By default, when you start a broker, the broker defines a Domain
* Agent: Manages NuoDB processes running on a particular host and communicates with the Broker about the state of the system
Applications connect to TEs through JDBC or other interfaces. TEs and SMs communicate with each other as required to implement transactions, durability, and the other ACID behavior expected from a full SQL database.
The following illustration shows how a client connects to a simple NuoDB database system.
The steps in the process shown in this conceptual illustration are as follows:
An application that seeks to connect to the database calls to the broker on Host A.
Because the Broker communicates with all Agents in the Domain it knows which Transaction Engines are available and determines the best transaction engine for the application.
The broker communicates back to the client that it should connect to the Transaction Engine on Host B.
Once the Application knows which Host and Transaction Engine to communicate with, it will no longer communicate with the Broker.
The client connects to the Transaction Engine on Host B.
As indicated in the illustration, a Domain may consist of multiple TEs and multiple SMs, configured as necessary to support scalability, availability, or redundancy requirements. A minimal deployment of NuoDB consists of a single TE, but that configuration provides no durability. A minimal durable configuration consists of a single TE and a single SM. A minimally-redundant configuration consists of two TEs and two SMs, paired to two hosts.
To make managing the scalability, reliability, and redundancy goals for your databases easier, NuoDB introduces the concept of a database Template. A Template specifies a Service Level Agreement (SLA) for any databases to which it is applied. NuoDB’s management layer works to ensure that the SLA remains enforced at all times. NuoDB will automatically restart TEs or SMs on hosts as necessary to ensure that the Template’s specification is maintained.
For instance, if, for instance, a host on which TEs or SMs are running crashes, NuoDB will automatically start up replacement TEs or SMs on other hosts in the domain to enforce the SLA. NuoDB 2.1 includes 4 Templates:
* Single Host
* Minimally Redundant
* Multi Host
* Geo distributed
A Template is applied to a database when the database is created; such a database is referred to as a managed database. The Template specifies at a logical level how resources in the Domain should be used to create and manage an appropriate configuration of TEs and SMs across the Domain’s hosts and regions as required to maintain the SLA required for a given database. For example, NuoDB will ensure that databases with the “Minimally Redundant” Template applied will be hosted on at least two hosts in the Domain (each running a TE and SM). If more hosts are available, it will automatically distribute the four processes (2 TEs and 2 SMs) across up to four hosts.
If your scalability, availability, or redundancy requirements change once you’ve created a database, you can always apply a different Template at any time, and NuoDB will automatically adjust the configuration of TEs and SMs in the Domain accordingly.
Community Edition Downloads : http://dev.nuodb.com/download-nuodb/request/download
Linux tar File Installation :
—————————-
Extracting NuoDB from an installation tar file is useful when you want to install NuoDB in a non-default location, you do not have nuoadmin privileges on the system, or you prefer for whatever reason, to not use a package installer. Tar file installations of NuoDB will not be automatically started when the system comes up; you will need to manually start NuoDB services after each reboot.
Unpack the tar file from the directory to which it was downloaded, set the NUODB_HOME environment variable and update your PATH environment variable. Please replace n.n.n with the correct version number.
[nuoadmin@dbversity.com 2]# ll -lhtr
-rw-r–r– 1 nuoadmin nuoadmin 183M Nov 18 02:54 nuodb_2.1.0.2.tar.gz
[nuoadmin@dbversity.com 2]#
[nuoadmin@dbversity.com 2]# gunzip nuodb_2.1.0.2.tar.gz
[nuoadmin@dbversity.com 2]# ll -lhtr
total 184M
drwx—— 2 nuoadmin nuoadmin 16K Aug 27 15:44 lost+found
-rw-r–r– 1 nuoadmin nuoadmin 184M Nov 18 02:54 nuodb_2.1.0.2.tar
[nuoadmin@dbversity.com 2]#
[nuoadmin@dbversity.com 2]# tar -zxvf nuodb_2.1.0.2.tar
nuodb-2.1-2.linux.x86_64/
nuodb-2.1-2.linux.x86_64/license.txt
nuodb-2.1-2.linux.x86_64/doc/
nuodb-2.1-2.linux.x86_64/doc/README.TXT
—- blah blah blah —–
nuodb-2.1-2.linux.x86_64/samples/jruby/sample.rb
nuodb-2.1-2.linux.x86_64/README.txt
[nuoadmin@dbversity.com 2]#
[nuoadmin@dbversity.com 2]# ll -lhtr
total 184M
drwx—— 2 nuoadmin nuoadmin 16K Aug 27 15:44 lost+found
drwxr-xr-x 12 kt63943 1000 4.0K Oct 31 15:32 nuodb-2.1-2.linux.x86_64
-rw-r–r– 1 nuoadmin nuoadmin 184M Nov 18 02:54 nuodb_2.1.0.2.tar
[nuoadmin@dbversity.com 2]#
[nuoadmin@dbversity.com 2]# mv nuodb-2.1-2.linux.x86_64/ nuodb
[nuoadmin@dbversity.com 2]# cd nuodb
[nuoadmin@dbversity.com nuodb]#
[nuoadmin@dbversity.com nuodb]# ll -lhtr
total 92K
-rw-r–r– 1 kt63943 1000 1.8K Oct 31 15:27 README.txt
-rw-r–r– 1 kt63943 1000 37K Oct 31 15:27 license.txt
-rwxr-xr-x 1 kt63943 1000 4.5K Oct 31 15:27 run-quickstart
drwxr-xr-x 3 kt63943 1000 4.0K Oct 31 15:32 tools
drwxr-xr-x 10 kt63943 1000 4.0K Oct 31 15:32 samples
drwxr-xr-x 3 kt63943 1000 4.0K Oct 31 15:32 plugin
drwxr-xr-x 2 kt63943 1000 4.0K Oct 31 15:32 lib64
drwxr-xr-x 2 kt63943 1000 4.0K Oct 31 15:32 jar
drwxr-xr-x 3 kt63943 1000 4.0K Oct 31 15:32 include
drwxr-xr-x 2 kt63943 1000 4.0K Oct 31 15:32 etc
drwxr-xr-x 3 kt63943 1000 4.0K Oct 31 15:32 drivers
drwxr-xr-x 2 kt63943 1000 4.0K Oct 31 15:32 doc
drwxr-xr-x 2 kt63943 1000 4.0K Oct 31 15:32 bin
[nuoadmin@dbversity.com nuodb]#
Set NuoDB environments as below.
[nuoadmin@dbversity.com nuodb]# sed -i ‘$a\export NUODB_HOME=/data/3/nuodb’ ~/.bashrc
[nuoadmin@dbversity.com nuodb]# sed -i ‘$a\export PATH=$PATH:$NUODB_HOME/bin’ ~/.bashrc
[nuoadmin@dbversity.com nuodb]#
[nuoadmin@dbversity.com nuodb]# source ~/.bashrc
[nuoadmin@dbversity.com nuodb]# env | grep NUO
NUODB_HOME=/data/3/nuodb
[nuoadmin@dbversity.com nuodb]#
default.properties :-
——————
The final manual step that must be performed for the Linux tar file installation, is to create a default.properties file. In $NUODB_HOME/etc, copy default.properties.sample to default.properties. Edit default.properties uncomment out the line for domainPassword and specify a value. This is the only required change.
[nuoadmin@dbversity.com etc]# sed -i “s/#domainPassword =/domainPassword =DBversity#23/g” default.properties
[nuoadmin@dbversity.com etc]#
[nuoadmin@dbversity.com etc]# grep “domainPassword =” default.properties
domainPassword =DBversity#23
[nuoadmin@dbversity.com etc]#
Linux Tar File Installations :-
—————————-
To start (or stop, by specifying stop) NuoDB services on Linux (tar) installations, execute the following commands in NUODB_HOME (the directory into which NuoDB was installed).
Start NuoDB Services on Linux (tar)
sudo etc/nuoagent start
sudo etc/nuorestsvc start
[nuoadmin@dbversity.com nuodb]$ ll -lhtr
total 96K
-rw-r–r– 1 nuoadmin nuoadmin 1.8K Oct 31 15:27 README.txt
-rw-r–r– 1 nuoadmin nuoadmin 37K Oct 31 15:27 license.txt
-rwxr-xr-x 1 nuoadmin nuoadmin 4.5K Oct 31 15:27 run-quickstart
drwxr-xr-x 3 nuoadmin nuoadmin 4.0K Oct 31 15:32 tools
drwxr-xr-x 10 nuoadmin nuoadmin 4.0K Oct 31 15:32 samples
drwxr-xr-x 3 nuoadmin nuoadmin 4.0K Oct 31 15:32 plugin
drwxr-xr-x 2 nuoadmin nuoadmin 4.0K Oct 31 15:32 lib64
drwxr-xr-x 2 nuoadmin nuoadmin 4.0K Oct 31 15:32 jar
drwxr-xr-x 3 nuoadmin nuoadmin 4.0K Oct 31 15:32 include
drwxr-xr-x 3 nuoadmin nuoadmin 4.0K Oct 31 15:32 drivers
drwxr-xr-x 2 nuoadmin nuoadmin 4.0K Oct 31 15:32 doc
drwxr-xr-x 2 nuoadmin nuoadmin 4.0K Nov 18 05:34 bin
drwxr-xr-x 2 nuoadmin nuoadmin 4.0K Nov 18 06:48 etc
drwxr-xr-x 6 nuoadmin nuoadmin 4.0K Nov 18 06:48 var
[nuoadmin@dbversity.com nuodb]$
[nuoadmin@dbversity.com nuodb]$
[nuoadmin@dbversity.com nuodb]$
[nuoadmin@dbversity.com nuodb]$ etc/nuoagent start
Starting NuoDB agent [ OK ]
[nuoadmin@dbversity.com nuodb]$
[nuoadmin@dbversity.com nuodb]$
[nuoadmin@dbversity.com nuodb]$ etc/nuoagent status
NuoDB agent is running.
[nuoadmin@dbversity.com nuodb]$
[nuoadmin@dbversity.com nuodb]$ etc/nuorestsvc start
Starting NuoDB restsvc [ OK ]
[nuoadmin@dbversity.com nuodb]$ etc/nuorestsvc status
NuoDB restsvc is running.
[nuoadmin@dbversity.com nuodb]$
[nuoadmin@dbversity.com nuodb]$ ps -ef | grep nuores | grep -v grep
[nuoadmin@dbversity.com nuodb]$
[nuoadmin@dbversity.com nuodb]$
[nuoadmin@dbversity.com nuodb]$ ps -ef | grep nuo | grep -v grep
nuoadmin 18488 1 2 06:54 pts/1 00:00:04 /usr/java/jdk1.7.0_71/bin/java -jar /data/2/nuodb/jar/nuoagent.jar –verbose
nuoadmin 20538 1 35 06:56 pts/1 00:00:15 /usr/java/jdk1.7.0_71/bin/java -jar /data/2/nuodb/jar/nuodb-rest-api.jar server /data/2/nuodb/etc/nuodb-rest-api.yml
[nuoadmin@dbversity.com nuodb]$
Domain Password :-
—————
Unlike OSX or Windows, the NuoDB Installer on Linux does not prompt the user for the domain password.
After the installation, the Agent/Broker and REST Service will fail to start up due to missing credentials.
Simply edit the file default.properties and fill in the domainPassword, and restart the services.