New Year , New Blog Postย ย ๐
Inย Part 1ย Use case was โย how to catch application crashes in SAP BTP by utilizing Alert Notificationโ . The idea ofย Part 2ย isย to โReact Proactively & automatically remediate application instance crashes by using out-of-the-boxย integrationย of a state-of-the-art DevOps tools, such asย SAP Automation Pilotย ,ย ย SAP BTP Alert Notification
As you know , the primary goal ofย SAP Automation Pilotย is toย simplify and automate complex manual processesย ,ย automateย multipleย DevOps tasksย in order to minimize the cloud operational effort behind any cloud solution in theย SAP Business Technology Platform
Use-case 1 : Simple Scenario
In this blog post , we would like to illustrate Auto remediation With simple use case
โAuto Start Application instance when Application Crashed/Stoppedโ
Configurations inย SAP Automation Pilot
ย Step1 ) Create Service Accountย withย Executeย privileges.This Technical Service Account you will use in Alert Notification service. As of now Service Account Supports two types of Authentication
Referenceย :ย Service Account in SAP Automation Pilot
ย Step2 )ย Build Trigger URL
- Go to theย Executionsย section in the Automation Pilotโs UI and choose theย Build Event Trigger
- Chooseย Alertย Notificationsย a trigger type.
- Select your desiredย commandย by specifying the catalog, command and version fields.
- For Restarting and re-staging applications: You have below commands
RestartCfApp, RestageCfApp, StartCfApp, StopCfApp TriggerStartCfApp,TriggerStopCfAppโ
4. After all fields are set in the desired way, you can scroll back to the top and copy the automatically generated URL (To any notepad).
Configurations in Alert Notification
Letโs start by creating a SAP Automation Pilot action for the Alert Notification.
- Navigate to Alert Notificationโs service instance UI in your Cloud Cockpit, tabย Actions, click theย Create.
- Choose SAP Automation Pilot action type.
3. In the displayed form, enter the name of the target table in Automation Pilot.
4. You can now paste URL you copied from theย Automation Pilotย in additionalย URLย property field, then enter Automation Pilotย service accountย user name and password for authentication.
ย
Here I would like to share oneย good newsย for you thatย ,ย It is possible to share an instance of theย ย ย Automationย URL between different sub-accounts or different spaces.
Use-case 2 : Complex Scenario
Sometimes your BTP Cloud app deployment Fails , If your app is too large, or you have exceeded your organisations memory limit,ย You are unable to run an application.
Common reasons deploying an app fails include:
- There is no organization memory and route quota assigned to the specific organization in the BTP Cloud Foundry environment.
- You always has to make sure your org and space have enough resources for all instances of your app.
- You cannot use more resources in a space than is allocated for your org.
-
The memory available for the whole subaccount is shown in the brackets of โMemory Quotaโ called โavailable memoryโ
Manual Processย
Configurations in Alert Notification
For example, If you would like to Notify Quota issues on BTP in case if BTP Organisation memory usage is over 75%ย then you can configureย Subscription โMonitor Quota Usage on BTP Alert Notification Serviceโ
Reference :ย Resource Quota Utilizationย
Then BTP Alert Notification service will trigger an event if Org memory usage is over 75%
Configurations inย SAP Automation Pilot
BTP Automationย ย providedย commands are generic โ they do exactly one thing (restart your app, start your app, create a jira ticket, etcโฆ). If you have a more complex scenarios which includes multiple steps โ you need to create a custom command.
Here custom command can be usedย along withย providedย commands .For example you can create a new command that used StartCfApp and then CreateJiraIssue.
Create Action of Type Automation Pilot integrate with servicenow (referย Blog Post) or create IT Support Ticket/JIRA using API Integration in Automation Pilot
In this way you can build Own Custom commands.
Thank you for reading this blog post.ย If you find this material useful, please leave your feedback in the comments section below.
Please feel free to add your questions ,if youย need any further information or in case you face the issue/problem
Alsoย โLikeโย ,โShareโย ,ย โFollowโ meย to get new updates.
Happy DevOpsย ย ๐ย !