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_member671115
Active Participant

Introduction


DevOps in different organisations is very different, but it is must in companies with focus on Cloud Native development.

Let's have a look on 4 most important KPI-s of DevOps :


  • Lead time




  • Deploy frequency




  • Time to restore



  • Change fail percentage


Additional info about this KPI-s you can find here.

Also, you can improve all of this KPI-s with help of SAP Data Intelligence, and let's have a look how ChatOps could bring additional value here.

ChatOps in practice


Let's pick only one KPI as example - I like Time to restore, do you?

So, imagine a process of loading some data. For simplicity - it is standard BW process-chain, but also external data from 3-d party financial provider. We can split this process on 2 parts :

  1. BW scheduling

  2. SAP Data Services (for data extraction, transformation and loading in BW)


So, if something goes wrong (for example new mapping, or bad case for processing data)  - that's all. Your reaction time could be not so good.

Ok, we have a case, how could we improve it? (propose your solution in comments please)

First of all we can prepare SAP Data Intelligence pipeline and manage BW process chain and SAP Data Services job from one place. If something goes wrong - we can send message to Administrators group in one of famous messenger (in my case it is telegram).

So, let's prepare this special operator (I hope you know how to prepare docker files, creating operators and working in SAP Data Intelligence) :

We need docker file:
FROM $com.sap.sles.base
RUN python3 -m pip install --no-cache-dir --user python-telegram-bot

After docker file is ready we need to create this operator:


input port - for message

out port - for local info in terminal

 

 

On configuration tab - we need 2 special parameters (unique identifier of bot API_KEY- you can request it from BotFather bot in telegram, and your group id)


group id you can find with simple request after you send message to your bot-
import requests
import json
res = requests.get(f'https://api.telegram.org/bot{config["API_KEY"]}/getUpdates')
print('Id:',json.loads(res.text)['result'][0]['message']['from']['id'])

where config["API_KEY"] - is srtring

Ok, script part of our operator is also very simple, we receive any string message from input and send it to our user or group (id) :


 

Summary


That's all! We can add this operator to our main pipeline and if something goes wrong - add additional messages. (What, when, how ,etc.) So, with SAP Data Intelligence we can integrate all other technology to one simple pipeline with additional features, like chat operations and advanced monitoring. Try it yourself and prepare new kind of bot operators...