Data from applications (security, licenses, etc.) are replicated and stored in a data warehouse. Currently, an Oracle database is a prerequisite for the database used as a data warehouse. It is possible to use an "Always Free Oracle Autonomous Database" in case an additional license is required.


I. Prerequisites (ORACLE)


It is necessary to create a schema and a user for the application. 


The size of the schema depends on the amount of source data to be loaded and the retention time of the data in the application. However, an initial size of 10GB is recommended.


The user must be defined with an unlimited quota on the schema. He must have the rights to create tables, indexes, collect statistics and also the possibility to run the DBMS_CRYPTO library.


A sample script is available on this page.


II. Components installation


    II.a    Installation Directory


Create a directory for the installation of all components :

    - The software prerequisites below

    - The NOMASX-1 application


This directory will be called <NOMASX1_HOME> in the rest of this guide.


Example directory for Windows :

    c:\nomasx1


Example directory for Linux :

    /app/nomasx1

Preferably for Linux a specific user for the application should be created.

.


    II.b     Node JS


As NOMASX-1 is fully developed with Node JS, it is an indispensable component in the installation. It can be installed with the default options, all the necessary modules for the suite being included in the provided archive. The LTS version is the recommended version which can be downloaded at the following address: https://nodejs.org/en/download/

Choose the version according to the architecture on which to deploy NOMASX-1. 



      II.c    InstantClient for Oracle


Database connections are made using a JDBC client for Oracle. InstantClient is the recommended client for making connections. The tool is available at the following address:

https://www.oracle.com/database/technologies/instant-client/downloads.html

Choose the version according to the architecture on which to deploy NOMASX-1 and download the "Basic Package".


Once the file is downloaded, decompress the archive in the directory <NOMASX1_HOME>/instantclient

Create the directory <NOMASX1_HOME>/instantclient/network/admin and copy the tnsnames.ora to connect to your database.



     II.d    JDK 1.8


Since some features are based on Java, it is necessary to install a JDK on the server containing the NOMASX-1 application.

The recommended version is JDK 1.8_202 or later, which can be downloaded at the following address:

https://www.oracle.com/java/technologies/javase-jdk8-downloads.html


    II.e   Autres (Windows seulement)


Two other utilities are required for operation :

    - NSSM (tool used to create services): https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip

    - Visual Studio 2017 Redistributable for InstantClient 19c or higher

    - Visual Studio 2013 Redistributable for InstantClient version below 19c

https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads


    II.f    Installation NOMASX-1


Uncompress the provided archive nomasx1_<version>.zip in the directory <NOMASX1_HOME>. The resulting tree structure should be as follows:

----  <NOMASX1_HOME>

    ----- nodejs

    ----- instantclient

    ----- java

    ----- nomasx1w-agent

    ----- nomasx1w-backend

    ----- nomasx1w-frontend

    ----- agent.properties

    ----- nomasx1.ini


All prerequisites for installation are complete. You can proceed to the configuration step.


III. Settings


    III.a    Config files

    

        III.a.i    nomasx1.ini


The configuration file will have to be modified twice. At this stage to be able to start all the utilities allowing to carry out the complete setup and then at the end to save the encrypted password.

An example file is available on this page.


       III.a.ii    agent.properties


The configuration file is used by the Talend scripts to feed the application data. A sample file is available on this page. The password must be entered at the last step after the encryption of the password.


    III.b    Rundeck & Tomcat


Rundeck is an open source product used for job scheduling. It also allows the initial configuration of the NOMASX1 application, namely :

    - Encryption of passwords

    - Services installation (Windows and Linux)


        III.b.i  Tomcat setup


By default the TOMCAT listening port has been set to port 3001. It is possible to modify it by following the procedure below:


Open the following configuration file:

<NOMASX1_HOME>/nomasx1w-agent/rundeck/tomcat/conf/server.xml


Modify the following lines with the desired ports

   <Connector port="3001" protocol="HTTP/1.1"

               connectionTimeout="20000"

               redirectPort="8443" />


        III.b.ii     Rundeck setup

 

To perform the Rundeck configuration, a first startup is required to deploy the application in a Tomcat container.


Position yourself in the <NOMASX1_HOME> directory.


Execute the command 

node nomasx1w-agent/nomasx1-agent.js


Check the startup by consulting the tomcat.log file located in the <NOMASX1_HOME/nomasx1w-agent/tomcat.log directory. The following line indicates the start of the application :

[2020-02-27 08:56:52.109]  INFO BootStrap --- [ost-startStop-1] Rundeck startup finished in 611ms


Stop the execution of the agent via CTRL-C in order to correctly configure the Rundeck application (server name, listening port).

Two files need to be modified :

    - <NOMASX1_HOME>/nomasx1w-agent/rundeck/base/etc/framework.properties

Modifier les lignes suivantes avec le nom du serveur et le port d'écoute :

framework.server.name = localhost

framework.server.hostname = localhost

framework.server.port = 3001

framework.server.url = http://localhost:3001/rundeck


    - <NOMASX1_HOME>/nomasx1w-agent/rundeck/base/server/config/rundeck-config.properties

grails.serverURL=http://localhost:3001/rundeck

server.contextPath=/rundeck


Restart the agent to finalize the installation and configuration.

node nomasx1w-agent/nomasx1-agent.js


    III.c    Completion of the installation

 

Open a web browser and go to the following URL (replace localhost by the name of your server defined in the previous step)

http://localhost:3001/rundeck/

The default user and password is admin / admin. The password can be changed later.


Create a new project



Import script templates. The template file is available on this page. Select the file then click on "Import" at the bottom of the page.



Once the import is complete, the following jobs will be available in the Rundeck administration interface



        III.c.i    Encryption of the password for the agent


Depending on the architecture, execute the appropriate script: 01_ENCRYPT_PASSWORD_AGENT

Click on the arrow, enter the database user's password and click on "Run Job Now".



At the end of the execution, copy and paste the password displayed on the screen as below and enter it in the configuration file <NOMASX1_HOME>/agent.properties



   III.c.ii    Encryption of the password for the backend


Depending on the architecture, execute the appropriate script: 01_ENCRYPT_PASSWORD_BACKEND

Click on the arrow, enter the database user's password and click on "Run Job Now".


At the end of the execution, copy and paste the password displayed on the screen as below and enter it in the configuration file <NOMASX1_HOME>/nomasx1.ini



   III.c.iii    Creation of services


Depending on the platform type, execute the appropriate script: 03_CREATE_SERVICES.

For linux, you must specify the user who will execute the services.


   III.c.iv    Modifying the 00_J_AGENT script (Windows only)


For reasons related to Windows environment variables, the script must be modified to replace each of the variables named $VARIABLE by %VARIABLE%.


Click on the script, in "Action" click on "Edit this Job".


Go to the "Workflow" tab and click on the command. Modify each environment variable and save



The installation is complete. You will be able to stop the agent and restart using the services.