New Year , New Blog Postย ย ๐ŸŽ‰

๐ฟ๐‘’๐“‰โ€™๐“ˆ ๐“Œ๐‘’๐“๐’ธ๐‘œ๐“‚๐‘’ ๐“‰๐’ฝ๐’พ๐“ˆย n๐‘’๐“Œย c๐’ถ๐“๐‘’๐“ƒ๐’น๐’ถ๐“‡ย y๐‘’๐’ถ๐“‡ ๐Ÿค๐Ÿข๐Ÿค๐Ÿฅย w๐’พ๐“‰๐’ฝ ๐‘”๐“‡๐‘’๐’ถ๐“‰ ๐‘’๐“ƒ๐“‰๐’ฝ๐“Š๐“ˆ๐’พ๐’ถ๐“ˆ๐“‚ย andย ๐“ƒ๐‘’๐“Œ ๐‘’๐“ƒ๐‘’๐“‡๐‘”๐’พ๐‘’๐“ˆ, accompanied byย ๐“‰๐’ฝ๐‘’ย ๐“Œ๐’ถ๐“‡๐“‚๐‘’๐“ˆ๐“‰ ๐’ถ๐“ˆ๐“…๐’พ๐“‡๐’ถ๐“‰๐’พ๐‘œ๐“ƒ๐“ˆ. ๐‘€๐’ถ๐“Ž ๐“‰๐’ฝ๐’พ๐“ˆ ๐“Ž๐‘’๐’ถ๐“‡ ๐’ท๐“‡๐’พ๐“ƒ๐‘” ๐“ƒ๐‘’๐“Œ ๐’ฝ๐’ถ๐“…๐“…๐’พ๐“ƒ๐‘’๐“ˆ๐“ˆ, ๐“ƒ๐‘’๐“Œ ๐‘”๐‘œ๐’ถ๐“๐“ˆ, ๐“ƒ๐‘’๐“Œ ๐’ถ๐’ธ๐’ฝ๐’พ๐‘’๐“‹๐‘’๐“‚๐‘’๐“ƒ๐“‰๐“ˆ, ๐“๐‘œ๐“‰๐“ˆ ๐‘œ๐’ป ๐‘’๐“๐’ธ๐’พ๐“‰๐’พ๐“ƒ๐‘” ๐‘œ๐“…๐“…๐‘œ๐“‡๐“‰๐“Š๐“ƒ๐’พ๐“‰๐’พ๐‘’๐“ˆ ๐’ถ๐“ƒ๐’น ๐“‚๐’ถ๐“ƒ๐“Ž ๐“ƒ๐‘’๐“Œ ๐’พ๐“ƒ๐“ˆ๐“…๐’พ๐“‡๐’ถ๐“‰๐’พ๐‘œ๐“ƒ๐“ˆ ๐“‰๐‘œ ๐“Ž๐‘œ๐“Š๐“‡ ๐“๐’พ๐’ป๐‘’. Letโ€™s all ๐‘’๐“๐“…๐‘’๐“‡๐’พ๐‘’๐“ƒ๐’ธ๐‘’ ๐“ƒ๐‘’๐“Œ ๐“‰๐’ฝ๐’พ๐“ƒ๐‘”๐“ˆ ๐’ถ๐“ƒ๐’น ๐“๐‘’๐’ถ๐“‡๐“ƒ ๐“ƒ๐‘’๐“Œ ๐“‰๐’ฝ๐’พ๐“ƒ๐‘”๐“ˆย in ๐“‰๐’ฝ๐’พ๐“ˆ ๐“ƒ๐‘’๐“Œ ๐“Ž๐‘’๐’ถ๐“‡ย ๐Ÿซย ๐Ÿฌ๐Ÿฆ

 

This blog post is part ofย a series of blog postsย related to SAP BTP ย Alert Notification service.
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

  1. Basic Authentication
  2. SAP Cloud PKI Client Certificate

Referenceย :ย Service Account in SAP Automation Pilot

 

ย Step2 )ย Build Trigger URL

  1. Go to theย Executionsย section in the Automation Pilotโ€™s UI and choose theย Build Event Trigger
  2. Chooseย Alertย Notificationsย a trigger type.
  3. 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.

    1. Navigate to Alert Notificationโ€™s service instance UI in your Cloud Cockpit, tabย Actions, click theย Create.
    2. 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โ€œ

    ย  ย As perย Noteย ,In BTP global accounts that use the consumption-based commercial model, SAP BTP, Cloud Foundry Runtime is not listed in the Entitlements pages in the SAP BTP cockpit. Aย quota limit of 50 GB of Cloud Foundry Runtime memory is assigned by default to everyย subaccount.If you need to increase this limit, report an incident to SAP supportInformationย published on SAP site on the BC-NEO-CIS component.This also applies to other services that have a technical quota limit.

    Manual Processย 

    Genrally this kind of activities take taken care by Cloud administrators or Operation Team
    Global Account administrators assign Cloud Foundry Runtime quota to the subaccounts using the โ€œEntitlementsโ€ page in the BTP Cockpit, on Global Account level. Optionally, the Org Manager can create quota plan inside the organization and assign it to Spaces, or let the spaces consume the whole quota of the organization. For details, seeย Managing Entitlements and Quotas Using the Cockpit.
    You can automate this Cloud Quota Management Workflow process using SAP BTP DevOps tools, such asย SAP Automation Pilotย ย  ,ย SAP BTP Alert Notificationย 

    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ย ย ๐Ÿ™‚ย !

    Sara Sampaio

    Sara Sampaio

    Author Since: March 10, 2022

    0 0 votes
    Article Rating
    Subscribe
    Notify of
    0 Comments
    Inline Feedbacks
    View all comments
    0
    Would love your thoughts, please comment.x
    ()
    x