Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member197689
Active Participant
In this blog, I’ll introduce you to the growing list of services that can help you implement DevOps capabilities on SAP Cloud Platform.  I will explain how you can use these services by deploying a Java app, because many of the current capabilities are focused on supporting Java -- but have no fear, there is support for other application types coming soon.

So that we are all on the same page, by DevOps we mean a combination of development and operations capabilities, operating together with common goals and objectives that facilitate the adoption of Continuous Integration (CI) and Continuous Delivery (CD) development practices, with emphasis on continuous process improvement.  This means there are many components (tools, services, features and more) that work together to fully satisfy the DevOps cycle.

A typical development cycle includes planning, coding, building, and testing.  An operation cycle involves releasing, deployment automation, ensuring services are operational and monitoring the code and systems.

Below is a quick snapshot of services available in DevOps category on SAP Cloud Platform in the Neo environment.  A quick word of caution! The Development & Operations Service available on SAP Cloud Platform is not included in the DevOps category but it’s one of the Mobile Services.



Figure 1 Services available in DevOps category

Development


Let’s first look at the development-related services on SAP Cloud Platform.



Existing users of the platform will be familiar with the full featured Web-based integrated development environment called SAP Web IDE that simplifies end-to-end application development.

Some of the main use cases are to extend SAP UI5 and Fiori apps in order to:

  • Consume existing cloud or on-premise OData services such as IoT services or SuccessFactors in the cloud, or SAP Core or S/4 HANA services on-premise

  • Deploy apps to SAP Cloud Platform or to an on-premise SAPUI5 ABAP repository

  • Easily build into hybrid mobile applications for mobile devices


The full-stack version of SAP Web IDE supports Java in the Cloud Foundry environment.  With Cloud Foundry, you can build next-generation applications using, for example, machine learning or blockchain services.

For client-side tools, Eclipse is one of the most popular IDEs when it comes to Java programming.  In our example, I deploy a Java application using Eclipse.  Before deploying the Web application to SAP Cloud Platform, follow the Configuring Eclipse tutorial to prepare your development environment.



Git is a widely used open source code management system for software development, and it is built into the SAP Cloud Platform account.  The Git service in SAP Cloud Platform is very similar to other major source code systems out there.

Please keep in mind the following restrictions:

  • The size of an individual file cannot exceed 20 MB. Pushes of changes that contain a file larger than 20 MB are rejected.

  • The overall size of the bare repository stored in the Gitservice cannot exceed 500 MB.

  • The number of repositories per subaccount is not currently limited. However, SAP may take measures to protect the Gitservice against misuse.


You can use any standard compliant Git client to connect to the Git service. Many modern integrated development environments, including but not limited to Eclipse and the SAP Web IDE, provide tools for working with Git. There are also native clients available for many operating systems and platforms.

Follow a quick 5-minute Git tutorial to get your code into the SAP Cloud Platform Git service.

To try it out, instead of using a simple HelloWorld example, let’s select an existing app with a little more complexity so we can make better use of the DevOps services.  Head over to SAP Developer site and select “Create a web app in Java Using Eclipse” from SAP Tutorial repository.   (You can stead use your app of choice and follow this blog).  Also, you can follow the tutorial and deploy your own application via Eclipse.  Make sure your app is deployed and running in SAP Cloud Platform before we proceed to look at operations services

Operations


Now, let’s look at the operations-related services in SAP Cloud Platform.



After deploying the Web application to SAP Cloud Platform, you can check its behavior and state with the Java Debugging service.  You can debug your application locally or in the cloud as both provide the same functionality.  You set a breakpoint in the application and deploy the app to the cloud or locally.  Cloud deployment can be very useful to debug whether your scenario is broken because of network or authorization issues. The debugging only works when the application only has one process or node.



The SAP Java Profiler helps developers analyze resource-related problems in your Java applications regardless of whether the JVM is running locally or in the cloud.  Most developers will first profile their application locally and then preview the application in the cloud.  Before using the profiler, developers must use the SAP JVM.  You can download the SAP JVM here.



The Monitoring service is like a watchdog for the Java application.  You can view current and historical metrics, register availability and JMX checks.  This feature is incorporated in the cloud cockpit view of the application.



Figure 2 Java Application running in SAP Cloud Platform

What happens if you have multiple applications?  In this scenario, you can build a custom dashboard to view. The dashboard tutorial can help you build the application as the code is in Github. If you would like build your own dashboard, please follow the REST API documentation. The screenshot below is showing two Java applications from different data centers displaying different metrics.



Figure 3 Dashboard view



The Java Application Lifecycle Management Service lets you use a REST API to manage your Java application.  The features included are deploy, start, and edit the configuration of the app.  The usage is very similar to the Monitoring API.  Better yet, you can incorporate the Lifecycle Management API into the monitoring dashboard above.



The Multi-Target Application (MTA) is a package comprised of multiple application and resource modules, which have been created using different technologies and to deployed to different runtimes but have a common lifecycle.  This means you can package different runtimes such as SAP HANA, Fiori, or Java, to deploy to each landscape (DEV, QA, PROD) simultaneously.  One of the challenges for MTA is there is no export wizard yet for Neo.  On Neo, you must package the MTA package file manually and export the applications, destination, and other required files.

Using our sample app, I have packaged the files into MTA format.  The “dest1” folder contains the destination file in zip format.  The “javaapp” contains the Java application in .war format.

 Figure 4 MTA folder components

Inside the META-INF folder, there are two or more directories:

  • Manifest.mf: Displays the content type and the file name

  • The “yaml” file contains a list of all entities, such as modules, resources, and properties that belong to an application or are used by it at runtime, and the dependencies between them.




Figure 5 yaml file

Hope you enjoyed this short overview of SAP Cloud Platform DevOps related services and how you can use them in your application lifecycle management.