SAP Start/Stop Automation using Azure Center for SAP Solutions
Introduction
Last month at the SAP Sapphire 2023 event, we announced the General Availability of Azure Center for SAP Solutions (ACSS). ACSS enables you to create a logical representation of your SAP system on Azure referred to as Virtual Instance for SAP solutions (VIS). This in turn makes several SAP management tasks like start/stop, cost management, monitoring, configuration checks etc. possible at the SAP SID level rather than at the Virtual Machine level. In this blog we will look at how ACSS simplifies the SAP System Start/Stop automation process.
SAP Start/Stop Automation - Use cases
Before we get into the details of the solution, a quick recap of the most common scenarios where SAP Stop/Start automation can come in handy:
Existing Solution
Currently SAP Start/Stop automation on Azure can be achieved by making use of the SAPAzurePowerShellModule published by my colleagues Goran Condric and Martin Pankraz. Details of this PS module along with an accompanying PowerApp can be referenced here
Using ACSS for SAP Start/Stop Automation
When you register your SAP systems with ACSS (or deploy them with ACSS) you can execute Start/Stop commands for the individual components of the SAP instance like DB, central services, app servers or the whole SAP application at the SAP SID level. This can be done from the Azure portal or can be done at scale, in an automated manner using the Az.Workloads PS module or the az workloads Azure CLI extension.
One of the key benefits of using this approach is that you can now use tagging at the SAP SID (Virtual Instance) level to determine which SAP systems needs to be stopped/started instead of adding tags at the VM level, which can be cumbersome for a large number of SAP systems, each running on multiple VMs.
High-level steps to achieve this are:
Sample Implementation
In this GitHub repo karthikvenkat17/SAPStopStartACSS (github.com) , we have 4 sample runbooks which demonstrates this process
Stop-SAPSystemUsingACSS.ps1, Start-SAPSystemUsingACSS.ps1 - These 2 runbooks can be used for Stopping/Starting individual SAP Virtual instances. Note that the currently Start/Stop operation for database instance is supported for HANA database only. So, in the PS runbooks we check the type of database and if its non-HANA exit the process. You could add the steps required for Start/Stop of the non-HANA database of your choice, using the Invoke-AzVMRunCommand option.
Start-SAPSystemByTag.ps1, Stop-SAPSystemByTag.ps1 - These 2 runbooks are used to Start/Stop all SAP systems in a particular subscription based on a specific tag name and value. The runbooks identify the SAP systems to be Started/Stopped using the specified tag and schedule child jobs of Stop-SAPSystemUsingACSS.ps1 or Start-SAPSystemUsingACSS.ps1 for each SAP system in parallel. We then wait for all the jobs to complete and output the final status of the SAP systems. This modular approach is useful if you have a large number of SAP systems which you want to Start/Stop for cost savings regularly during certain time windows.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.