I hope you all survived the log4j Apocalypse and Christmas, hopefully you had a great ending of 2021 and an incredible beginning of 2022. It has been a complicated month and a half since I wrote my last entry:
Anyway, I wanted to write this entry long time ago. I had the chance of working more on the code side during the past year and a half and a really good friend and coworker (you know who you are) introduced me to DevOps and Infrastructure as Code. It is a really exciting world and if you follow trends you’d probably saw that a lot of new position postings are related to DevOps/SRE. It allowed me exploring a different path than the one I have been doing for the past 10 years and I learnt some pretty cool things, unfortunately SAP is not the most flexible/agile company in the world and their products sometimes behave like ancient machinery but in the Basis side we can do some pretty cool stuff!
First thing we need to do is to defined DevOps and Infrastructure as Code (IAC):
DevOps is a cultural and professional movement, focused on how we build and operate high velocity organizations, born from the experiences of its practitioners.
DevOps Kungfu
If you prefer a different definition we can take the one that the GitHub guys gave us in their article What is DevOps? A guide to common methods and misconceptions:
The essential human element between Dev and Ops teams, when collaboration bridges the gap that allows teams to ship better software, faster.
For organizations, DevOps provides value by increasing software quality and stability, and shortening lead times to production. For developers, DevOps focuses on both automation and culture—it’s about how the work is done. But most importantly, DevOps is about enabling people to collaborate across roles to deliver value to end users quickly, safely, and reliably. Altogether, it’s a combination of focus, means, and expected results.
Jared Murrel / GitHub
So basically DevOps means breaking silos and walls so IT works as one on both Development and Operations sides. There is no more Developer Team and Operation Team since ownership is shared by both sides acting as one and focusing on delivering solutions with speed, stability and reliability. Cool right? It sounds like the Holy Grail. Some principles:
I totally recommend watching the following keynote from 2015 about DevOps Kungfu since it kind of mark the start of the DevOps culture on the IT world:
Yeah you probably are thinking that this is not new and some companies have been doing the same since decades ago. Let me tell you something, you are probably right. I’m sure there were companies out there following the same principles in the past but the big expansion of DevOps happened in the last years. We are transitioning from a world that worked on a waterfall model with strict separation of teams and ‘discrimination’ between Development and Operation to a world that works on agile with full integration between teams and areas.
If you still don’t believe me I recommend that you read/listed to an awesome book named The Phoenix Project. It is difficult in the beginning since it totally reminds us about how we struggle on a daily basis with some of the most common problems we face but give it a try, I’m 100% sure it will change the way you think.
Alright now that we know about DevOps the next questions is how get there. The GitHub article I shared before gives us a few starting pointers:
This last point bring me to the next topic…
There are a lot of definitions of Infrastructure as Code but let’s use the one provided by Red Hat:
Infrastructure as Code (IaC) is the managing and provisioning of infrastructure through code instead of through manual processes.
Some dude from Red Hat
It basically means… whatever, I think it is pretty explanatory. Instead of building infrastructure manually we code it and we use automation and tools to deploy that code. A really simple example of a JSON file used on Azure in order to create a storage account:
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"location": "[parameters('location')]",
"apiVersion": "2018-07-01",
"sku": {
"name": "[parameters('storageAccountType')]"
},
"kind": "StorageV2",
"properties": {}
}
],
Another really simple JSON file used to deploy a VM:
{
"VM": {
"Name": "MYVM",
"Disk": {
"Size": "100GB"
},
"Networking": {
"IPAddress" : "10.0.0.1"
}
}
}
You can basically use whatever you want to deploy your infrastructure. The following diagram shows the different part used for deploying infrastructure following IAC principles:
So we basically have a code repository where we upload the code that develop, then this code is read from the CI/CD tools such as Ansible, Jenkins, GitLab, etc. that would deploy my infrastructure OnPrem or in the Cloud provider that I choose. The cool thing is that any new VM, Storage Account, Database, container, etc. that I deploy will be done automatically using the code that I previously wrote and that Infrastructure will be maintain and aligned in the future to the code I created. Think about it as a factory and a way to standardize deployment and builds across my company.
There are some cool examples about IAC in the Google SRE Book like for example that time when they deleted part of their infrastructure and they redeployed everything automatically following IAC principles and automation.
On the SAP side this opens a whole new world of possibilities, you can deploy new systems, perform upgrades/updates, perform system refreshes, system copies, etc. following the same pattern and using code instead of the traditional way of building each system or performing the same operations manually. You can even automate code deployment between systems and perform the validations and test using these tools in order to verify that everything is working as expected without manual intervention. Sounds amazing, right? Well, I’m sorry to destroy your dreams but SAP is still not there…
All this bring me to the big problem: SAP sucks when talking about DevOps and IaC. There are multiple reasons but first I’m going to recommend you the following presentation about DevOps in SAP that pretty much resume much of the issues we find on a daily basis:
Apart of what Chris Kernaghan commented in the video regarding the multiple technologies used, types of architecture, multiple vendors working in the same infrastructure, etc. I want to add some examples of my own:
SAP has no knowledge about Docker and regards it as virtualization.
SAP, 21st century company
SAP Support does not recommend this sort of deployment outside of test lab scenarios.
I can keep going for days but I don’t have time, I think you already have an idea of the current picture of the SAP world when coming to DevOps or IaC. It is slowly changing and there are certain applications you can use such as Azure DevOps in order to integrate them with your SAP products and created pipelines for your process. The problem is that SAP is still lightyears away from other products in the market and they are not getting any closer. Their newer applications that work on PaaS and SaaS model have certain capabilities already build that allow to use pipelines and certain automation but there is nothing similar for the rest of their software, specially OnPrem software.
Well fortunately there is still a lot of things we can do, it is not the end of the world. DevOps is just a movement or a methodology and we can still work on a similar way. It will be harder, it will take more time and more effort but it is still possible to follow a kind-of DevOps methodology for supporting SAP systems. As for Infrastructure as Code, luckily for the Basis folks there is still tons of things we can do with products as Ansible, Puppet, Jenkins, GitHub, Terraform, etc. that will make our life easier. Remember, the idea is to manage our systems as a factory instead of doing the same tasks over and over manually. Few examples I can give you:
Those are a few examples of what we can do following IaC principles in your SAP landscape. In the following months I will extend some of those ideas and provide more details with code and steps for implementation.
I know it is being a while since I posted the last time. So far…
UPDATE 11/25/2020 Adobe released a new patch that solves the issue a few days ago:…
Good news for you fanatics of SAP GUI! SAP will release SAP GUI 7.70 in…
Quick update since I don't have a lot of time lately. During my 2019 job…
It's been a while since the last time I wrote an entry in my blog.…
Bad news for those of you running old SAP Solution Manager versions. SAP updated recently…