<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[maira.io - Medium]]></title>
        <description><![CDATA[Thoughts and learnings by Maira Engineering and Product team - Medium]]></description>
        <link>https://medium.com/maira-io?source=rss----f8d2f1946993---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>maira.io - Medium</title>
            <link>https://medium.com/maira-io?source=rss----f8d2f1946993---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 23:51:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/maira-io" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Why we must rethink the access-control model in CloudOps]]></title>
            <link>https://medium.com/maira-io/why-we-must-rethink-the-access-control-model-in-cloudops-7083e56ba652?source=rss----f8d2f1946993---4</link>
            <guid isPermaLink="false">https://medium.com/p/7083e56ba652</guid>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[platform]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[rbac]]></category>
            <category><![CDATA[cloudops]]></category>
            <dc:creator><![CDATA[Sachin Bansal]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 18:21:31 GMT</pubDate>
            <atom:updated>2022-10-05T01:58:28.414Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*yFihlWsz4x8oGlAPPjBIkA.gif" /><figcaption>Security vs Usability</figcaption></figure><p><em>Today, every application comes with some sort of security model. However, as we develop our software with many such applications, the overall model becomes a hodgepodge of all these different models. Sometimes, it is not modeled with the machine, human, and object abstraction needed for the target application. This can lead to security breaches. Let’s see some of the scenarios where it might happen.</em></p><p><strong><em>Scenario 1</em></strong></p><p>You just deployed your brand new shining application using Kubernetes running on Amazon AWS. You have set up the best-in-class CI/CD pipelines to make sure that when a new version is ready to be deployed, it can be automatically tested to ensure no regression issues are introduced and can be deployed with minimal effort. Since security is your number 1 priority, you have made sure that it can only be accessed from a super secure jump host that can only be accessed when connected to the company VPN and using keys that you are guarding.</p><p>The next day there is a performance issue and the developer asks to collect some information, which you gladly provide. But over the next few days, such requests increase to an overwhelming level. You reluctantly let some of your team members access your keys as needed. But now, you don’t know who accessed the system when and took what action.</p><blockquote>Admins must be able to <strong>audit every action</strong> on the production cluster.</blockquote><p><strong><em>Scenario 2</em></strong></p><p>You have set up RBAC on Amazon AWS, so you can control who can access your VPCs, instances, and other <em>AWS resources</em>. Then, you need to control who can access the pods and deployments in <em>Kubernetes</em>, so you also need to set up RBAC on Kubernetes. Similarly, each cloud application such as <em>Confluent Kafka</em>, <em>MongoDB</em>, or <em>Mysql</em> has its flavor of access control and they all work in different ways. Now, when you need to grant some access to someone, you may need to mess around with all these access control systems. And even after this, there is no centralized audit trai<strong>l</strong> telling you who did what in the system.</p><blockquote>Managing differentiated access in the production apps require <strong>unified security model and centralized control</strong>.</blockquote><p><strong><em>Scenario 3</em></strong></p><p>Finally, you managed to configure all the access control models as per your specifications. You have a remote team that is handling the service calls during your night time. Normally, they don’t need to access the internals of Kafka in the production environment, so they don’t have access to it, but there was a bug discovered yesterday that requires them to access a topic to work around the customer issue. You wish you could grant them access for just the time needed to handle the call and record all actions taken by the remote team, but no such mechanism exists today.</p><blockquote>Just-in-time attribute-based <strong>access control with audit capability is a must for the remote-first team</strong>. This helps everyone to be productive while keeping the ops team in control.</blockquote><h3>The Problem</h3><p>Unfortunately, scenarios like the above are way more common than they need to be. And the root cause is that access control mechanisms available today are either:</p><blockquote>Not granular enough, or</blockquote><blockquote>Scattered across different applications, or</blockquote><blockquote>Are overly complex to use, or</blockquote><blockquote>Simply don’t have all the features that are required, or</blockquote><blockquote>A combination of the above.</blockquote><p>Also, because of being scattered across different applications, they don’t have a global system view to provide the operators with a <strong>complete audit trail</strong> to inform them about who took what action in their system across different applications.</p><h3>Maira Solution</h3><p>When we started working on Maira, access control had to be architected and implemented as core capability. Since Maira platform integrates with all the cloud applications that a customer might be using, we wanted to build a system that could control access to all parts of the system and can keep track of who accessed what at what time. It had to have a very <strong>granular level of control</strong> <strong>to grant access to various actions on a specific resource</strong>, and yet at the same time, easy to configure. It should have time-based as well as location-based controls. It should also be easy to see who has access to what resources. The picture below shows how access control and audit are integral parts of Maira platform.</p><blockquote>Maira provides an integrated environment for automation and manual access. This makes it a <strong>natural security policy enforcement point and record keeper</strong> of all activities.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tCMQeClV9qq6AKU7GpRaFg.jpeg" /><figcaption>Access Control and Audit are essential parts of Maira Platform</figcaption></figure><h3>Access Control Technologies</h3><p>We looked at various technologies to implement this. The most common technologies are <em>Role Based Access Control</em> (RBAC), <em>Attribute Based Access Control</em> (ABAC), <em>Policy Based Access Control</em> (PBAC), <em>or Next Generation Access Control</em> (NGAC). See <a href="https://frontegg.com/guides/rbac-vs-abac">[1]</a> for a detailed comparison of these technologies.</p><p>RBAC models assign roles to users and then grant permissions to those roles. But as the requirements for more and more granular access arise, the number of roles explodes and becomes unmanageable at a large scale.</p><p>ABAC models assign attributes to users and objects and permissions can be granted to any combination of those attributes. The problem with this approach is that it is more complex to implement and also to configure. It is also harder in this model to identify who has access to which objects. E.g. if you want to list what all actions can be performed by user Bob on which all resources, it can be very hard to impossible.</p><p>PBAC is an iteration over ABAC where permissions are defined in a policy that includes attributes of all the users and resources. It still suffers from the problem associated with ABAC.</p><p>NGAC is a standard defined by the <em>National Institute of Standards and Technology</em> (NIST). It tries to solve the problems related to the complexity of ABAC by defining relationships between resources/resource groups and objects/object groups. Then, access policies are defined between those groups. See <a href="https://www.tetrate.io/blog/rbac-vs-abac-vs-ngac/">[2]</a> for an introduction to NGAC and <a href="https://speakerdeck.com/nacx/next-generation-access-control-ngac-for-the-multi-cloud-world">[3]</a> for a presentation about it.</p><h3>Maira Object Model</h3><p>To make it more clear, here is a high-level representation of the Maira object hierarchy:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*uwxPwsgDQ8sZ9t2MYjHcGQ.png" /><figcaption>Maira Object Model for Access Control</figcaption></figure><p>In Maira object model, users belong to roles (admin/member), which belong to groups. Similarly, objects belong to object types, which belong to service instances and<strong> </strong>service types. An edge between these nodes defines what a user can access and the labels on the edge define the actions they can perform. All the permissions are hierarchical on both sides, such that a user has access to all the resources that their role or their group or their entire team.</p><p>There is a separate “<em>dimension</em>” for site or location. Each user belongs to a site and a user will get access to all resources which are connected to the site.</p><p>Each policy also has a time component at which this policy will be in effect. So, it is possible to grant access to a specific time period.</p><h3>Implementation</h3><p>Implementing these policies can be a very challenging task. We use the industry standard <em>Open Policy Agent</em> <a href="https://www.openpolicyagent.org/">[4]</a> which is used by many well-respected companies for their access control implementation. It allows us to define our policies in <strong>declarative language</strong> and processes them in real-time to determine if a particular action by a user should be permitted or not.</p><h3>Configuring access control policy rules on Maira Cloud</h3><p>Typically, end user is working with CLI and objects with a hierarchy such as pods/&lt;namespace&gt;/&lt;pod-name&gt; and organizational structure, such as kafka user group, etc. If access control is also not on based on the same, it fails the simplicity test. In Maira, you can define a policy rule that connects a user, role, or group to a resource instance, resource type, service instance, or service type, in that hierarchy. This allows you to define policies from a very fine level to a very coarse level easily. Below is a screenshot that shows this process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/0*veWtbRd8gGJ3CiNZ" /><figcaption>Configuring Access Control Rule in Maira Cloud</figcaption></figure><h3>Conclusion</h3><p>We can see that having proper access control is essential to have effective operations in a distributed environment. Inadequate, hard to configure, or scattered access control will result in only a few people being able to access any part of the system, and eventually, it will lead to burnout. With Maira, you can configure access control for your entire cloud operation, across different environments and for many different applications in one place in an easy-to-understand way.</p><h3>References:</h3><p>[1] ​​<a href="https://frontegg.com/guides/rbac-vs-abac">https://frontegg.com/guides/rbac-vs-abac</a></p><p>[2] <a href="https://www.tetrate.io/blog/rbac-vs-abac-vs-ngac/">https://www.tetrate.io/blog/rbac-vs-abac-vs-ngac/</a></p><p>[3] <a href="https://speakerdeck.com/nacx/next-generation-access-control-ngac-for-the-multi-cloud-world">https://speakerdeck.com/nacx/next-generation-access-control-ngac-for-the-multi-cloud-world</a></p><p>[4] <a href="https://www.openpolicyagent.org/">https://www.openpolicyagent.org/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7083e56ba652" width="1" height="1" alt=""><hr><p><a href="https://medium.com/maira-io/why-we-must-rethink-the-access-control-model-in-cloudops-7083e56ba652">Why we must rethink the access-control model in CloudOps</a> was originally published in <a href="https://medium.com/maira-io">maira.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Do We Need a DSL for Low Code?]]></title>
            <link>https://medium.com/maira-io/why-do-we-need-a-dsl-for-low-code-1e353a89077a?source=rss----f8d2f1946993---4</link>
            <guid isPermaLink="false">https://medium.com/p/1e353a89077a</guid>
            <category><![CDATA[playbook]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Sachin Bansal]]></dc:creator>
            <pubDate>Fri, 02 Sep 2022 18:48:21 GMT</pubDate>
            <atom:updated>2022-09-02T18:48:20.952Z</atom:updated>
            <content:encoded><![CDATA[<p>Maira provides a low code automation platform for Ops day 2 problems. It might sound counter-intuitive to use a DSL for a low code platform. Let’s look at why this design choice make sense. When we started working on Maira platform, we had a set of requirements that came from our experience with going through many customer escalations. The challenge was to design a platform that will make it very easy for someone to understand a workflow as soon as they look at it and at the same time, allow developers to write workflows that will help them automatically respond to incidents and remediate the problem, hopefully with minimal human intervention. We felt that the best option was to represent <em>low code</em> workflows as <em>true code.</em></p><h3>View logic as blocks</h3><p>Most of the time urgent ops problems are handled by the front-line ops/support team, whose members may not understand the code of the underlying application completely. They may not even be full-time programmers. When presented with an automation script, they must be able to understand it and make minor changes if needed. The simplicity of MPL allows us to convert our workflows into a format such that they can be displayed as code blocks. An automation workflow that is easy to understand will lead to far fewer calls to core developers. It also allows front-line engineers to add a step (e.g. add a step to send a slack message)</p><p>Take the workflow in the following picture as an example. On seeing this, you can easily figure out what the workflow is trying to do, which is, to get logs from Kubernetes, do some checks to identify if an action is to be taken, and if it is, then confirm with a human approver and take the action if approved, else just create a ticket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QKLOJriVTsGMIu-J_R_-Sw.png" /></figure><h3>Ops Automation Problems are Complex</h3><p>The problems of DevOps that need automation are generally very complex. They need flow control logic such as conditions and loops. They need transformation logic that takes the output of one command and transforms it to be suitable as input for another command. A lot of this logic may be used in multiple places, and if you don’t want to repeat it everywhere, you might need to define a function. They are hard to specify as monolithic single-flow pipelines. Combining all these, you can see that it needs a programming language.</p><p>Can we use an existing language such as python or bash? The problem with general purpose language is that of code bloat. We want it to be simple enough that a non-programmer should be able to understand and while writing such automation logic, one should not need to worry about handling tens of error cases.</p><p>To reduce any learning curve, we have picked python based syntax, which will be familiar to a large number of programmers.</p><p>To show the complexity of the automation problems, I will give one example of a workflow that we wrote to monitor and automatically delete unused resources in AWS. This workflow involves reading the list of resources from AWS, examining them to find out if they are unused, and setting an expiry, then later as the expiry nears, sending a notification to the owners, then finally deleting the resource. If we try to do this just with simple blocks, it will take a much longer effort to get right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*WAIBloXBmbRZGiWuyqD8Jw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/0*ro0QpLf-GyRaabf-" /><figcaption>Complex logic is easier to define as code</figcaption></figure><h3>See differences across workflow versions</h3><p>A troubleshooting workflow is constantly evolving. The underlying application code is changing all the time, the way the customers are using it keeps changing, and new issues keep getting discovered every day. Each of these means that the workflow will change quite often. If the only way to see the workflow is as blocks, it becomes very hard to figure out what has changed across versions. Also, sometimes, we may need to roll back the workflow to an earlier version. Changing workflows may also need to be reviewed by peers. All this becomes a lot easier if engineers can see the diffs using their favorite code diff tool. These workflows can even be stored in a code versioning tool, such as GitHub, for easy version control.</p><p>The picture below shows changes being made to the workflow and it is easy to understand what is being changed. Imagine doing something like this between YAMLs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/0*6TOHLMOLis8YBV9J" /><figcaption>Workflow code diff</figcaption></figure><h3>Integrated Troubleshooting and Automation Environment</h3><p>A great workflow language is not very useful if writing workflows is a tedious task. Today, engineers are used to CLI tools to access all kinds of applications (e.g. AWS, Kubernetes) for troubleshooting. In MPL, each task is run as CLI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*KOy0mlGdFwBo79mUMXXIMg.png" /><figcaption>Tasks running as CLI</figcaption></figure><p>When engineers use CLI in a manual troubleshooting session, Maira will capture those CLI commands and convert them into a workflow, possibly after some editing. These workflows can later be run automatically and enhanced further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bXVHfxFEz5uaHkET_gsZRA.jpeg" /><figcaption>Try commands, save session and then view/edit as blocks</figcaption></figure><h3>Other Language Features</h3><p>Most of today’s APIs use JSON as a mechanism to pass data. MPL has built in support to handle data expressed as JSON. You can easily filter a JSON array or object based on any nested field or you can transform one JSON object into another so that it can be used as input for another Maira Command.</p><p>Also, MPL automatically takes care of most of error handling and retries for problems arising because of unreliable network or platform. Each Maira Command is retried (based on a policy) if it hits any network issue or a service being temporarily down. This makes MPL based workflows <em>inherently durable</em>.</p><h3>Conclusion</h3><p>To summarize, we have a dual requirement of making the workflow easy to understand by providing a block-based representation, at the same time, making it easy to compose the workflow, maintain it, review it, and roll back if necessary. It needs to be low friction for developers to adopt, so we have tried to keep it as close as possible to various CLI tools that the developer community is already familiar with. MPL enables you to solve many complex problems using low code workflow as <em>true code</em>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e353a89077a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/maira-io/why-do-we-need-a-dsl-for-low-code-1e353a89077a">Why Do We Need a DSL for Low Code?</a> was originally published in <a href="https://medium.com/maira-io">maira.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Maira Slackbot: Superbot for all your operation need]]></title>
            <link>https://medium.com/maira-io/maira-slackbot-superbot-for-all-your-operation-needs-706236afbacc?source=rss----f8d2f1946993---4</link>
            <guid isPermaLink="false">https://medium.com/p/706236afbacc</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloudops]]></category>
            <dc:creator><![CDATA[Prabhsimran Singh]]></dc:creator>
            <pubDate>Fri, 19 Aug 2022 07:34:55 GMT</pubDate>
            <atom:updated>2022-08-19T07:54:30.264Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*DCLqjpsfJHlKKF67-Maxtw.png" /></figure><p>I have been using slack bots in my day to day work for a long time. I have mainly used them to post a notification to a channel, but recently at Maira I got a chance to develop a bot for Maira. The requirements were as simple as</p><ul><li>send a <strong>notification </strong>to a channel or can <strong>“post”</strong> stuff</li><li>can also listen to any <strong>app mentions</strong> (@bot) across any channel</li><li>single line <strong>slash command</strong> or ingest data in slack’s<strong> shortcuts</strong></li></ul><p>Lets see what it takes to write a new slack bot. In Slack, a bot is controlled programmatically via a <strong>bot user token</strong> that can access one or more of Slack’s APIs.</p><p>Example- <a href="https://api.slack.com/start/building/bolt-js">Bolt-JS</a></p><p>Obviously, apps like these are powered by slack API or the API of backend services it is accessing. Another such example of that would be Github bot in slack. The bot needs to be part of channel and need to have slack credentials to access channels.</p><p><a href="https://api.slack.com/authentication/basics">https://api.slack.com/authentication/basics</a></p><p>So far so good. Its straightforward, but then <strong>how do we access something on the app side as a user?</strong> (and meet the 3rd requirement above)</p><p>Now, the problem is that slack user is not recognized by those 3rd party applications. So we either need to give the slack user the permission to access that application somehow or we can just try to link the slack user to the application which we want to access. This is where the Account Binding feature of slack comes into picture. We will talk more about this in upcoming sections.</p><p>So, <strong>Maira </strong>is a friendly slackbot that runs on a system similar to <a href="https://slack.github.com/">GitHub Slackbot</a> which also has two-way integration between slack and Github APIs such that, one can get notifications from GitHub but can also change stuff in GitHub like creating/updating new issues. How cool is that!!!</p><h3>Interfacing with multi tenant SaaS</h3><p>To do a “post” to a multi-tenant SaaS, we need to link slack user account with Maira account. This is required for Maira to recognize Slack user and apply the access control rules for user’s role in Maira. Once logged in, we get access to a wide range of functionalities that Maira offers to its customers through slack.</p><h4>Account binding</h4><p>Account binding allows a user to use an Maira integration in Slack to read or modify information in Maira and it’s functionalities (such as Kubernetes, Kafka, Prometheus, etc) whilst respecting the existing access controls. Essentially when slack user tries to access Maira, it redirects the user to Maira’s oauth authenticator. Once authenticated, the Maira service links Slack user to Maira user that oauth just authenticated. Then each command from slack is executed on behalf of Slack user as the linked Maira user. Technical details on this whole magic is here.</p><p><a href="https://api.slack.com/best-practices/blueprints/account-binding">Binding accounts across services</a></p><p>In Maira, we can run commonly used APIs for Kubernetes, Kafka, Prometheus, etc with ease and get a tabular response that is easy to read and access. Along with this, one can send notifications via email and thanks to Maira slackbot, to slack as well.</p><h3>Maira: SaaS service of Ops</h3><p>Maira is a SaaS service for ops, and it lets the user access their app component via CLI. Now because of two-way linking between slack and Maira, users can conveniently execute any Maira command via the slash command feature of slack. This command is executed with all authz checks as one would do from the Maira console. Because of this now end-user can access all their cloud services(ex- k8s cluster and more) from this bot if they choose to enable it.</p><p>I had already worked with <a href="https://botkube.io/">botkube</a>, it helped me monitor my Kubernetes cluster and debug critical deployments but with Maira it can do that along with some extra features such as.</p><ol><li>It is hosted by Maira.</li><li>Honors all RBAC rules.</li><li>Remembers session information for later.</li><li>The entire workflow can be executed using slack slash commands or shortcuts.</li></ol><h4>Slash Commands</h4><p>The Maira Command Line made accessible through slack. We can conveniently execute any Maira command via the slash command feature of slack</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ezEetSiY4IjVH3V3cuK-A.jpeg" /></figure><p><em>/mpl !k8s list-pods </em>— to list all the running pods on your kubernetes cluster</p><h4>Shortcuts</h4><p>It is easy to make a few errors/mistakes while typing the full command for a service in slack. To further ease the access of Maira/MPL functionalities, the slackbot is using the ‘shortcut’ features which help to.</p><ul><li>remove dependency on typing the complete exact command for a service and instead use a UI designed specifically for this.</li><li>run all Maira services using simple modals having dropdown options and input fields to select and use your specific service such as Kubernetes, Kafka, Prometheus, etc.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*BR5C0rVLVys7W4Fdp7cRzw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*wErfgvlhaKN-gY4K_k75JQ.jpeg" /></figure><ul><li>run entire scripts remotely in a multi-line input box.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*zMnmhE8eW8nO4EEugB_YSA.jpeg" /></figure><h4>Post Notification</h4><p>We can easily post a message in any slack user or channel that the bot has access to through a simple command from Maira Playbook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*dQ7RUyZFe08Z_ZSrrKKKbQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*btlYcfcq_e2LipjEyJLhZA.jpeg" /></figure><h3><strong>Conclusion</strong></h3><p>As Maira has support for CLI to access anything, it becomes very easy to expose the full capability of Maira in slack. Now the users can collaborate on slack from anywhere for troubleshooting their applications and services remotely. While they do that we don’t compromise on security or compliance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=706236afbacc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/maira-io/maira-slackbot-superbot-for-all-your-operation-needs-706236afbacc">Maira Slackbot: Superbot for all your operation need</a> was originally published in <a href="https://medium.com/maira-io">maira.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why automation and troubleshooting must converge]]></title>
            <link>https://medium.com/maira-io/why-cloud-ops-team-fail-to-automate-795fa93fc829?source=rss----f8d2f1946993---4</link>
            <guid isPermaLink="false">https://medium.com/p/795fa93fc829</guid>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[cloudops]]></category>
            <category><![CDATA[workflow]]></category>
            <dc:creator><![CDATA[Ashish Ranjan]]></dc:creator>
            <pubDate>Sun, 07 Aug 2022 03:32:03 GMT</pubDate>
            <atom:updated>2022-08-19T04:20:22.073Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*RkDp9fWnus5CrFesv3Q9vg.png" /><figcaption>Manual steps cause delays in troubleshooting. (source <a href="https://xkcd.com/2565/">xkcd</a>)</figcaption></figure><p>Developers and ops engineers on the frontline know the importance of the right troubleshooting tools, especially in a war room scenario. In a war room situation, the most important thing is getting back to normal asap. Seasoned ops engineers will tell you that getting the service back up trumps the root cause analysis or postmortems. Often the root cause of service degradation or outages are due to temporary environmental problems (e.g., noisy neighbors) and are analyzed over time as the problem repeats itself. <strong><em>Every minute spent in troubleshooting eats into the </em></strong><a href="https://cloud.google.com/blog/products/devops-sre/sre-fundamentals-sli-vs-slo-vs-sla"><strong><em>SLO budget</em></strong></a><strong><em>, the most valuable currency for the ops team</em></strong>. In such situations where there only is a small window to collect data for offline analysis, ops engineers care only about two things.</p><ol><li><em>Run as many commands as possible to capture the system state.</em></li><li><em>Quickly turn those troubleshooting steps and commands into automation scripts, so when the problem reappears, they do not have to repeat the steps.</em></li></ol><p>There are a plethora of monitoring tools and dashboards in the market. In crunch time, sifting through those data and correlating them to find the root cause is quite time-consuming, even for the subject matter expert. Often engineers would not even know how to sift through those logs and metrics. In this blog, I outline why frontline teams do not have these tools available and how we can address those.</p><h3>It starts with troubleshooting</h3><p>The best strategy in a war room situation or day to day troubleshooting is to be able to run vetted scripts and collect data as fast as one can. But in my experience, morst of the organizations do not have these automation scripts available when needed. Why is that? It is simply because a system and process do not exist to build a set of automation scripts incrementally, and keep them pertinent.</p><p>More often than not, engineers realize the need to automate something while they are troubleshooting or looking to capture some data. After the troubleshooting session is over, he should automate those steps. If done correctly, next time manual steps won’t be needed. However, in reality, developers fail to develop those scripts. It is because:</p><ul><li>Developers use CLIs and APIs for troubleshooting. <strong><em>After the troubleshooting session is over, developers must reserve time and energy to rework these steps and translate them into a language like Python.</em></strong> This is a huge development and maintenance overhead. As you can guess, often this slips through the cracks.</li><li>Scripting in Python etc is hard. It’s extremely time consuming to develop and maintain robust scripts for the real world, because of corner cases and error conditions.</li></ul><p>Only way to tackle this is to:</p><blockquote><strong><em>Unify “troubleshooting” and “automation”.</em></strong></blockquote><p>Engineers must have the same tools and environment for manual troubleshooting and later automating those steps. After getting burnt many times in the frontlines in our past lives, we at Maira have developed just that — a platform for executing troubleshooting CLIs and using those CLIs for automation in Python-like code (in MPL) without worrying about boilerplate logic. Maira runner <em>executes this code as workflow</em>, bringing all the goodness of <a href="https://medium.com/maira-io/thinking-in-workflow-19fe118e8e7c">stateful execution</a>.</p><h3>Respect existing practices and habits</h3><p>Countless tools and platforms have failed that mandated changes in user habits or had considerable learning curves. Software engineers, in particular, do not want to change their working habits, language, or environments. There is a reason why <em>vim</em> and <em>emacs</em> are still alive. As developers, we know that engineers like their UNIX terminals and CLIs. In addition, they like their Python and curl 😀. With these requirements in mind, we designed Maira grounds-up starting with CLI and then moved up the stack to weave these CLIs with application logic in MPL. These design choices (<em>patent pending</em>) led us to develop the following components.</p><ul><li>First, we developed a Python like <strong><em>repl </em></strong>shell<strong><em> </em></strong>and enabled access to integrations with third-party applications and infra components as <strong><em>CLI</em></strong>. Yes, the repl shell has command completion and other goodies as well!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b4HUMKWSPdIryUdB" /><figcaption>Maira integration available as user friendly CLI</figcaption></figure><p>In the above screenshots we can see how the Maira shell brings the entire production system to developers’ fingertips. All the integrations, available as CLI, prints outpus in nice tabular format.</p><ul><li>Curious readers will point out that reinventing command line completion and pretty tables do not help in automation. That is correct, so next <strong><em>we incorporated these CLIs into a Python-like language — MPL</em></strong>. Internally all Maira CLI commands outputs in developer-friendly JSON. It is similar to <em>kubectl</em> and <em>gCloud</em> CLIs developers are already familiar. The difference is that, in MPL, just like function output in Python, JSON output from CLI is assignable to a variable. This way MPL lets you to cut and paste the CLI and logic from troubleshooting session into a file and deploy this as ‘workflow’. MPL is true <em>workflow-as-code</em>, not a mish mash of YAM L and Python here and there. No wasted effort in redoing your troubleshooting steps in Python or other languages and figuring corner cases etc.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aNO8lXTis6Bn2Cs9" /><figcaption>Capture raw JSON output and access fields in subsequent steps</figcaption></figure><ul><li>Next, we incorporated language features for <strong>JSON queries, </strong>with<strong> </strong>simple<strong> </strong>query syntax for easy <strong><em>transformation logic </em></strong>in the MPL script. JSON is a first-class object in MPL. Json fields can be accessed with intuitive dot and array notation. For example:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zsY_7323mHniGrWJ6ScYJQ.png" /><figcaption>Simple JSON query syntax for easy automation</figcaption></figure><p>MPL also has advanced JSON filtering capabilities using a simple syntax built into the language, loosely based on <a href="https://jmespath.org/">JMESPath</a>. Above statement, print x.instances[].instance_id, iterates over <em>array of ‘instances’ </em>and prints <em>instance_id </em>as list. Every command and statements executed in a <em>mpl </em>session is recorded, and the entire session can be resumed with last working state, at a later time. We will elaborate more on this in a future blog.</p><ul><li><strong><em>Write code and get workflow</em></strong>. As I described the need for a workflow orchestration engine in my earlier <a href="https://medium.com/maira-io/why-a-self-service-workflow-platform-is-a-must-for-modern-ops-66cc03df5923">blog</a>, the suitable workflow runner (MPL in our case) is even more important. There is no dearth of low code workflow products out there. But they are <strong><em>not</em></strong> “true workflow as code”. Most of them are UI based DAG tools representing workflow in YAML.</li></ul><blockquote>“YAML is not code”. It forces engineers to work only through WebUI. A regular UI-based workflow product is poor tool for developers. Not only does it require habit change for dev, but it is also inadequate for expressing business logic even of moderate complexity. There is a reason why high-level-languages were invented. Developers do not want to go back to coding in microcode.</blockquote><ul><li>New members in the ops team may prefer the ‘<strong><em>blocks-based low code environment</em></strong><em>’</em>. They could use this to develop new workflows or to understand the existing automation scripts. For this set, we support low-code workflow. <strong><em>MPL transpiler converts code into workflow diagrams and vice versa</em></strong>. The main difference between Maira and other YAML-based tools is that in Maira, the runner executes high-level code while others just run steps expressed in YAML. It allows even the non-programmers to create workflow-based automation using Maira UI. In the background, MPL code is generated from UI blocks and deployed on the Maira cloud orchestrator.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UHvlvOD9zr52XiQAfLDvLA.png" /><figcaption>Workflow represented in High level language, not YAML</figcaption></figure><blockquote>YAML is a terrible choice for troubleshooting or developing automation scripts even for trivial cases. In an Ops environment, scripts churn more frequently than the scripts written for in HR or business automations. Hence, the building.blocks must be developer friendly, i.e., as high-level code. Developers should be able to develop in their favorite IDE and with familiar language syntax.</blockquote><h3>Conclusion</h3><p>In my earlier <a href="https://medium.com/maira-io/why-a-self-service-workflow-platform-is-a-must-for-modern-ops-66cc03df5923">blog</a>, we discussed why we need a centralized platform in an organization. Many projects fail in dynamic environments with multiple stakeholders. The reason is that the system doesn’t allow different groups to work in self-service manner and develop at abstraction level they like. We cannot expect product managers and developers to work with the same interface. Developing automation with <strong><em>low code workflow products require habit change for coders. On the other hand automating in language like Python is substantial effort and require significant investment in operations. We at Maira solve this by allowing teams to develop at their ideal abstraction level and eliminate operational overheads.</em></strong></p><p><a href="/service/mailto:hello@maira.io">Contact</a> us to know more about Maira.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=795fa93fc829" width="1" height="1" alt=""><hr><p><a href="https://medium.com/maira-io/why-cloud-ops-team-fail-to-automate-795fa93fc829">Why automation and troubleshooting must converge</a> was originally published in <a href="https://medium.com/maira-io">maira.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thinking in workflow]]></title>
            <link>https://medium.com/maira-io/thinking-in-workflow-19fe118e8e7c?source=rss----f8d2f1946993---4</link>
            <guid isPermaLink="false">https://medium.com/p/19fe118e8e7c</guid>
            <category><![CDATA[low-code]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Ashish Ranjan]]></dc:creator>
            <pubDate>Sat, 23 Jul 2022 19:28:42 GMT</pubDate>
            <atom:updated>2022-12-15T00:47:00.908Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fnJjLJZcbWlVJU-OcCgFkg.png" /><figcaption>Evolution of app stack, from server farms to Workflow</figcaption></figure><p>In the last couple of decades, app development has evolved at a rapid pace. Not too long ago, developers used to start by managing the computing and storage infrastructure. Today, the infra layer has become mostly invisible. However, as application complexity grew, the PaaS layer (queuing services, databases, etc.) became the next level of services to operate and scale. Average cloud applications today use 4+ such middleware like <em>kafka</em>, <em>rabbitmq</em>, <em>redis</em> etc in their app stack.</p><p>In the last few years, <em>server-less</em> (aws lambda, etc) has gained momentum because it alleviates the pain of managing and scaling microservices. Serverless is excellent for serving simple APIs and has made life easier for many app developers. However, as soon as the application keeps multiple “<strong><em>states</em></strong>” and <strong>“timers”</strong>, even in server-less environments, developers stitch complex logic involving numerous microservices. The promise for serverless is that app writers only worry about business logic in their language of choice (JS, Golang, Python) while offloading infra management and application scaling. But this doesn’t work for applications where workloads are long-running, require multiple states, or need to run at regular intervals. Such apps still require queuing services, context management, and so on.</p><p>In this blog, I outline how workflows are ideal as the next-generation app development platform. When coupled <strong><em>with low code libraries, it enables rapid stateful app development while still keeping the IaaS and PaaS layer invisible.</em></strong></p><h3>Workflows: from toy to a production grade platform</h3><p>Workflow used to be a series of <em>static pipeline </em>steps stitched together like lego blocks in UI. Those so-called pipelines are very popular in the RPA world. Many SaaS tools like Github and Auth0 have pipeline creation tools that could be attached at various stages of execution. They are domain-specific and beneficial to offer a configurable service to their users. E.g., one can add a few steps in Auth0 to modify the JWT token before its issued.</p><p>This static pipeline step is expressed as Directed Acyclic Graphs (DAGs), popularized by Apache airflow. However, real-world applications are much more complex than a predetermined configurable set of steps. They cannot be expressed in static DAGs. For example, if one wants to query an endpoint and, based on the results, take actions on a variable number of objects. Such cases are hard to express in static DAGs. Overall static DAGs, often described in YAML, are poor choices for app developers. It is akin to writing code in assembly language or worse.</p><p>Application writers need <strong><em>imperative programming models</em></strong> to express business logic of any complexity. They should be able to write applications in a high-level language and maintain it as code while the workflow platform does the heavy lifting of ‘statefulness’ and ‘scalability’. We will not go into detail about the nuts and bolts of such a workflow orchestrator in this post. Readers are encouraged to refer to my earlier blog <a href="https://medium.com/maira-io/why-a-self-service-workflow-platform-is-a-must-for-modern-ops-66cc03df5923#54df">here</a>.</p><h3>Programming model in workflow</h3><p>With a suitable workflow platform, app developers can code the business logic at a higher abstraction level. <strong><em>In microservices and serverless worlds, the unit of work is supposed to be stateless. They are built with a Rest API design mindset. Handling states across APIs is left to developers</em></strong>. On the other hand, a workflow platform like Maira doesn’t require you to handle states around API boundaries. Your code logic is automatically stateful around ‘work units’. In Maira, these ‘work units’ are fundamental building blocks available to programmers as reusable commands, aka blocks.</p><p>Let’s look at a simple real-world example of a long-running application. Consider a system consisting of many edge locations (it could be an IoT or distributed app), and the operator wants to generate a report consolidating data from all locations. A very simplified block diagram for such a service is shown in the Figure below. Once the API is received internally, it will send the request to multiple micro-services (S1.. Sn). Each microservice will then be responsible for fetching data from a few edge locations and will send data back to the data processing service. Once that finishes, the operator will get a notification for job completion. I will not go into detail about implementing such a feature, but as you can see, it requires multiple components to work together and write boilerplate code for error handling, network issues, etc. The overall solution requires significant development effort and will have ongoing operational overhead. In addition, every such use case will need similar logic to be developed by different teams in the organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WiW6DzzS-KEGJViV-ymNCA.png" /><figcaption>Multi stage API handling in backend with micro services</figcaption></figure><p>A “low code” workflow platform like Maira, which already comes with edge support, can easily handle such applications. With such a platform, developers don’t worry about micro-services or scheduling. It allows developers to express intent in a few lines. In addition, the code need not handle failure scenarios hence minimal to no boilerplate code to write. Reusable components are available as ‘low code’ blocks for rapid development. This is the promise of a low-code workflow platform. The following Figure shows what the app will look like on the Maira SaaS platform.</p><p>As you can see, a simple workflow code will be scheduled from the API server to the Maira control plane. Since Maira already has support for edge locations, developers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PJQQ2fdDy933rtXR-8IXwA.png" /><figcaption>Multi stage API execution with workflows</figcaption></figure><p>only have to write simple code (in Maira DSL called ‘MPL’) to iterate over edges to fetch data. The code will be as simple as:</p><pre>for x in list_of_sites:<br>     data = get_data(x)<br>     process_data(data)<br>send_notification()</pre><p>This level of simple code is feasible because the developers do not need to write boilerplates to handle transient failures, worry about micro-services failing, etc. Each ‘step’ here is stateful. e.g., if ‘<strong><em>get_data fails()’ for the nth site, or the program dies for some unexpected reason, it can resume from where it left off </em></strong><em>(nth site onwards)</em>. The platform has retry and suspend-resume capabilities for choppy connections to the edge. <strong><em>Each step can take a few seconds to a few hours, but the platform will run this to completion</em></strong>. In case of permanent failure, the user can resume the program (workflow) later to continue from where it left off. This is the power of ‘stateful’ execution.</p><p>In the above code, notice that the list_of_siteis dynamic. The code is Python-like which can be easily tweaked, version controlled etc. The get_data()function will be implemented using one of the integrations Maira supports. These integrations allow interaction with many services from filesystems, APIs, datastores, and databases to queuing services. In addition, the platform control plane manages fleets of edge locations. This allows developers to write code at a higher abstraction level, hiding all the complexity of fleet management of execution on remote environments and/or devices.Unit of work</p><p>The curious developers will notice that the above program is overly simplistic. In reality, a function like get_data()could be composed of multiple steps. That is true. The core idea of the workflow program is to understand the ‘<em>unit of work</em>’ and compose the application around that. ‘Unit of work’ is nothing but a task that interacts with an external system. This could be a rpc call or a remote/local system call. Once we have identified those boundaries, the workflow orchestrator will handle failures, parallelism and scalability. The developers do not need to write boilerplate code to handle any of those. With Maira developers write simple business logic in python-like DSL and get sophisticated dynamic workflow based application.</p><p>As an example, lets say the get_data() function is composed of 2 steps. First to fetch from 10 remote locations and send those data to a different service for the ‘<em>transformation</em>’ step.</p><pre>def get_data(x):<br>    y = ! get_s3_object x<br>    return transform_data(y)</pre><p>Here we have 2 units of work. x is list of 10 sites and get_s3_object will process all 10 sites in sequence or in parallel. (command get_s3_object is just an example, but it shows how simple integration commands could be used as a ‘unit of work’ in MPL). Again we have the goodness of statefulness, restartability etc. Without a suitable, platform developers will have to worry about different microservices, queues etc.</p><p>This program is guaranteed to run to completion despite any transient or permanent failures. If a program crashes, lets say because of environmnt reasons, it can be resumed where it left of. <strong><em>Also, one can launch 10s of thousands of such workflows in parallel depending on the application. </em></strong>The platform can handle states across millions of such workflows simultaneously.</p><p>To add to the complexity imagine that a ‘step’ in above workflow is to get confirmation from humans before taking an action. Now the program has to wait for ‘human’ for approval and then resume from where it left off. ‘<strong><em>Human in loop</em></strong>’ is a very common requirement but very complex to implement at scale in typical serverless or micro-service based architecture. In Maira all the complexity of this is reduced to a simple command called ‘<em>confirm</em>’. The program would just wait until the user confirms or denies, and resumes based on human input.</p><p>In Maira all ‘units of work’ are presented as ‘<em>integration CLI</em>’. Users can try them like any Unix CLI and the same CLI can be used in Mpl code like above get_s3_object command. At the same time, these commands are available in low code workflow builders in UI as draggable blocks for non-programmers to create an applications.</p><h3>Conclusion</h3><p>No organization can afford its core engineering team to keep up in today’s fast-changing business environments. It is advantageous to offload many end-user and operational apps to a workflow platform. In addition to a workflow orchestrator, such a platform must include a low-code programming environment, integrations, edge site management, security, and other services. These capabilities are discussed in more detail <a href="https://medium.com/maira-io/why-a-self-service-workflow-platform-is-a-must-for-modern-ops-66cc03df5923#54df">here</a>.</p><p>Workflow is the next-generation application development platform. It’s high time developers start thinking and building around the ‘unit of work’ backed by an orchestrator. Such a platform will save tonnes of development and operational cost. It will also enable product managers to react to business needs faster.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19fe118e8e7c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/maira-io/thinking-in-workflow-19fe118e8e7c">Thinking in workflow</a> was originally published in <a href="https://medium.com/maira-io">maira.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Scripts Fail to Achieve Their Automation Goals]]></title>
            <link>https://medium.com/maira-io/why-scripts-fail-to-achieve-their-automation-goals-97c7cd796f83?source=rss----f8d2f1946993---4</link>
            <guid isPermaLink="false">https://medium.com/p/97c7cd796f83</guid>
            <category><![CDATA[scripting]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[operations]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Sachin Bansal]]></dc:creator>
            <pubDate>Thu, 21 Jul 2022 03:47:47 GMT</pubDate>
            <atom:updated>2022-07-21T04:54:53.745Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-zr9iqZRmEOuExaLWMvDg.png" /><figcaption>Stale scripts are susceptible to failure</figcaption></figure><p>At one of our previous start-ups, one of the main customers was a large telecom operator. They had a big deployment across multiple locations. While it was great to have them as a customer, such a large deployment comes with its own challenges. One of the biggest challenges was dealing with very frequent escalations. Some of us senior developers were asked to join war rooms, which were happening at a very high frequency at one site or the other. Many times, troubleshooting steps were also similar, such as collecting logs for various applications, checking for configuration, editing configurations, restarting services, etc. Our first attempt to <strong><em>automate response</em></strong> to these incidents was to write some scripts that we could run while troubleshooting. But we realized very quickly that these scripts came with their own problems. Some of the problems we faced were as below.</p><ol><li><strong>Stale scripts: </strong>Since every script is not being used regularly, it is likely to get out of date and may not work with newer versions of code. We did not keep these scripts up to date since they are primarily for use by ourselves.</li><li><strong>Non-portable: </strong>Usually, such scripts are written for a very specific scenario without future reusability and maintainability in mind.r. When you try to run in for a different environment/cluster, many parameters might be different and the script would not work.</li><li><strong>Hard to understand: </strong>Generally, these scripts are not well documented and are hard to understand for anyone except for the person who wrote them. They require a high level of expertise because code in a language like python is inherently complex, especially for non-programmers and/or people in hurry.</li><li><strong>Does not free the engineer: </strong>Usually, these scripts are still run manually by the software engineer, so they don’t solve the purpose of freeing up their time.</li><li><strong>Hard to distribute/maintain: </strong>There is no easy way to distribute such scripts to a larger audience (e.g. to a customer service team).<strong> </strong>As code complexity grows, such scripts will continue to get more complex. It is typically not easy to maintain without any version control.</li><li><strong>No access control: </strong>These scripts either need root access or very wide access to run and perhaps need the user to first connect to a jump host. This means they cannot be given to someone who typically is not authorized to have that access.</li><li><strong>No audit trail: </strong>Once a script is given to several people, it is not easy to identify who did what since there is no audit trail. Revoking access is also not easy without affecting everyone else who might be trying to access it.</li></ol><p>As you see, there are a lot of problems with trying to solve the problem of alert overload with homegrown scripts. In my <a href="https://medium.com/maira-io/alert-fatigue-the-biggest-issue-in-cloud-ops-29581016e758">previous blog</a>, we explored various tools that are available today to solve this problem and why they fall short. Most of these solutions try to solve the problem by automating the process of finding the right people to resolve the problem and help them collaborate effectively. While these solutions do indeed bring down MTTR by helping the engineers collaborate more effectively, they do not solve the fundamental problem of having to attend to each alert manually.</p><blockquote>If you ever start automating by calling existing, home-grown automation scripts, you might want to take a step back and consider the bigger picture. It may be that you would be better off working at a lower level to begin with, where you’re less likely to build a Rube Goldberg machine of unintended consequences. If left alone in the wild, that’s exactly what some systems look like — an indecipherable series of scripts that is essentially magic — until it all inevitably falls apart.</blockquote><blockquote>- <a href="https://www.infoworld.com/article/2976946/thin-line-between-good-and-bad-automation.html">Paul Venezia, Senior Contributing Editor, InfoWorld</a></blockquote><p>We need a solution that can autonomously respond to alerts, with as little user intervention as possible. The automation should also:</p><ul><li>Be easy to understand for a typical Ops engineer as they are likely to deal with the alerts first.</li><li>Be easy to make slight modifications quickly.</li><li>Be able to control who can access which part of the system</li><li>Be able to track who made what change at what time so that not only we have accountability, but also the ability to roll back if needed.</li></ul><p>Maira’s workflow automation platform achieves all these goals.</p><ul><li>It maintains the <strong><em>playbooks</em></strong> needed to respond to each alert automatically. This frees up the engineer from running them manually.</li><li><em>Playbook</em> takes inputs and can be templatized, so they can work across different environments/clusters.</li><li>It allows Ops teams to not only visualize these <em>playbooks</em> as a block diagram but also edit those blocks visually. This makes them very easy to understand even for a non-programmer.</li><li>At the same time, developers can create these <em>playbooks</em> as code, which can be reviewed, version controlled, and rolled back like any other code. This solves the problem of maintaining different versions of playbooks.</li><li>We also provide a framework to test the <em>playbooks</em> in a simulated environment so that we know that they will work when they are needed to be run.</li><li>There is fine grain RBAC to the level of who can access an individual object in any of the clusters and what actions they can perform on that object.</li><li>We maintain an audit log of each action so that at any time, it is easy to see who did what.</li><li><em>Maira cloud</em> runs many services that are required to execute these <em>playbooks</em> in a fault-tolerant manner. More details about these services were described in <a href="https://medium.com/maira-io/why-a-self-service-workflow-platform-is-a-must-for-modern-ops-66cc03df5923">our earlier blog</a>.</li><li>Maira <em>playbooks</em> allow “human in the loop” cases where a <em>playbook</em> can send notifications to specific users and wait for their approval before taking a potentially disruptive action.</li></ul><p>We have our solution going through trials with limited beta customers. If you would like to try out our solution, please contact us at <a href="/service/mailto:hello@maira.io">hello@maira.io</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97c7cd796f83" width="1" height="1" alt=""><hr><p><a href="https://medium.com/maira-io/why-scripts-fail-to-achieve-their-automation-goals-97c7cd796f83">Why Scripts Fail to Achieve Their Automation Goals</a> was originally published in <a href="https://medium.com/maira-io">maira.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why a self-service workflow platform is a must for modern ops]]></title>
            <link>https://medium.com/maira-io/why-a-self-service-workflow-platform-is-a-must-for-modern-ops-66cc03df5923?source=rss----f8d2f1946993---4</link>
            <guid isPermaLink="false">https://medium.com/p/66cc03df5923</guid>
            <category><![CDATA[cloud-operations]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[platform-ops]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Ashish Ranjan]]></dc:creator>
            <pubDate>Tue, 19 Jul 2022 03:23:20 GMT</pubDate>
            <atom:updated>2022-09-09T00:42:08.375Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*_ak5ddm_hTjv3B-CvLQeqA.png" /><figcaption>Expectation vs reality of automation. courtsey: <a href="https://xkcd.com/1319/">xkcd.com</a></figcaption></figure><p>In my earlier <a href="https://medium.com/maira-io/beyond-ci-cd-top-10-challenges-in-operating-modern-cloud-applications-d984b9093ab3">post</a> on day-2 problems of cloud ops, I pointed out the need for the ops team to move from daily toil to delivering features and capabilities. These features could be for internal or external customers. While SRE/ops teams are technically savvy to deliver on this promise, they find themselves handicapped by day-to-day responsibilities. One of the clear solutions to this toil problem, as they say, is to ‘<em>automate everything’</em>. In an ideal world, most of the activities should be handled by software robots and engineers only work on delivering features or improving these robots. However, this is easier said than done and teams often are trapped in this vicious cycle of firefighting and handling tasks manually due to a lack of automation. In this post, we examine why it is so, and how we can enable the entire organization to be 10x more efficient by working less on firefighting and more on high-value features.</p><p><strong>TL;DR</strong></p><ol><li>More stakeholders mean more fragmentation in the ops environment. Most organizations fail in their DevOps journey because of a lack of common processes, tools and technologies in place.</li><li>All stakeholders must collaborate and automate on a common platform and tools to reduce fragmentation and leverage cross-team expertise. Wide adoption of such a platform is possible only if stakeholders can interact with it at their ideal abstraction level. A complex programming model or UI-only low-code solution doesn’t cut it for all stakeholders and hence doesn’t achieve universal adoption.</li><li>Ops team can be freed up from daily toil only if a centralized platform is in place. This will enable them to be out of the way of dev/product teams without sacrificing control of the production environment. A team or virtual team aka <strong><em>platform ops </em></strong>should be tasked to deliver this centralized platform.</li><li>Automation is a critical piece of this centralized platform owned. A suitable workflow platform is a must for successful automation, but any static DAG-based workflow is not suitable for ops use cases. Depending on the organization and budget,<strong><em> buy vs build decisions</em></strong> will vary, but a suitable workflow platform is the primary deliverable of platform ops.</li><li>Maira is specifically built for platform ops to deliver a robust centralized workflow platform. Developed grounds keeping all the ops stakeholders in mind.</li></ol><h3>The fragmentation problem</h3><p>Modern apps are composed of an unmanageable number of components and often span across the globe on multiple clouds. As the app complexity increases, the number of teams and responsibilities also multiplies. Today it’s not uncommon to find, in addition to product and dev, teams like DevOps, SRE, SecOps, and more. Each of these teams has its automation strategy and focus areas. Together these disparate teams use hundreds of tools to monitor and automate their tasks to tackle from infrastructure to queuing service to application performance, troubleshooting, security and so on. Very soon this lends to tools and environment fragmentation.</p><p>As infra becomes invisible in the post-containerization world, developer expectation is also shifting from depending on ops to a self-service model. The practice of throwing code over the fence to the ops team is thing of the past. Success in this new working model depends on standardizing common processes and tools. Most organizations are realizing the need for a common centralized platform [<a href="https://www.nginx.com/blog/why-every-company-needs-platform-ops/?utm_source=thenewstack&amp;utm_medium=website&amp;utm_campaign=platform">1</a>], [<a href="https://www.quali.com/blog/reinventing-the-wheels-in-devops-doesnt-scale-platform-ops-does/">2</a>], where all automation and common capabilities could be consolidated. This will combat the tool and process fragmentation problem. This platform must be owned by a neutral collaborative team (aka <strong><em>platform ops</em></strong>) who can bridge the gap between ops, dev, product etc. They focus on serving the common needs of all stakeholders and provide a common set of capabilities on a centralized platform. The platform-ops team could be virtual as well, especially if the platform is composed of off-the-shelf SaaS tools. There is no one-size-fits-all here. It will depend on build vs buy analysis in each organization.</p><h3>Centralization vs flexibility</h3><p>Adopting centralization comes with some compromise on flexibility. However, in my experience centralization is necessary for an ops environment. This is the only way to contain the proliferation of tools and libraries across the teams. It comes with some compromise of flexibility but in operations, benefits like security, maintainability etc far outweigh flexibility concerns. I came across this statement by Bryan Finster, Distinguished Engineer at Defense Unicorns and Ex-Walmart DevOps, who puts this very <a href="https://www.linkedin.com/feed/update/urn:li:activity:6624034513087451137?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A6624034513087451137%2C6624037542893363200%29&amp;replyUrn=urn%3Ali%3Acomment%3A%28activity%3A6624034513087451137%2C6624097294637678592%29">succinctly</a></p><blockquote><strong>Teams choosing random delivery platform tools SOUNDS awesome, except when you are trying to make those pipelines safe, secure, auditable, and easy to train. Development teams should have good choices, but not choices for the sake of choice. Speaking as a long-time developer who now works in the delivery platform area for a Fortune 1 company, a centralized platform is a major advantage.</strong></blockquote><p>The flexibility needed in the dev team to build the cutting-edge product can be an overkill in the ops environment. As an example, imagine an organization where automation scripts were written in 5 different languages by different teams. It would be a nightmare to maintain those. On the other hand, <strong><em>completely locking down everyone into low code YAML style will also be counterproductive</em></strong>. So, as they say, the solution lies somewhere in the middle. More on this later when we talk about how we propose to solve this at Maira.</p><h3>Stakeholders and their expectations</h3><p>Once we realize that the dev, product and the ops team ‘together’ need to transition to a centralized platform to achieve agility and reduce chaos, the next problem is to get buy-in from each of those teams. Teams were working in silos mainly because there was nothing that provide the right set of dev environments and capabilities to do their job effectively. If this new shiny platform doesn’t fulfill the expectations of these stakeholders, it will fail. The Figure below shows each stakeholder’s persona and expectations from this platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ShraFfyuADAAuCsVyCeIA.png" /><figcaption>Stakeholders and their expectations from a centralized platform</figcaption></figure><p>Net net the only success criteria for the platform ops team is to<strong><em> </em></strong>get out of the way and still have the right controls and policies in place. Now <strong><em>each team has its own set of expertise levels in its domain but less in other functional areas</em></strong>. For example, in my last company, I observed that developers were quite comfortable in developing their micro-services but were struggling with operating those in the real world. Whenever those developers were called upon to troubleshoot something, available tools were not satisfactory or they lacked technical expertise. On the other hand, ops teams are happy automating day-to-day problems, but they don’t want to deal with ongoing maintenance of these scripts let alone be in charge of orchestration. Product teams on the other hand will be happy with a low code UI environment where they can automate tasks as business processes evolve. A centralized platform must deliver on this basic promise i.e., <strong><em>let</em></strong> <strong><em>each stakeholder develop in their ideal </em></strong>‘<strong><em>abstraction level</em></strong>’.</p><h3>Ingredients of centralized ops platform</h3><p>Platform-ops need to deliver multiple capabilities to their customers. Some of these are:</p><ol><li>A robust self-service environment with access control.</li><li>Easy CLI/UI to interact with system components</li><li>Dev environment (UI/IDE) and components for rapid automation.</li><li>Automation orchestration platform.</li><li>Alert, cost management, audit etc</li><li>Dashboard, command and control for ops team.</li><li>Automated code deployment and backoff (CI/CD)</li></ol><p>In the above list, items 1–6 are typical day 2 problems in ops world. We believe all of these can be solved by a platform built around workflow orchestration at the center. Such a platform must play nice with 3rd party tools and be able to deliver other items e.g., CI/CD, feature flagging etc. However, today <strong><em>writing apps from scratch are thing of the past</em></strong>. Modern workflow platforms like <a href="https://temporal.io/">Temporal</a> enable developers to develop sophisticated stateful automation on top. Earlier, writing such an app used to take multiple micro-services and various open source technologies working together.</p><p>Such a workflow platform at the core of the ops platform will ease many points and enable the ops team to deliver on their promise quickly. In rest of the blogs examine the requirements of such a platform in detail.</p><h3>Workflows are eating the world</h3><p>Well, the software is eating the world and <a href="https://venturebeat.com/programming-development/software-may-be-eating-the-world-but-low-code-could-eat-software/?">workflows are going to eat the software</a>, so it’s the same thing. But for that, the workflow need to graduate from a toy to a real dev platform. Let’s examine what should be the ideal composition of such a workflow platform that caters to disparate stakeholders as above. As we can see, the requirements are quite conflicting. for example:</p><ol><li><strong><em>Developers</em></strong> like the convenience and agility of ‘code’ to develop automation/workflows. They do not want to deal with UI, DAGs, or YAML. These tools are not meant for any automation with moderate to high levels of complexity. Expressing all intent through UI blocks is quite cumbersome, if not impossible. On the other hand using a general purpose language like Python entails higher maintenance cost which is hard to justify in budget constrained teams. In anycase whole idea of a workflow platform is to save on time and effort.</li><li><strong><em>Ops</em></strong> would like to automate, but do not want to deal with maintaining a large complex code base. This is also not only because great ops talents are hard to find, but also because ops teams’ focus is on running the system smoothly. Ideally, they need a no-code or low-code workflow solution, so the overall code base remains manageable.</li><li><strong><em>Product</em></strong> teams need an easy button. Their main objective is to gain periodic insight into customers, usage patterns etc. In general, they don’t want to deal with the code or operation.</li><li><strong><em>SecOps</em></strong> want to control all access to the system and write/modify scripts quickly to tackle day0 vulnerabilities.</li></ol><p>One common theme here is that none of the above stakeholders want to deal with orchestrating these automation scripts.</p><blockquote>No one wants to operate another app stack to operate the primary app stack.</blockquote><p>But the problem with automation in the Ops case is that the business logic <strong><em>cannot be expressed as simple monolith scripts</em></strong> <strong><em>or a fixed set of steps in the pipeline</em></strong>. They cannot be simple static DAGs because use cases are dynamic. As an example, if you want to detect and take actions on multiple pods based on a certain query, the targets are dynamic, based on the results of the query. Such logic is very hard to express as DAG (like available in <a href="https://airflow.apache.org/">Apache Airflow</a>) or as a sequence of commands in bash.</p><p>In addition, this automation need to be <strong><em>stateful</em></strong>. They cannot be meant to run to completion as monolith. This could be because of resiliency requirements around APIs or ‘<strong><em>human in loop</em></strong><em>’ </em>requirements. Resiliency is very important in automation, especially in a cloud environment where failure is assumed. We do not want scripts to fail at a random point and not be able to resume from where they left off. Often, humans need to be part of the automation so certain critical components are touched only with explicit approvals. Now if the developers only want to worry about business logic and not deal with a myriad of issues related to statefulness, vairable APIs SLAs or scheduling, a suitable workflow orchestration platform is needed. But most of the workflow platforms are meant to automate some simpler business tasks built on static DAGs. Those are not suitable for use cases of ops.</p><p>The ideal workflow platform for this environment is the one that allows writing business logic in a high-level language, as a code, while not worrying about resiliency and other aspects of the orchestration. <strong><em>Whether the business logic has a few quick steps or is meant to run for weeks (sometimes with humans involved), the developer need not code it differently</em></strong>. Without this capability, the development and orchestration complexity increase manyfold and eventually the project fails.</p><p>An ideal centralized platform will provide a workflow orchestration as a service and hide most of the app complexity discussed above. This way all stakeholders can only worry about ‘writing code’ and not about failures, error handling, approvals, databases, and so on. More on this in the next section.</p><h3>The complexity of workflow-based automation</h3><p>An automation/workflow is just not about writing code, it needs the entire backend infrastructure to run on. This backend is composed of many capabilities, integrations and features as shown in the Figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-4uvCzQOVY5CjYWm5ibDHQ.png" /><figcaption>Backend services needed for successful automation and orchestration</figcaption></figure><p>As we can see there are many behind the scene capabilities platform ops teams need to implement to productize this. Once such an infra is in place, everyone can be producing automation code and quite sophisticated applications in a self-service manner. As you can see, some of these backend components are similar to typical Backend-as-a-service platforms like firebase provide. In addition, to make the workflow and app development easier and <em>as a code,</em> we need a few unique capabilities. Let’s zoom in on some of those:</p><ul><li><strong>Stateful/fault tolerant</strong>: As any operator will tell you, scripts can often fail because of network, infrastructure or a bug. If the final goal is to replace humans with automation and have peace of mind, the script must be able to resume where it left off in case of failures. If not, the code you develop will be far more complex than just the business logic. For this, a modern workflow orchestration platform is needed. Some off-the-shelf ones are <a href="https://airflow.apache.org/">airflow</a>, <a href="https://aws.amazon.com/step-functions/">aws step function</a> can be looked at. Often these workflow platforms are not liked by developers because <strong><em>static DAGs </em></strong>and <strong><em>YAML-based</em></strong> approaches are not suitable for rapid development and dynamic workflows.</li><li><strong>Approvals/Human in the loop</strong>: More than ever before, cloud apps today have huge compliance requirements. Hence many times the automated actions need to be supervised/approved by humans before an action step can be executed. The problem is when the program has to wait for humans (sometimes up to a few weeks), they are prone to failures, especially in cloud environments. Stateful capability where a program can be suspended and resumed without losing any state is a must for this. <br><a href="https://temporal.io/">Temporal</a> is one of the leading workflow platforms that solve this problem of resuming a suspended workflow very well. It is a great tool both from scalability and resiliency perspectives.</li><li><strong>IAM</strong>: Fine-grained access control and auditing of every action taken on the platform is no longer just a ‘good-to-have’ feature. The cloud compliance requirements are business and legal imperative. A centralized platform must close all backdoors and use access control to limit each stakeholder in their sandbox. To deliver on this promise the platform must automatically record and block unwanted steps from the scripts as well as any manual accesses. High-level access control at the workflow level will not cut it in an environment where codes and steps in workflows are changing continuously.</li><li><strong>Cron</strong>: Long perpetually running scalable cron service is a powerful feature any workflow orchestration platform must support. This enables different stakeholders to automate and consolidate their <strong><em>periodic tasks such as cert rotation, periodic usage reports etc</em></strong>, on a common platform.</li><li><strong>Edge sites: </strong>Managing a fleet of edge sites is a complex problem. Not only the platform should manage connectivity etc to these edge sites, but computing should also be fungible from edge to a centralized location. Here edge could be a remote k8s environment (dev, prod, etc) in customer prem or it could be IoT devices spread around. Depending on the use case abstraction model will vary, but such a platform should include suitable building blocks to hide the complexity of dealing with remote edge sites. We will dive deeper into this in a separate post.</li><li><strong>Version control</strong>: Everything one automates must be easy to develop in a high-level language. Workflows<strong><em> developed in YAML or DAG cannot be version controlled effectively</em></strong>. Hence over time, it becomes unmanageable because changes across the versions are not trackable.</li><li><strong>Integrations: </strong>The workflow platform alone will not cut it for developers and product teams who want to develop something quickly. Such a platform must include a rich set of connectors and libraries. This will enable the entire team to focus on the app development at hand rather than worrying about basic building blocks. We will elaborate on this in a separate blog.</li><li><strong>Multi-channel access</strong>: The platform must allow everyone to use their favorite tool for interacting with services. Otherwise, users remain frustrated and the adoption suffers. Platforms worth their salt enable access to services from their favorite client, from <strong><em>slack, Unix terminal, and everything in between</em></strong>. This way various teams from remote to local can collaborate and develop without moving out of their comfort zone.</li></ul><h3>Build vs Buy</h3><p>A centralized platform will be built with tools from the open source or homegrown and/or commercial solutions. For the automation part, a robust workflow platform is a must which can be built from open source platforms like temporal. However, this is a significant development effort to bolt on security, version control, integrations, and a low-code environment on top of it. It could be beneficial for some large SaaS shops to pursue in-house development. There will be a significant initial investment just to develop such a platform. We know about a top SaaS shop where they have a <strong><em>50+ strong team</em></strong> <strong><em>to work on the automation platform alone</em></strong>. Given the expertise and product development risk involved, for most organizations, a commercial option like Maira should be considered before embarking on developing this in-house.</p><h3>Conclusion</h3><blockquote>The reality of the automation journey is very different from the initial expectations. In my experience, many automation and digital transformation projects fail because teams waste months trying to make disparate tools work together. The best is to start with a clear set of requirements and then put the correct infrastructure at the core. We at Maira believe that a system built around a suitable workflow platform can fulfill most of the automation and other requirements. As we demonstrated, <strong>a capable workflow platform, in reality, is a next-generation backend-as-service platform enabling easy and rapid app development</strong>. With the right programming abstraction and a rich set of integrations at their disposal, the entire organization can converge on a centralized platform. It also simplifies operational headaches for platform-ops teams as they need to operate only a few services. Alternatively, they can opt for a commercial SaaS solution like Maira to offload those operational overheads.</blockquote><p>In the digital-first world, everyone needs something from the production system. The best strategy is to be out of the way of stakeholders by adopting a self-service model. A centralized self-service platform around the workflow engine must be the starting point of this journey. It will go a long way in attaining 10x productivity gain without sacrificing adequate controls on the production system.</p><p>Congratulations! you made it so far. So, I encourage you to check out <a href="https://maira.io/">Maira</a>, a battery-included workflow platform purpose-built for dev and ops alike.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66cc03df5923" width="1" height="1" alt=""><hr><p><a href="https://medium.com/maira-io/why-a-self-service-workflow-platform-is-a-must-for-modern-ops-66cc03df5923">Why a self-service workflow platform is a must for modern ops</a> was originally published in <a href="https://medium.com/maira-io">maira.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Alert Fatigue: The Biggest Issue in Cloud Ops]]></title>
            <link>https://medium.com/maira-io/alert-fatigue-the-biggest-issue-in-cloud-ops-29581016e758?source=rss----f8d2f1946993---4</link>
            <guid isPermaLink="false">https://medium.com/p/29581016e758</guid>
            <category><![CDATA[alerts]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Sachin Bansal]]></dc:creator>
            <pubDate>Fri, 08 Jul 2022 17:52:37 GMT</pubDate>
            <atom:updated>2022-07-08T17:52:37.324Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*t_3Z7HZunWLluYWNt69SsA.png" /><figcaption>Manual Alert handling</figcaption></figure><p>Once a software application has been deployed, with CI/CD setup to upgrade it whenever a new version is available, the next step is to make sure that it keeps running properly. The developers like to know when unexpected events happen. The immediate solution is to start monitoring and raise alerts whenever anything unexpected happens. This can work for a small scale application, but as the scale grows, so do the number of alerts. For cloud based applications, with thousands (and sometimes, even <a href="https://medium.com/volterra-io/managing-thousands-of-edge-kubernetes-clusters-with-gitops-82121f97dfeb">millions of applications</a>), this problem will very quickly get out of control. This is also one of the <a href="https://medium.com/maira-io/beyond-ci-cd-top-10-challenges-in-operating-modern-cloud-applications-d984b9093ab3">top 10 DevOps problems highlighted in our previous post</a>.</p><p><a href="https://www.catchpoint.com/blog/sre-report-2021-the-highlights">SRE report 2021 by Catchpoint</a> highlights that most SREs spend more than 50% of their time on responding to alerts and that is mostly repetitive toil that we hope to avoid with automation. Lets look at the landscape of tools available in 2022 to deal with DevOps day-2 problems, particularly alert fatigue. We classify these tools in following types:</p><p><strong>1. Monitoring tools</strong></p><p>There are some very capable tools for monitoring applications. Open source tools like Prometheus can monitor k8s clusters and issue notifications of various events. There are SaaS tools like DataDog and Splunk that can do the heavy lifting of managing the monitoring service. Observability and dashboard are necessary but don’t help in resolution or actions.</p><p>While deciding which alerts to generate, usually we prefer to have more alerts rather than missing some signals. This results in excessive alerts and ends up exacerbating the problem. However, if most of these alerts are set up to be handled by an automated response, we can reduce this problem significantly.</p><p><strong>2. Incident tracking tools</strong></p><p>There also exist some great tools to track these alerts. This category includes tools such as Jira, Zendesk and Asana. These tools can manage who is assigned to handle each alert, how quickly the incidents are being resolved, and generate reports to see analytics on the incidents. But their automation is limited to managing tickets and consolidating information about the incident.</p><p><strong>3. Incident management tools</strong></p><p>These tools try to bring together the correct set of people to resolve each type of alerts Typically, such tools will try to create a “War room” by adding people who might be able to resolve the alert. They enable communication between those people over standard communication tools such as slack/teams. Some examples include Pager Duty and Splunk On-Call. While these tools can do a good job of bringing the right people together quickly, the resolution of alerts is still manually done for each alert.</p><p><strong>4. Home grown automation tools</strong></p><p>Many developers resort to writing their own automation tools using scripts or tools such as Ansible, python, etc. The main problem with such scripts is that they are hard to maintain because changing application code will mean more and more complex scripts. These scripts also cannot be run reliably across multiple installations. There is a need for a workflow orchestration system that can take these small scripts and run them across different installations in a fault tolerant manner. We will dig deeper into this topic and how Maira solves this problem in an upcoming blog.</p><p>Some larger companies have also attempted to create their own workflow automation system, such as Netflix’s <a href="https://netflixtechblog.com/introducing-winston-event-driven-diagnostic-and-remediation-platform-46ce39aa81cc">Winston</a>, which does solve the problem for some time but eventually cannot keep up with the pace of increase in complexity of the applications. Also, such tools are limited to the parent company. Most smaller companies will not have the resources to invest in developing and maintaining something like this.</p><p><strong>5. AIOps based automation</strong></p><p>Some solutions involve using AI/Machine learning to identify the root cause of an alert. The target problem for these solutions is alert correlation and not necessarily alert response. By finding correlations among alerts, they hope to identify the root cause. This is very useful information but is far from an automated alert response. These kinds of solutions are in their infancy and their effectiveness in finding the root cause is not yet demonstrated.</p><p><strong>6. Low Code/No Code automation</strong></p><p>Some newer solutions have proposed using drag-and-drop blocks to create automation workflows. The problem with this approach is that responding to an incident is usually a complex operation and the drag-and-drop blocks can only provide very simple solutions that may not be sufficient for more complex scenarios. In my experience, to successfully respond to an alert, we might have to interact with several services, taking the output from one, and transforming it to supply to another service. I believe we need to write entire response as code that can be maintained, peer-reviewed, stored, and tested like the rest of the code. Along with it, we need tools that can also show this as visual blocks that are easy to understand and make minor edits. We also need an orchestration system that can respond automatically with an appropriate response for each alert, taking care of errors, access control, and audit.</p><p><strong>Conclusion</strong></p><p>I would like to conclude by saying that there are many tools that help today’s DevOps engineers to operate the system. These tools help in the areas of monitoring, collaboration, and automation, but we need an automation system that can take sophisticated action for complex problems. Such a <strong>response-as-code model</strong> needs to be orchestrated by a system that can understand the details of installation and configuration of various applications and handle errors. This model has to be friendly to both developers and ops (including DevOps, SRE, SecOps, compliance, or any other similar roles). For that, it needs to be easy to maintain, enhance, verify, and at the same time easy to understand visually. In a future blog, we will explain how Maira solution takes care of these items.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29581016e758" width="1" height="1" alt=""><hr><p><a href="https://medium.com/maira-io/alert-fatigue-the-biggest-issue-in-cloud-ops-29581016e758">Alert Fatigue: The Biggest Issue in Cloud Ops</a> was originally published in <a href="https://medium.com/maira-io">maira.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond CI/CD: Top 10 challenges in operating modern cloud applications]]></title>
            <link>https://medium.com/maira-io/beyond-ci-cd-top-10-challenges-in-operating-modern-cloud-applications-d984b9093ab3?source=rss----f8d2f1946993---4</link>
            <guid isPermaLink="false">https://medium.com/p/d984b9093ab3</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[cloud-operations]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[workflow]]></category>
            <dc:creator><![CDATA[Ashish Ranjan]]></dc:creator>
            <pubDate>Thu, 23 Jun 2022 22:44:09 GMT</pubDate>
            <atom:updated>2022-09-22T00:02:51.107Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lZgfRNMHAEZNbtBNbTzMJw.jpeg" /><figcaption>Bandaid approach to cloud operations. (Source @sebiwicb)</figcaption></figure><p>The team at my last software startup was super excited to receive our first order to deliver a cloud networking solution to a couple of large SaaS providers. We quickly built the team and adopted best practices to deliver an MVP in 6 months. It took us another quarter to figure out the best DevOps practices for integration and deployments (CI/CD). The real challenge began from there on in supporting the operations of the solution for the next 2 years.</p><p>Most modern app stack consists of a large number of moving parts deployed in a public and private cloud. As applications grow in scale and complexity, the operational challenges become unmanageable. The scarcity of talent pool doesn’t help either.</p><p>Irrespective of the size of an organization, this is the story every team working on cloud applications experiences. While day-1 is about app deployment, scaling and adopting best CI/CD practices, the day-2 challenges take up the major part of a solution’s lifecycle. There are proven tools (CircleCI, Jenkins, etc) available to tackle day-1 problems, <strong><em>day 2 challenges</em></strong> revolve around the skills, knowledge, activities, and operational practices. These include concerns, such as the 24x7 support coverage, remote teams, database of FAQs, and other operation policies. The day-2 challenges impact the solution in optimal resource use, better performance, compliance, high availability, scalability, incident management, rca/post-mortem, maintaining high security, and low cost. <strong><em>Adding layers of teams to solve these often makes the problem worse</em></strong> and create silos.</p><p>In this article, we highlight top<strong><em> day-2 challenges</em></strong> of ops teams. In subsequent blog we will dive deeper into best practices and solutions to these challenges.</p><h4><strong>1. Got alerts?</strong></h4><p>The best time to contain an incident is before it happens. As a solution grows in size, so does the number of alerts. Every alert is not an incident, but they point to something not performing as expected. When a large number of smaller alerts are ignored, they result in major, critical, or even showstopper incidents.</p><p>The obvious solution to tackle these swarms of alerts is by automating the response. Often the homegrown solution fails to meet expectations due to various factors. One of many problems in this area is the need of developing the code from the ground up. This results in complex code and operational complexity. The current set of tools is completely inadequate for modern applications. We will dive deeper into this topic in upcoming blogs to explain how Maira can help in addressing this.</p><h4><strong>2. Everyone must contribute code</strong></h4><p>The distinction between the ops and the development team is blurring. Often developers are also responsible for operations giving rise to <strong><em>NoOps</em></strong> orgs. On the other hand, ops are asked to be more like a developer and deliver software features.</p><p>In a typical SaaS application, many business-critical features do not get prioritized by the development team. Examples of such features are <strong><em>customer onboarding, usage metrics, analytics, billing, cost, compliance, growth, </em></strong>and so on. Ops teams are capable and willing to deliver these features, but often struggle to keep up with evolving requirements, existing SLO targets, and operating these so called micro-apps.</p><p>It is imperative to empower the available talent pool so they can deliver features/capabilities to help in product growth. We will dive deeper into this problem and discuss how Maira could help ops teams to deliver mission-critical apps, with the least operational overhead.</p><h4><strong>3. Automation ≠ Scripts</strong></h4><blockquote>“The most powerful tool we have as developers is automation.” — Scott Hanselman</blockquote><p>Automation is an integral part of any Ops organization worth the salt. As software systems scale out, the volume of operational work increases, demanding the Ops team to automate more and more tasks. In an Ops environment, successful automation is not only about scripting business logic in your favorite language like Python, bash or ansible. Modern Ops engineers are fully capable of developing such scripts. The main challenge is in <strong><em>stateful orchestration, integration libraries, maintenance, audit trails and eliminating knowledge silos</em></strong>. Solving these problems requires substantial investment, which only a large established SaaS shop can afford.</p><p>Automation is the answer and is widely accepted as a critical differentiator for the business. This is why organizations are heavily investing in large-scale <strong><em>digital transformation</em></strong> projects to streamline day-2 operations. They are looking to understand what it takes to run modern apps, automate repetitive tasks, integrating with existing apps/tools, control cost, reduce downtime etc. In upcoming blogs, we dive deeper into why the current set of tools often fail to keep up and how we can help in this journey.</p><h4>4. New month, new billing surprise!</h4><p>Due to the economies of scale cloud infrastructure has become cheaper. However, organizations operating in the cloud see their cloud spending increasing over time. Since cloud resources are available infinitely on demand, software teams do not use the resources optimally. Also, they are more likely to ignore the recycling of the provisioned resources. Such unused resources incur unnecessary costs.</p><p>Without the help of specific tools, the ops team will not be able to keep track of these unused cloud resources, especially across multiple external and internal environments. Often, teams end up <strong><em>spending on yet another tool to manage this spending problem</em></strong>. But such out-of-box tools often don’t meet the site specific requirements and/or are unaffordable.</p><h4><strong>5. Can you do this one more thing?</strong></h4><p>As operations teams juggle between playing gatekeeper to the production environment and keeping the application running smoothly, they also field many ‘friendly’ requests from developers, product teams and other stakeholders. The developers often need to get insights and information about the running software applications for optimization and problem resolution. Blocking out access to production for developers, create yet another task for ops.</p><p>One problem in particular with logs/metrics. Typically, these logs are accumulated in log collection systems. While products like Datadog and Splunk have made the analysis process much easier, having many types of logs could still be overwhelming. Many times developers need to get <strong><em>granular data in real time</em></strong>, and <strong><em>observe real-world behaviors in case of noisy neighbors</em></strong> and other <strong><em>application dependencies</em></strong>. Therefore, the ops team needs to enable self-service capabilities for developers, while maintaining the command and control. This way all dev and product stakeholders can adapt to their changing needs.</p><h4><strong>6. Janitorial jobs.</strong></h4><p>Many organizations have established operational policies for security and compliance. Taking <strong><em>periodic backups, security audits, vulnerability scans, token rotation, password expiry policies</em></strong>, etc, are examples of such activities. With so much firefighting going on, or when the team member departs, often these fall through the cracks.</p><p>The best approach is to use appropriate tools to schedule these periodic activities. This way over time the automation can keep up with changing compliance and security requirements at a central place, and not drop the ball.</p><h4><strong>7. Where is my subject matter expert?</strong></h4><blockquote>“People should understand shared goals. The sort of closed, need-to-know thinking gets in the way of product and technical delivery. Everyone should know how systems work if they are interested.” — Liz Warner</blockquote><p>Cloud apps are composed of many layers such as databases, storage, APIs, k8s etc. No one person can build an in-depth understanding of all these components in the system. Therefore, Ops teams are often structured based on knowledge and expertise in different segments and are augmented with representatives from dev teams.</p><p>While this segmentation helps the team build deep expertise in individual functions they could gradually lose the visibility of the big picture<strong><em> </em></strong>and<strong><em> tribal knowledge </em></strong>proliferates. Then, each team member approaches a problem with his or her perspective only. Troubleshooting becomes quite cumbersome as people with different expertise have to be called upon for analyzing each aspect of the problem. This problem is further exacerbated by global remote teams. This could even cause friction among the team members leading to dysfunctional silos.</p><h4><strong>8. Got compliance?</strong></h4><p>SaaS services have strong requirements for compliance and auditability. Ops needs to follow best practices in production concerning <strong><em>access control, approval process and audit.</em></strong> We discussed earlier that a small ops team cannot be effective unless it deploys a <em>self-service environment </em>for developers and product teams. Access control (<strong><em>rbac, pbac</em></strong>) is essential for any such <em>shift- left</em><strong><em> </em></strong>system in place. Without that one cannot have complete visibility, auditability and granular control in the production system. Any compromise on this will lead to business impact and in the worst-case legal troubles.</p><h4><strong>9. Rise of remote first teams</strong></h4><p>In this age of great resignation, teams are scrambling to hire talent wherever available. Ops require 24x7 coverage so any solution around tools, practices and policies must be adopted globally for these remote workers. However, the reality is that often, a single central team holds the command, control, and accountability as the right tools are not in place to contain major screw-ups. This <strong><em>reduces the effectiveness of the distributed team and makes them reactive to the commands of the central team</em></strong>. The intent of accountability seems to impact the coverage aspect negatively for the operations teams. There is a pressing need to bridge the gap between central and remote team members.</p><h4><strong>10. It’s a multichannel world</strong></h4><p>As highlighted earlier, there are strong requirements to keep the production environment guarded. Often this means limiting access to people and tools. This in turn means a loss of productivity for both ops and developers which in turn defeats the shift-left goals. An ideal environment will allow access to the production environment from <strong><em>multiple channels, be it WebUI, a terminal, favorite chat tools or other applications</em></strong> while not compromising on centralized command and control (rbac). Enabling such an environment is quite challenging and requires a ground up thinking.</p><h4><strong>Conclusion</strong></h4><p>Ops play critical role in success of modern applications. The team can be effective only with suitable tools at their disposal to help mitigate above challenges.</p><p>The bulk of the Ops work is involved with Day 2 operations. Also, Day 2 operations pose some tough challenges to the team. These challenges may not be obvious, especially in the early days of a software application. A push on the skills enhancement, right tools, developer mindset, more proactiveness towards automation, and appropriate distribution of accountability and responsibilities can help in addressing many of these challenges. In upcoming posts, we hope to dive deeper into each of these challenges so it will help you to work out the best solution for your context. Stay tuned…</p><h4>References</h4><ol><li><a href="https://assets-global.website-files.com/610d78d90f895fbe6aef8810/6229b11eb0045f03f95b47a2_6227b0037ace3a25ba614a5b_Catchpoint-2021-SRE-Report-210004-v3.pdf">2021 SRE report: SRE activity breakdown and other topics</a>.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d984b9093ab3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/maira-io/beyond-ci-cd-top-10-challenges-in-operating-modern-cloud-applications-d984b9093ab3">Beyond CI/CD: Top 10 challenges in operating modern cloud applications</a> was originally published in <a href="https://medium.com/maira-io">maira.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>