Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
HongzhuQiao
Explorer
0 Kudos
2,294

Gartner predicts Cloud Will Become a Business Necessity by 2028. Migrating SAP to cloud is a strategic decision for many organizations.

AWS, a pioneer in cloud solutions, has consistently innovated new services and tools, such as the prescriptive Cloud Migration Framework, Migration Hub, and Launch Wizard. Most recently, AWS introduced a new tool: AWS Systems Manager for SAP (ssm-sap). This tool offers many features that organizations have been anticipating, including:

  • Registering and discovering SAP applications
  • Listing discovered SAP applications
  • Listing configurations of discovered SAP applications
  • Integration with AWS Backup

In this article, we will introduce the basics of ssm-sap and explore how to use it to:

  • Discover SAP systems
  • Monitor SAP systems
  • Perform basic operations such as starting and stopping SAP systems

Natively, ssm-sap is CLI-based. To visualize the operations in real time, we will use powerful web based visualization tool: Streamlit. In a sequel to this blog, we plan to provide all the codes used, and discuss more advanced topics such as performing system refreshes and auto-scaling.

Here we will explore the integration of AWS Systems Manager for SAP (SSM-SAP) with Streamlit to create a robust and user-friendly solution for managing SAP systems. By leveraging SSM-SAP's capabilities for discovery, automation, and monitoring, combined with Streamlit's interactive web application framework, we propose a solution that automates key tasks such as system discovery, visualization of system health, and execution of essential operations like starting and stopping SAP instances.

The proposed solution offers significant benefits, including:

* Simplified System Management: Streamlined processes for discovering and managing SAP systems.

* Enhanced Visibility: Real-time monitoring of system health.

* Automated Operations: Automated execution of common tasks, reducing manual effort and potential errors.

* User-Friendly Interface: An intuitive web interface for easy interaction and control.

By combining the power of SSM-SAP and Streamlit, we aim to empower SAP administrators to efficiently manage their SAP environments and improve overall system reliability.

I. Introduction to ssm-sap

AWS Systems Manager for SAP (ssm-sap) is a welcome addition to SAP management after Launch Wizard for SAP and AWS backup for HANA. It also integrates well with the other SAP facilities. If we provision SAP systems via Launch Wizard, ssm-sap registration and AWS backup are automatically configured during the process, as seen here from Launch Wizard screen.

HongzhuQiao_0-1735516118986.png

In case that SAP servers are provisioned elsewhere, it is possible to register manually. Please refer to

We can use ssm-sap to discover all the SAP applications, databases and their components, e.g.,

aws ssm-sap list-applications
{
"Applications": [
{
"Id": "LaunchWizardnewhana2_HANA",
"DiscoveryStatus": "SUCCESS",
"Type": "HANA",
"Arn": "arn:aws:ssm-sap:us-east-1:123456789012:HANA/LaunchWizardnewhana2_HANA",
"Tags": {}
},
{
"Id": "LaunchWizardnewnw1_ABAP",
"DiscoveryStatus": "SUCCESS",
"Type": "SAP_ABAP",
"Arn": "arn:aws:ssm-sap:us-east-1:123456789012:SAP_ABAP/LaunchWizardnewnw1_ABAP",
"Tags": {}
},
{
"Id": "LaunchWizardnewnw1_HANA",
"DiscoveryStatus": "SUCCESS",
"Type": "HANA",
"Arn": "arn:aws:ssm-sap:us-east-1:123456789012:HANA/LaunchWizardnewnw1_HANA",
"Tags": {}
}
]
}

aws ssm-sap list-components --application-id LaunchWizardnewnw1_ABAP 
{
"Components": [
{
"ApplicationId": "LaunchWizardnewnw1_ABAP",
"ComponentId": "ECD-D12-newnw2",
"ComponentType": "DIALOG",
"Tags": {},
"Arn": "arn:aws:ssm-sap:us-east-1:123456789012:SAP_ABAP/LaunchWizardnewnw1_ABAP/COMPONENT/ECD-D12-newnw2"
},
{
"ApplicationId": "LaunchWizardnewnw1_ABAP",
"ComponentId": "ECD-ASCS10-newnw2",
"ComponentType": "ASCS",
"Tags": {},
"Arn": "arn:aws:ssm-sap:us-east-1:123456789012:SAP_ABAP/LaunchWizardnewnw1_ABAP/COMPONENT/ECD-ASCS10-newnw2"
},
{
"ApplicationId": "LaunchWizardnewnw1_ABAP",
"ComponentId": "ECD-ABAP",
"ComponentType": "ABAP",
"Tags": {},
"Arn": "arn:aws:ssm-sap:us-east-1:123456789012:SAP_ABAP/LaunchWizardnewnw1_ABAP/COMPONENT/ECD-ABAP"
}
]
}

