Microservices
Updated On 27 May 2024 | Min(s) read

Deploying Campaign Microserviceon Azure

This section explains how to deploy the Campaign Microservice on the Azure cloud. To do so, you need to perform the following tasks:

Deployment Artefacts

Pre-requisites

Before deploying Campaign Microservice on Azure ensure you have the following:

  • Install Maven.
  • Install Python.
  • An active connection of MySQL is required

For MySQL

The folder structure of the Campaign Microservice is available as a single release bundle. For example, ms-campaign-package-azure-<release_number>.zip.

This bundle contains the following files:

  • ms-campaign-package-azure-<release_number>.jar
  • Azure Script files:
    • install.sh/install.bat: This script is used to deploy the Campaign Microservice in the Azure environment.
    • destroy.sh/destroy.bat: This script is used to stop and delete the Azure services from the Azure environment.
    • Folder structure for the ms-campaign-package-azure-<release_number>.zip file is as follows.

  • The Pom-azure-deploy.xml file is used to deploy the Azure function into the Azure portal.

Installing Campaign Microservice on Azure

To deploy Campaign Microservice on Azure, follow these steps.

  1. Copy the generated zip file (from target folder) to the installation directory.
  2. Extract the zip file.
  3. In a command prompt, go to the installation directory and modify the details such as resource group, location, DB details, etc., in the install.sh/install.bat script specific to the installation.
  4. The default Azure function app name in the script can be changed. In case of app name changes, the folder available (ms-campaign-api\target\azure-functions\<app folder>\) in the name of the app must also be renamed.
  5. To enable the in-house authentication in addition to the API key, perform the JWT Authentication in the installation scripts.
  6. After this, execute either install.sh or install.bat.

    After successful installation, these Azure functions are created.

  7. To load the master data, retrieve the DDL scripts from the installation directory named \campaign-Azure\db\mysql\ddl_scripts.Connect to MySQL workbench and create a schema with the name campaign and run the script. If not found, retrieve the scripts from the AWS package.
  8. Sign in to the Azure portal and verify if the Resource Group and the Function App are created.
    • Function App

    • Campaign Functions

  9. Obtain the API key for each endpoint by using the func azure functionapp list-functions <function-app-name> --show-keys command. Alternatively, you can also obtain the API key from the Azure function GUI.

  10. Obtain the endpoints of the Azure Function App from the Azure Function App. The URL of the sample function app is as follows:

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

    Alternatively, the master key token can also be retrieved from the Apps Keys section of the Azure portal.

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

  11. After the successful deployment, database, collections, and reference data(master data) are loaded into the MySQL database for the Campaign microservice.

For MSSQL

The folder structure of the Campaign Microservice is available as a single release bundle. For example, ms-campaign-package-azure-<release_number>.zip.

This bundle contains the following files:

  • ms-campaign-package-azure-<release_number>.jar
  • Azure Script files:
    • install_mssql.sh/install_mssql.bat: This script is used to deploy the Campaign Microservice in the Azure environment.
    • destroy.sh/destroy.bat: This script is used to stop and delete the Azure services from the Azure environment.
    • Folder structure for the ms-campaign-package-azure-<release_number>.zip file is as follows.

  • The Pom-azure-deploy.xml file is used to deploy the Azure function into the Azure portal.

Installing Campaign Microservice on Azure

To deploy Campaign Microservice on Azure, follow these steps.

  1. Copy the generated zip file (from target folder) to the installation directory.
  2. Extract the zip file.
  3. In a command prompt, go to the installation directory and modify the details such as resource group, location, DB details, etc., in the install_mssql.sh/install_mssql.bat script specific to the installation.
  4. The default Azure function app name in the script can be changed. In case of app name changes, the folder available (ms-campaign-api\target\azure-functions\<app folder>\) in the name of the app must also be renamed.
  5. To enable the in-house authentication in addition to the API key, perform the JWT Authentication in the installation scripts.
  6. After this, execute either install_mssql.sh or install_mssql.bat.

    This creates Azure functions, and also loads master data after the installation.

  7. Sign in to the Azure portal and verify if the Resource Group and the Function App are created.
    • Function App

    • Campaign Functions

  8. Obtain the API key for each endpoint by using the func azure functionapp list-functions <function-app-name> --show-keys command. Alternatively, you can also obtain the API key from the Azure function GUI.

  9. Obtain the endpoints of the Azure Function App from the Azure Function App. The URL of the sample function app is as follows:

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

    Alternatively, the master key token can also be retrieved from the Apps Keys section of the Azure portal.

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

  10. After the successful deployment, database, collections, and reference data(master data) are loaded into the MSSQL server for the Campaign Microservice.

Copyright © 2020- Temenos Headquarters SA

Published on :
Tuesday, September 2, 2025 12:38:26 PM IST