Upgrading to a New Release

This release of NuoDB introduces the first GA release of NuoDB Admin (nuoadmin). In NuoDB 3.4.2 and greater, two Admin management interfaces are available for database and domain management, that is NuoAgent and NuoDB Admin. NuoDB recommends using NuoDB AdminAn interface for domain and database management. NuoDB Admin (nuoadmin) may be used instead of nuoagent and nuorestsvc services. When using nuoadmin, use nuocmd instead of the nuodbmgr Command Line Interface (CLI) tool., the new and improved database and domain management interface.

Moving to NuoDB Admin

To switch from NuoAgent to NuoDB Admin domain management, do the following:

1. Ensure that every database in the NuoAgent domain has a capture file that describes it.
For information on using NuoDB Manager's capture database command, see Capture Database.

2. Upgrade each host to NuoDB 3.4.2 using the standard NuoAgent method. This may be performed in a rolling upgrade fashion - for details see Rolling Upgrade: Databases Remain Available. Alternatively, you may perform the upgrade with your database(s) down - for details see Upgrading With Databases Down.

Note: Upgrading from a release previous to NuoDB 2.6 is not supported.

3. Shut down all NuoDB database processes.
For information on using NuoDB Manager's shutdown database command, see Shutdown Database.

4. On every host running NuoAgent, shut down NuoAgent processes by running the following command:

service nuoagent stop

5. On every host that had been running NuoAgent, configure NuoDB Admin.
For information on configuring admin processes and NuoDB Admin TLS security, see Configuring NuoDB Admin.

6. On every host that had been running NuoAgent, unregister NuoAgent and register NuoDB Admin by running the nuoadmin-enable command as follows:

$NUODB_HOME/etc/nuoadmin-enable

This command shuts down NuoAgent (if not previously shutdown) and also starts NuoDB Admin.

7. For each database that is to be restarted using NuoDB Admin, you must invoke a sequence of commands which adds the archive and database metadata to the NuoDB Admin domain state. To generate this sequence of commands, use NuoDB Command's prepare database command.

An example of the prepare database command, and the sequence of commands generated by it, is shown below.

$ nuocmd prepare database --capture-file tmp/NuoCmdTest/testMigrateDatabase1/db.xml --server-mapping uuid:b542ee8f-ac24-49a8-bdae-40ea8bbf2110 server0 uuid:fca16a31-a4c9-4b10-b88f-8c5bc1804db6 server1
WARNING: Restricted options appearing in capture file: journal, storage-group-leader, storage-group-epoch
WARNING: Database options specified inconsistently in capture file: ping-timeout
To start database using nuoadmin, execute the following commands:

 export NUOCMD_DBA_USER=theDbaUser          # ATTENTION: replace with your actual DBA username
 export NUOCMD_DBA_PASSWORD=theDbaPassword  # ATTENTION: replace with your actual DBA password
 nuocmd create archive --db-name db --server-id server0 --archive-path /var/opt/nuodb/production-archives/db1 --restored
 nuocmd create archive --db-name db --server-id server1 --archive-path /var/opt/nuodb/production-archives/db2 --journal-path /var/opt/nuodb/production-archives/db2 --restored
 nuocmd create database --db-name db --te-server-ids server0 server1 --default-options \
   commit remote \
   enabled-ciphers RC4 \
   journal-max-directory-entries 1000 \
   journal-single-file disable \
   journal-sync-method disk \
   max-http-connections 16 \
   max-lost-archives 0 \
   mem 10737418240 \
   snapshot-max-old-versions 150 \
   snapshot-max-size 10000 \
   snapshot-max-time 14400 \
   snapshot-min-size 100 \
   snapshot-min-time 60

$ export NUOCMD_DBA_USER=<theActualDatabasePassword>
$ export NUOCMD_DBA_PASSWORD=<theActualDatabasePassword>
$ nuocmd create archive --db-name db --server-id server0 --archive-path /var/opt/nuodb/production-archives/db1 --restored
Archive(archive_path=/var/opt/nuodb/production-archives/db1, db_name=db, id=0, server_id=server0, state=NOT_RUNNING)

$ nuocmd create archive --db-name db --server-id server1 --archive-path /var/opt/nuodb/production-archives/db2 --journal-path /var/opt/nuodb/production-archives/db2 --restored
Archive(archive_path=/var/opt/nuodb/production-archives/db2, db_name=db, id=1, journal_path=/var/opt/nuodb/production-archives/db2, server_id=server1, state=NOT_RUNNING)

$ nuocmd create database --db-name db --te-server-ids server0 server1 --default-options \
>       commit remote \
>       enabled-ciphers RC4 \
>       journal-max-directory-entries 1000 \
>       journal-single-file disable \
>       journal-sync-method disk \
>       max-http-connections 16 \
>       max-lost-archives 0 \
>       mem 10737418240 \
>       snapshot-max-old-versions 150 \
>       snapshot-max-size 10000 \
>       snapshot-max-time 14400 \
>       snapshot-min-size 100 \
>       snapshot-min-time 60
STARTING: StartProcessRequest(archive_id=0, db_name=db, engine_type=SM, labels={}, options={}, server_id=server0)
STARTING: StartProcessRequest(archive_id=1, db_name=db, engine_type=SM, labels={}, options={}, server_id=server1)
STARTING: StartProcessRequest(db_name=db, engine_type=TE, labels={}, options={}, server_id=server0)
STARTING: StartProcessRequest(db_name=db, engine_type=TE, labels={}, options={}, server_id=server1)

$ nuocmd check database --db-name db --check-running --num-processes 4 --timeout 20
$ nuocmd show domain
server version: 4.0.dev-9999-09d6e00997, server license: Enterprise
server time: 2019-04-04T11:50:12.721, client token: de23402d827a49c8b0e4f99792c81e8ebf14b8ed
Servers:
 [server0] localhost:48000 [last_ack = 0.17] [member = ADDED] [raft_state = ACTIVE] (FOLLOWER, Leader=server1, log=0/33/33) Connected *
 [server1] localhost:48001 [last_ack = 0.16] [member = ADDED] [raft_state = ACTIVE] (LEADER, Leader=server1, log=0/33/33) Connected
Databases:
 db [state = RUNNING]
 [SM] localhost:53862 [start_id = 0] [server_id = server0] [pid = 67748] [node_id = 1] [last_ack =  0.92] MONITORED:RUNNING
 [SM] localhost:53861 [start_id = 1] [server_id = server1] [pid = 67749] [node_id = 3] [last_ack =  1.25] MONITORED:RUNNING
 [TE] localhost:53859 [start_id = 2] [server_id = server0] [pid = 67750] [node_id = 4] [last_ack =  8.67] MONITORED:RUNNING
 [TE] localhost:53860 [start_id = 3] [server_id = server1] [pid = 67751] [node_id = 2] [last_ack =  9.67] MONITORED:RUNNING

8. For each database that is to be restarted using NuoDB Admin, execute the sequence of commands generated by prepare database (see step 7).

Note: Execute this sequence of commands verbatim, except for values required for NUOCMD_DBA_USER and NUOCMD_DBA_PASSWORD which must reflect your database administrator username and password.

Using Process Labels to Replace Host Tags

If your database(s) created in a NuoAgent environment include host tags, you can re-implement tag functionality using process labels. For more information, see Load Balancer Policies.