aws ssm-sap list-databases
{
"Databases": [
{
"ApplicationId": "LaunchWizardnewhana2_HANA",
"ComponentId": "HDB-HDB00",
"DatabaseId": "HDB",
"DatabaseType": "TENANT",
"Arn": "arn:aws:ssm-sap:us-east-1:123456789012:HANA/LaunchWizardnewhana2_HANA/DB/HDB",
"Tags": {}
},
{
"ApplicationId": "LaunchWizardnewhana2_HANA",
"ComponentId": "HDB-HDB00",
"DatabaseId": "SYSTEMDB",
"DatabaseType": "SYSTEM",
"Arn": "arn:aws:ssm-sap:us-east-1:123456789012:HANA/LaunchWizardnewhana2_HANA/DB/SYSTEMDB",
"Tags": {}
},
{
"ApplicationId": "LaunchWizardnewnw1_HANA",
"ComponentId": "HDV-HDB00",
"DatabaseId": "HDV",
"DatabaseType": "TENANT",
"Arn": "arn:aws:ssm-sap:us-east-1:123456789012:HANA/LaunchWizardnewnw1_HANA/DB/HDV",
"Tags": {}
},
{
"ApplicationId": "LaunchWizardnewnw1_HANA",
"ComponentId": "HDV-HDB00",
"DatabaseId": "SYSTEMDB",
"DatabaseType": "SYSTEM",
"Arn": "arn:aws:ssm-sap:us-east-1:123456789012:HANA/LaunchWizardnewnw1_HANA/DB/SYSTEMDB",
"Tags": {}
}
]
}

For each component of applications and each database, we may find their running status by get-component or get-database.

Hint: attach help at end of command to get a guide online in awscli.

  aws ssm-sap get-component help

  aws ssm-sap get-database help

Here is a list of all possible statuses:

The status of the component.

  • ACTIVATED - this status has been deprecated.
  • STARTING - the component is in the process of being started.
  • STOPPED - the component is not running.
  • STOPPING - the component is in the process of being stopped.
  • RUNNING - the component is running.
  • RUNNING_WITH_ERROR - one or more child component(s) of the parent component is not running.
  • UNDEFINED - AWS Systems Manager for SAP cannot provide the component status based on the discovered information. Verify your SAP application.

Through ssm-sap, starting and stopping SAP become as easy as:

  aws ssm-sap start-application ...

  aws ssm-sap stop-application ...

As seen, ssm-sap does provide comprehensive tools to discover, monitor and operate SAP systems. Nevertheless, when there are tens or hundreds of systems, it could become a daunting task to manage and monitor all by command lines. That is where visualization tool streamlit comes to the rescue.

II. Introduction to streamlit

Streamlit is an open-source Python library that makes it easy to create and share amazing custom web apps for machine learning and data science. In just a few minutes, you can build and deploy powerful data-driven applications. Streamlit is designed to be simple and intuitive, allowing users to transform data scripts into interactive web applications without requiring extensive web development knowledge.

Key Features,

  1. Ease of Use: Streamlit allows you to create web apps with pure Python. No need for HTML, CSS, or JavaScript.
  2. Interactive Widgets: Add interactive widgets like sliders, buttons, and text inputs with minimal code.
  3. Real-Time Updates: Streamlit apps update in real-time as users interact with widgets, providing immediate feedback.
  4. Data Visualization: Integrate with popular data visualization libraries like Matplotlib, Plotly, and Altair.
  5. Deployment: Easily deploy your Streamlit apps to the web using Streamlit Sharing, Docker, or cloud services like AWS.

Please check https://docs.streamlit.io/get-started to start with streamlit.

Here is a simple example with intro.py,

 

 
import streamlit as st
import numpy as np
import pandas as pd

chart_data = pd.DataFrame(
     np.random.randn(20, 3),
     columns=['a', 'b', 'c'])

st.line_chart(chart_data)
 

Once kicking off "streamlit run intro.py", we have this chart,

HongzhuQiao_0-1735561652019.png

 

There is a whole gallery of streamlit applications in :  https://streamlit.io/gallery

III. Use streamlit to monitor and perform operations

By utilizing Streamlit, you can build an intuitive and interactive dashboard to monitor and operate SAP systems. This dashboard can call ssm-sap to perform various management tasks, providing a seamless and user-friendly interface for SAP administrators.

Initially all applications are in stopped states:

HongzhuQiao_0-1735558112517.png

We click button Start All 

HongzhuQiao_0-1735562226964.png

 

In a few minutes, we will see HANA starts first.

HongzhuQiao_2-1735558362756.png

Finally, all starts.

HongzhuQiao_3-1735558445521.png

Summary:

By combining AWS Systems Manager (SSM) with Streamlit, one can create a powerful, cost-effective solution for monitoring and managing SAP environments. This setup leverages AWS’s robust management capabilities and Streamlit’s flexible visualization tools to provide a comprehensive solution that can save time and reduce costs associated with SAP system maintenance (patching and upgrade etc) and operations.

 

1 Comment
HongzhuQiao
Explorer
0 Kudos

There is a diagram to add to the blog. Hopefully it helps to understand the workflow. 

HongzhuQiao_0-1735605771042.png