Technical Articles
[ BTP DevOps ] : Auto remediation with SAP Alert Notification service and Automation Pilot – Part2
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Β π !