Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
kevin_hu
Active Participant
1,483
As the BTP Kyma Runtime becomes more and more popular, I decided to branch out from cloud foundry, try it out and hopefully acquire some new knowledge in this mainly-stay-at-home Summer Break (of course it is summer down under in Australia now).

As a "Traditional" SAP developer myself, everyday seems to be quite busy. So I decided to pick up some quick wins with established tutorials available online within the limited time available.

Thanks to Pandemic (I shouldn't say that) and Teched 2021, everything seems to go online and free, including the hands-on exercises (usually worths a couple of grands for a temporary shared instance and a pdf document). I chose to start with DEV261 Hands-on "Build Extensions with SAP BTP, Kyma Runtime" as a no-brainer (that's the only one for Kyma) as I found the self-paced tutorial seems to be well written and everything is on github so I can easily pull down and play around in the recently announced Free Tier BTP, investigate and seek help if required.


Background


Personally I do not have much previous experience before with Kubernetes or Docker, not to mention Kyma. My very first experience was from a couple of youtube videos Thomas Jung posted a few years ago. I lost the grip in the middle when I try to follow as I was apparently lacking of the basic knowledge at that time.

I ended up completing the whole DEV261 hands-on exercises within 8 hours, mostly spent on Google due to my lack of the basic knowledge of docker and Kubernetes and installing and configuring various tools required. But overall it is quite rewarding and fun to go through the excellent content and get to know a bit more around Kyma and how everything works together. I believe you can probably cut the time spent further by reading through my tips as follows.


 

Tips



  1. Free Tier or Trial: It seems the tutorial was built on top of trial environment. The environment I use is Free Tier and it is still ok, except for some minor variants encountered.

  2. Provisioning Kyma Runtime: I do recommend to start provisioning the Kyma Runtime the day before you plan to start because it really takes time (official claimed around an hour).

  3. Region to choose for Kyma: Kyma is not available for all regions at this time of writing. I do have a free tier subaccount already in Azure AP20 which will be hosting the required components such as HANA Cloud (provisioning HANA Cloud and starting it also takes time btw), and I created another subaccount in AWS EU10. The available regions for free tier are documented in here.

  4. Development IDE: The excercise does not really require any IDE, but I just prefer to use vscode

  5. Command Line, Powershell or Bash: That really kills most of the time, as I found if I want to stick with windows command line which I am familar with, I do need to tweak a bit on the samples provided in the tutorial.



 

Overall Picture


After all the environment set up, I got the overall picture

  1. Free Tier Subaccount #1 on Azure AP20 with cloud foundry enabled hosting HANA Cloud HDI instance (hana-free plan)

  2. Free Tier Subaccount #2 on AWS EU10 with Kyma enabled, Launchpad service and CICD service subscribed both on Free plans

  3. The project is basically a simple CAP project which is built and hosted in docker containers, and then deployed into Kyma runtime. The db layer will be deployed into the HANA Cloud HDI container and service layer will be running in Kyma docker container or so called Pod. Frontend layer will be deployed into the HTML5 App Repository of Cloud Foundry of EU10 and be available for Launchpad service to consume.

  4. Reposting the diagram here from the tutorial.


Solution Diagram


 

Simplifed steps to follow - from a beginner's point of view


There are various tools and components plus BTP capabilities which have been consolidated and demonstrated in this hands-on scenario. For the purpose of getting started as a beginner, if I have a second chance to walk through it, I do want to make some adjustment of the steps to get the core function working first and then adding the rings and bells around it.

  1. First step is really to get the subaccount(s) and the required BTP services set up. The essentials ones are Kyma Runtime, Cloud Foundry Runtime, HANA Cloud, XSUAA and  Launchpad Service

  2. Then we can start preparing the docker images and pushing them to dockerhub

  3. A nice little coffee or lunch break during the image upload

  4. Then we can deploy the docker containers to Kyma - the easiest way is to use kubectl - the official k8s CLI, less likely to fail from my experience. If this step is passed, you should be able to see the app working as expected.

  5. Try different ways of deployment, for example: "Helm". but from my point of view it is just optional in case you want to learn some other "Fancy" ways to deploy.

  6. Use the BTP CI/CD service and jobs (Exercise 3). If you want to try out this process, here comes the set up of SAP BTP CI/CD service, github credentials etc. Otherwise it is just optional and can be skipped at first.



 

Knowledge Acquired - Mission Accomplished


So at the end of the day I should say the 8 hours spent on the tutorial was really rewarding, with me having a glimps of the core functionality of BTP Kyma Runtime as well as all the other product features. The github project actually provided new developers a scaffolded backbone environment which is ready for real life usage in many ways.

Key learnings from a pure technical point of view in plain English

  1. Kubernetes(k8s): Think about a few docker containers working together, one for db, one for service and one for UI etc.

  2. Kyma: Open source k8s runtime project by leveraging the best in class tools

  3. SAP Kyma Runtime: A fully managed Kyma runtime environment provided by SAP

  4. kubectl: the command line CLI for applying and updating the configs of the k8s or Kyma runtime, including deployment

  5. helm: a packaging tool for a bulk update of the k8s or Kyma runtime, especially valueable when the environment gets complicated.

  6. CI/CD: DevOps tool for automating application lifecycles.


The obviously next step for me is to explore some other learning resources like this one, yet another really good step-by-step tutorial of Kyma, in which some advanced topics are explored such as serverless and eventing. And I am going to try out some other Teched Exercises for free as well.(thinking about the dollars)


 

One More Important Thing


Before I was going to wrap up my first experiment of Kyma, I suddently realize something interesting in the Kyma Dashboard. Why is the HTML5 container I deployed in terminated status?



Initially I thought the html5 container is the one hosting the frontend component. It proves me wrong after checking the logs of the Pod. What it does is triggering the deloyment of the frondend app via the @Sisn/html5-app-deployer packager to the HTML5 Repository Service and therefore becoming discoverable in Launchpad service.



The intention and the benefits of this deployment method has been blogged perfect in here by mariusobert.

In short, SAP recommends in circumstances when some of the components need to be run inside runtime other than cloud foundry, such as Kyma, frontend webapp can still be hosted in HTML5 Repository to reduce footprints and costs. Is it a clue of SAP's future approach for a unified BTP runtime strategy? Or so to say, cloud foundry is going to be more like kubernetes and kubernetes are going to be more like cloud foundry/serverless in the future world.

Anyway all of them are good messages for developers, and remember that SAP has provided so many options for developers but in real life user cases, probably you just need a piece of serverless code or a simple UI5 app (just like we did in the old days on BT.... Can't agree more.

 

Last Words


Really appreciated for the content developers to make the tutorial effortless to follow and fun to read in the summer days. I will also replay the session video from here. The github project of the tutorial received 43 forks so far but I really believe it will go up for sure after my writing. 🙂 Happy Kyma-ing.

 




update: additional Q&A blog for DEV261
1 Comment
Labels in this area