Files
jube-fork/docs/GettingStarted/CreatingDatabase/index.md
richard-churchman 5f6bbe45f7 A major refactoring of the software to make model IDs less volatile between Import, Export, and Peek (comparison) of the model configuration environment. As part of the extensive refactor, most tables have been updated to include a GUID field, which is consistent across Import, irrespective of the IDs remaining volatile. The consistent GUID allows for the separation of production (i.e., Case, Transaction, and Counter data), Redis cache data and quasi-production data(i.e, Lists, Suppressions, and Dictionaries) from the configuration environment. Significant rework of Controllers, Repositories and POCOs to support GUID as an access path rather than ID.
Major bug fixes relating to the Redis implementation in Reprocessing and Search Key Cache were identified and fixed as part of the rekeying development.

Included functionality to stop the Exhaustive training.  Fixed the Unsupervised learning functionality in Exhaustive Training.  Embedded the Mock Data CSV data into a class to make it compatible with Docker without needing to modify the Dockerfile (i.e, build).  Included a new table that stores training data to enhance support capabilities for Exhaustive.

Reintroduced and validated the Multitenancy functionality.

Postgres is now fully deprecated in place of Redis for cache, and all implementations of the Interfaces for Postgres have been removed.  No migrations exist to support this deprecation, and Postgres as a cache is now wholly unsupported.  Removed the Indexing background thread,  as Redis does not require it, given that it is a key-value pair database.

Created a RedisCommandFlag Environment Variable to support Fire and Forget write to Redis in Invocation.

Implemented functionality to Export, Peek and Download configuration environments using a secure, encrypted scheme.  Created a permission to access the functionality via the user interface.  Extensive database-based logging is included to provide for a comprehensive audit.  Created functionality to Import the encrypted Export file inside a database transaction to ensure consistency.

As Docker is now the primary deployment model, log4net instantiation has been moved to an approach that primarily uses programmatic instantiation of the ConsoleLogger and RollingFileAppender given Environment Variables. Implemented functionality to support remote \ mounted Log4Net XML Serialisation files for more advanced log4net configurations.

Reintroduced access to counters via the user interface and created a permission.

Took the opportunity to implement ReSharper linter suggestions.

Disabled the Lock button across the whole application, with that functionality being reserved for future use. It is intended that locking happens programmatically on the basis of dependencies in future commits.

Fixed several significant end-use bugs which became apparent during testing of the refactored code relating to case management and visualisations.  Fixed certain other minor bugs that came up during testing.

Brought documentation up to date for this commit.

Brought the Docker Compose file up to date for this commit.

Removed Redundant Environment Variables for this commit.

Made the README file less verbose and unnecessary.
2025-08-13 19:01:08 +03:00

3.8 KiB

layout, title, nav_order, parent
layout title nav_order parent
default Creating Database 2 Getting Started

🚀Speed up implementation with hands-on, face-to-face training from the developer.

Creating Postgres Database

It is possible to install PostgreSQL to a Droplet on a self managed basis, which is a cost effective and oftentimes preferable approach. The resources are available at the following location:

https://www.postgresql.org/download/

PostgreSQL is a remarkable database and is not especially difficult to maintain, although it has tendency to become more anxious when it comes to assuring backups and high availability. The maintenance of high availability and backups is the main value proposition of Managed PostgreSQL on DigitalOcean or alternative hosting provider.

For the purpose of this documentation, PostgreSQL Managed Database at DigitalOcean will be used.

In the DigitalOcean Control Panel, navigate to Databases on the left hand navigation:

Image

Click on the Database menu item to expose the page to begin database creation:

Image

Locate the prominent Create Database Cluster button:

Image

Click the button to expose the Create Database Cluster:

Image

Specify a datacenter nearby (in this case Frankfurt) and PostgreSQL version 14:

Image

Scroll down to size the server, selecting in this case 2vCPU and 4GB RAM:

Image

No standby is needed although it would be suggested given production use. Scroll down and note the Create Database Cluster button:

Image

Click the Create Database Cluster button to begin the process of database creation:

Image

Upon the database having been created note the availability of the connection settings:

Image

Clicking the show button will expose the password:

username = doadmin
password = *******
host = db-postgresql-fra1-34965-do-user-12376516-0.b.db.ondigitalocean.com
port = 25060
database = defaultdb
sslmode = require

The database settings which will be passed as an Environment Variable later in the documentation.

Network security is outside the scope of this documentation; however, note that it is sensible to restrict access to the database to only the remote IP address in use, although this will not affect connections via the local network:

Image

Creating Redis Database

The following is for completeness, however, this guide does not suggest using Redis on Digital Ocean unless comfortable configuring TLS as follows:

https://www.digitalocean.com/community/tutorials/how-to-connect-to-managed-redis-over-tls-with-stunnel-and-redis-cli

In the same Databases context menu, proceed to create a new database as if it were Postgres SQL as above, instead selecting Redis a the database product type:

Image

Select the desired size as specified in the introduction:

Image

Before scrolling down to confirm the creation of the Redis database:

Image

Once created, the credentials for the Redis database exist in a very similar location:

Image

The senstive information is exposed in the same manner as with Postgres, clicking show. Hive off the following information for the installation of Jube as the final step of this process:

username = default
password = ************************ show
host = db-redis-fra1-14927-do-user-12376516-0.c.db.ondigitalocean.com
port = 25061