Installing Aggregation Microservice in Azure

This section helps you to install the Aggregation Microservice in Azure.

Procedure:

Follow the below steps to install the Account Aggregation microservice into Azure:

  1. Copy the generated.zip file (from the target folder) in the installation directory
  2. Extract the zip file.
  3. Navigate to the installation directory in command prompt.
  4. Modify the resourcegroup, location,database details and so on in the install.sh or install.bat script specific to the installation.
  5. Execute the install.sh or the install.bat.
  6. Once the installation is done the functions are created in Azure.
  7. Login to Azure portal and check that the resourcegroup and functionsapps are created.

The master key token can also be retrieved from Azure portal, navigating as highlighted:

The masterKeyToken value can be used to Invoke Azure API functions from API Client with code(query param) or x-functions-key(header).

The command to be added in Azure Install.bat file

Env variables to be set :
RESOURCE_GROUP_NAME
APP_NAME
subscriptionid rem command to get the subscription Id  call az account list | python -c "import json,sys;obj=json.load(sys.stdin); print(obj[0]['id'])" >> out.txt SET /p subscriptionid=< out.txt
masterKeyToken rem command to get the master API token. call az rest --method post --uri "/subscriptions/%subscriptionid%/resourceGroups/%RESOURCE_GROUP_NAME%/providers/Microsoft.Web/sites/%APP_NAME%/host/default/listKeys?api-version=2018-11-01" | python -c "import json,sys;obj=json.load(sys.stdin); print(obj['masterKey'])" >> out.txt SET /p masterKeyToken=< out.txt

The query parameter code as key and masterKeyToken fetched as value can be used to invoke the azure functions or the Header x-functions-key as key and masterKeyToken fetched as value can be used to invoke the azure functions.

 

 

Copyright © 2020- Temenos Headquarters SA

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

Feedback
x