Installing Due Diligence Microservices in Azure

This section helps you to install the Due Diligence Microservice into Azure cloud.

NOTE: Ensure to install Azure CLI (See CLI Setup), Mongo shell and Maven prior to the deployment and an active connection string of Mongo Atlas cluster (See Get Started with Atlas).
  • Obtain the MONGODB_CONNECT_STR string for Java driver version 3.4.
  • Download the mongo shell from the Mongo Atlas under the connect with mongo shell tab by clicking the connect button.
  • Obtain the MONGOSHELL_CONNECT_STR string under the connect with MongoDB Compass tab by clicking the connect button.

Procedure:

  1. Download the zip file.
  2. Extract the zip file.
  3. In command prompt, navigate to the installation directory and modify the details such as resource group, location, MONGODB_CONNECT_STR, MONGOSHELL_CONNECT_STR, etc., in the install.sh or install.bat script specific to the installation.
    SET MONGODB_CONNECT_STR="mongodb://Temenos:Temenos123@cluster0-shard-00-02.4o1ua.azure.mongodb.net:27017,cluster0-shard-00-00.4o1ua.azure.mongodb.net:27017,cluster0-shard-00-01.4o1ua.azure.mongodb.net:27017/ms_duediligence?authSource=admin&gssapiServiceName=mongodb&replicaSet=atlas-vj913p-shard-0&ssl=true"
    SET MONGOSHELL_CONNECT_STR="mongodb+srv://Temenos:Temenos123@cluster0.4o1ua.azure.mongodb.net"
    
  4. Insert the default mongo.js file (Master Data) into the MongoDB through install.bat/install.sh file. Perform the following steps to insert data other than master data:
    • Pre-requisite data can be loaded into Mongo DB through install-db-scripts.bat/.sh script file.
    • Data can be loaded only through script files(.js).
    • All the files need to be placed under the ms-duediligence-azure\target\azure-functions\<app folder> path.
    • Below are the parameters need to send while executing the bat file.

      uri

      Need to provide Mongo string URL with username & password mentioned in the pre-requisite section

      app_name

      Need to provide the app name which mentioned while deploying azure

      scripts

      Need to provide the files names delimited by comma.

    • Execute the following command:
      • For .bat file
        install-db-scripts.bat --uri <uri> --app_name <app_name> --scripts "<filename1>,<filename2>"
        EXAMPLE:
        install-db-scripts.bat --uri --mongodb+srv://test:test@cluster0.4o1ua.azure.mongodb.net --app_name duediligenceapp --scripts "mongo1.js,mongo2.js"
      • For .sh file
        install-db-scripts.sh --uri <uri> --app_name <app_name> --scripts "<filename1>,<filename2>"
        EXAMPLE:
        install-db-scripts.sh --uri mongodb+srv://test:test@cluster0.4o1ua.azure.mongodb.net  --app_name duediligenceapp  --scripts mongo1.js,mongo2.js
  5. You can change the default Azure function app name in the script. In case of app name changes, the folder available (ms-duediligence-azure\target\azure-functions\<app folder>\) in the name of the app should also be renamed.
  6. Perform the JWT Authorization setup in the installation scripts to enable the in-house authentication in addition to API key.
  7. Execute install.sh or install.bat to deploy all the necessary components for a microservice including streaming services will be deployed to run the microservice independently.

    Once the installation is done, the functions are created in Azure.

  8. Log in to Azure portal and check if the following have been created.
    • Resource Group

    • Function App

    • Due Diligence Functions

      You can retrieve the API key for each endpoint in the function app using the command below.

      func azure functionapp list-functions <function-app-name> --show-keys

      You can also retrieve the API key using the Azure function GUI as shown below.

      You can retrieve the endpoints of the azure function app from the Azure Function App. Below is the URL of sample function app.

      The Get Function URL provides the complete URL with API key.

      After the successful deployment database, collections and the reference data(master data) are loaded into the mongo server database for Due Diligence microservice.

Copyright © 2020- Temenos Headquarters SA

Published on :
Tuesday, October 5, 2021 11:12:37 AM IST

Feedback
x