| Bookmark Name | Actions |
|---|
Deploying Savings Pot Microservice on Azure
This section explains how to deploy the Savings Pot microservice on the Azure cloud. To do so, you need to perform the following tasks:
Deployment Artefacts
Savings Pot Microservices for Azure deployment is available as a single release bundle. For example, ms-savingspot-package-azure-<release_number>.zip.
The bundle consists of the following files:
ms-savingspot-package-azure-<release_number>.jarfile and installation related files.- The
install.sh/install.batscript used to deploy the Savings Pot microservice in the Standalone Mode. - The
destroy.sh/destroy.batscript to undeploy and remove the Azure services created in Azure environment.
Folder structure for the ms-savingspot-package-azure-<release_number>.zip.
Pom-azure-deploy.xml file is used to deploy the azure function into the azure portal.
Deploying Savings Pot Microservice on Azure
Prerequisite
Before deploying microservice, ensure you have the following:
- Install the Azure Command Line Interface. For more information about the installation, click Azure CLI.
- Maven must be installed prior to the deployment and an active connection string of Mongo Atlas cluster is required.NOTE:
- Mongo Atlas Connection string should be obtained for Java driver version 3.4.
- Download the Mongo Shell from Mongo Atlas under the tab named Connect with Mongo Shell by clicking Connect.
- Add the shell bin path to your system path and restart the system, if required. For example, C:\MSDownloads\mongodb-win32-x86_64-windows-4.4.0\bin.
To deploy Savings pot microservice, follow these steps:
- Obtain the generated zip file (from target folder) in the installation directory and unzip it.
- In command prompt, navigate to the installation directory.
- Modify the Resource Group, Location in the
install.sh/install.batscript specific to the installation. - Similarly, modify the following parameters in the install.sh/install.bat and destroy.sh/destroy.bat accordingly:
- MONGODB_CONNECTIONSTR
- MONGOSHELL_CONNECTIONSTR
- MONGODB_DBNAME
- The default Azure function app name in the script can be changed. In the case of app name changes, the folder available (
ms-savingspot-azure\target\azure-functions\<app folder>\) in the name of the app should also be renamed. - Execute
install.shorinstall.bat. - After the deployment is completed, the Azure functions are created.
- Sign in to Azure portal and check whether the Resource Group and Function app is created.
- The API key for each endpoint in the function app can be obtained using the command,
func azure functionapp list-functions <function-app-name> --show-keys. Alternatively, it can be obtained from the Azure function GUI. - The endpoints of the azure function app can be obtained from the Azure Function App. Below is the URL of sample function app.
The Get Function URL will provide the complete URL with API key.
Undeployment
To undeploy the Savings Pot microservice from Azure, follow these steps.
- Modify the parameter named MONGOSHELL_CONNECTIONSTR in the destroy.sh/destroy.bat file as indicated earlier in the deployment steps.
- Execute the destroy.sh/destroy.bat file.
NOTE: The database user credentials must have the admin access.
Add Bookmark
save your best linksView Bookmarks
Visit your best linksIn this topic
Are you sure you want to log-off?