<?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[Mr. DevOps - Medium]]></title>
        <description><![CDATA[Opinions on DevOps, SRE, Continuous Delivery and Lean practices in Software Development - Medium]]></description>
        <link>https://medium.com/mr-devops?source=rss----688a4280e10c---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Mr. DevOps - Medium</title>
            <link>https://medium.com/mr-devops?source=rss----688a4280e10c---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:26:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/mr-devops" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Kubernetes – the Necessary Evil]]></title>
            <link>https://medium.com/mr-devops/kubernetes-the-necessary-evil-711eb7cb36fd?source=rss----688a4280e10c---4</link>
            <guid isPermaLink="false">https://medium.com/p/711eb7cb36fd</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[complexity]]></category>
            <dc:creator><![CDATA[Jon Arild Tørresdal]]></dc:creator>
            <pubDate>Thu, 19 Nov 2020 14:47:42 GMT</pubDate>
            <atom:updated>2020-11-19T14:57:08.102Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*le_vQ1A9aNugGN5Dsr97cA.jpeg" /><figcaption>Digital Chalk and Charcoal Drawing of a Helmsman by Charles W. Bailey, Jr.</figcaption></figure><blockquote>A necessary evil is an evil that someone believes must be done or accepted because it is necessary to achieve a better outcome — especially because possible alternative courses of action or inaction are expected to be worse.</blockquote><blockquote>— Wikipedia</blockquote><p>I have been creating, automating, running, maintaining and supporting multiple incarnations of Kubernetes clusters, on multiple cloud providers since 2015. Two things are crystal clear to me — both of these statements are equally true:</p><blockquote>Kubernetes is a brilliant container and hosting platform, enabling innovation and acceleration previously unseen on any other platform</blockquote><p>And</p><blockquote>Kubernetes is neither simple, easy to learn or a perfect container solution in any aspect</blockquote><p>Over the last six years I have consulted for and been hired by companies mainly because of my knowledge of Kubernetes and DevOps. None of these companies was running Kubernetes before I came in, and most (if not all) of them expected me to implement and introduce them to Kubernetes. That is not what I did.</p><h4>I never recommended any company to start using Kubernetes. On the contrary. I recommended all of them not to!</h4><p>Still, all of them are running Kubernetes clusters today. All initially configured by me(!). So what went wrong? Why the resistance to adopting Kubernetes? And why did I end up doing it anyway?</p><p>The recommendation I gave was to use native cloud services and aim for serverless. From a development point of view, what do we want for hosting our systems? As one of my co-workers put it:</p><blockquote>I just want to drop my code somewhere, and have it work.</blockquote><p>My recommendation (and probably everyone else) is basically starting at the top of the cloud service model:</p><ol><li>Is there a trusted, known <strong>SaaS service</strong> with a vibrant community that solves the business needs we have? Adopt it!</li><li>Is there a stable, well maintained and actively used <strong>PaaS service</strong> with good support for Infrastructure as Code and Continuous Delivery, that solves the technical and business needs we have? Adopt it!</li><li>If none of the above, use Kubernetes</li><li>If you have still not found a proper solution and are considering using <strong>IaaS</strong>— start over or re-architect your solution</li></ol><p>For simple self-contained applications and services the above is quite simple and straight forward. More complex applications on the other hand, often referred to as <em>systems</em>, it is another matter. These <em>systems</em> often require another degree of flexibility which is hard to accomplish with SaaS or PaaS services alone. This is where Kubernetes shines!</p><h4><em>Kubernetes allows for enormous flexibility — but it comes at a cost. The cost is complexity.</em></h4><p>Complexity is expensive and you never start from scratch with lots of complexity. It gradually sneaks up on you over time. It happens so slowly you hardly notice. And when you do notice some symptoms, they can easily be explained individually.</p><p>More alarming is that complexity hides itself — as a <em>hidden cost</em> — which does not appear on the monthly invoice. It is hidden inside work hours, research, courses, conferences, maintenance, updates and bugs.</p><h4>To make matter worse, developers are completely and utterly incapable of explaining complexity as a hidden cost to anyone other than developers.</h4><p>Decision makers in upper management have no idea, even though we complain about it all the time. Often by using words like Legacy, Technical Dept and so on. As developers we accept this added complexity (and cost), even if it is mostly unknown to us, in favor of the added benefit of flexibility.</p><p>It is hard to explain, but as developers we do have a sense of this complexity, even though we are not able to articulate it very well and come up with exact numbers of how expensive it is. As to how much complexity we can accept, depends on the flexibility we get and the possibilities it enables. It also depends on how we manage this complexity. Kubernetes leans itself very well to automation, which is one technique to control complexity.</p><h4>Does the added flexibility outweigh the complexity in Kubernetes?</h4><p>I believe the short answer is YES, but it requires effort. To take advantage of the flexibility it will require a great deal of investment into the platform, available tooling and processes. If you use Kubernetes “out of the box” without focusing on these aspects, the answer will most certainly be NO.</p><p>A strategy I have used successfully is creating small, purpose built clusters, instead of big multi-purpose clusters. There are two main benefits with this strategy:</p><ul><li>dev teams can mostly manage their own cluster (build-it, run-it, own-it)</li><li>the complexity is made manageable through automation</li></ul><p>An example of such cluster is one specifically designed and automated to serve web API’s. A cluster where the creation of DNS records, TLS certificates, routing and authentication are all automated. Add a GitOps process on top of that to automate configuration changes and simplify deployment, and it makes adding new APIs to the cluster a trivial task.</p><p>If you decide not to invest in automation, tools and processes, everyone using the cluster must have a detailed understanding of the Kubernetes specific architecture involved and how to configure it. They need to understand exactly how to direct traffic, secure the communication and more. This adds complexity and cost. Not to mention the added time spent learning these details and all the misconfigurations and failures it can cause. The overall complexity will grow over time and most likely increase to a level which will outweigh the flexibility.</p><p>In my experience it works well to have an SRE or DevOps team to create the automation for these purpose built clusters, as they typically have a deeper understanding of the inner workings of Kubernetes, networking and other aspects less familiar to the average developer. By creating for instance Terraform modules for different types of clusters, each dev team can own and manage everything built on top of this architecture.</p><p>This automation does not come cheap and requires investment in time, knowledge and tools to find good solutions. Very often this does not get priority, because of the extra effort required, and the easy-fix, less time consuming solutions gets priority instead. This is the recipe for added complexity and a secure path to a infrastructure nightmare. There is no compromise here if you want to avoid complexity in the long run.</p><h4>Conclusion</h4><p>Someone will not agree with me. But if you conclude that your system would benefit from the flexibility provided by Kubernetes, be prepared to have your organization invest the necessary time to acquire and learn the skills needed to manage Kubernetes properly. Always prioritize to automate and simplify the adoption and usage of your clusters. Consider building purpose built clusters to simplify usage and prevent building up complexity which will outweigh the flexibility you came for in the first place.</p><p>Others will agree with me and know how people utilize Kubernetes and what is possible to accomplish, is rapidly changing and evolving. It is probably no other platform out there where we see so much innovation going on at the moment. In order to take full advantage of the benefits of Kubernetes, make sure your organization is equipped and ready for this rapid platform evolution.</p><p>Really it is not fair to call Kubernetes evil — and it is not in a direct sense. It is a fantastic platform and I love working with it! I do however think the definition of “a necessary evil” is spot on with regards to Kubernetes. Not because of Kubernetes itself, but because of the underestimated complexity it brings with it if not handled properly.</p><p>Rather than using services from cloud providers, where you need to consider the implications of lock-in and lack of flexibility, it often makes sense to go with Kubernetes.</p><p>You always know best what works in your environment. I only talk from my experience in the environments I have frequented.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=711eb7cb36fd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mr-devops/kubernetes-the-necessary-evil-711eb7cb36fd">Kubernetes – the Necessary Evil</a> was originally published in <a href="https://medium.com/mr-devops">Mr. DevOps</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[40% of IT projects fail to predict their future]]></title>
            <link>https://medium.com/mr-devops/40-of-it-projects-fail-to-predict-their-future-a1301e29fa71?source=rss----688a4280e10c---4</link>
            <guid isPermaLink="false">https://medium.com/p/a1301e29fa71</guid>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[estimates]]></category>
            <category><![CDATA[failure]]></category>
            <dc:creator><![CDATA[Jon Arild Tørresdal]]></dc:creator>
            <pubDate>Tue, 17 Nov 2020 19:09:07 GMT</pubDate>
            <atom:updated>2020-11-18T14:43:41.294Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*NikqVN-4n1T4j7xR.jpg" /><figcaption>Two Children and Crystal Ball,” photograph by Reuben Goldberg, ca. 1954; courtesy of the Penn Museum.</figcaption></figure><p>I have read many books and articles over the years on the topic of IT-project failures. What puzzles me is statements like:</p><blockquote>On average, large IT projects exceed budgets by 45 percent and time estimated by 7 percent but only deliver 44 percent of their predicted value.</blockquote><blockquote>— <a href="https://www.mckinsey.com/business-functions/digital-mckinsey/our-insights/delivering-large-scale-it-projects-on-time-on-budget-and-on-value">Joint study from 2012 by McKinsey &amp; Company and University of Oxford</a></blockquote><p>Or:</p><blockquote>According to an IBM study, only 40 percent of projects have accurate schedules and budgets and deliver their expected quality.</blockquote><p>When those statements and the research behind it was conducted they had two choices:</p><ol><li>look at why so many projects did not meet their goals</li><li>or look into why the goals failed to accurately predict the complexity of the projects</li></ol><p>They obviously choose the first one. I want to focus on the second.</p><p>Budgets, estimated time and estimated value are exactly that; estimates or predictions if you want. Based on currently available information, people are doing a best effort to predict time/cost and value, which will be the basis for a budget and expected outcome. If projects fail to meet these expectations within a threshold, they would be characterized as failed. I wonder what really failed? The estimates and expected outcomes, or the project?</p><p>The traditional reaction to failed projects is:</p><blockquote><em>Next time we will be better at estimating</em></blockquote><p>What you are really saying is:</p><blockquote><em>Next time I will try to do a better job at predicting the future</em></blockquote><p>To use the example from earlier you could turn it around and say:</p><blockquote>On average, large IT-projects manage to predict real cost in 55 percent of the cases, impressively 93 percent are delivered on time and 66 percent meet their predicted value.</blockquote><p>You could continue to go even deeper into the analysis of these numbers, but the point I am trying to make is that these numbers have no real value at the end of a project.</p><h4>That somebody predicted something in the past, that did not turn out to be accurate, should not come as a surprise.</h4><h3>So why do we keep doing this exercise over and over, and keep expecting different results?</h3><blockquote><em>The definition of insanity is doing the same thing over and over again and expecting a different result.</em></blockquote><blockquote><a href="https://quoteinvestigator.com/2017/03/23/same/"><em>— Maybe a quote by Albert Einstein</em></a></blockquote><p>It may not come as a surprise to you that I believe, and have experienced first hand, that spending time on doing estimates is a waste of everyone&#39;s time and effort and nothing good comes out of it. Focus on creating value, not predicting the future!</p><p><em>Note: I do believe there is value in somebody using their experience and knowledge to give a ballpark size/complexity estimate on a high level, to increase the likelihood of not creating something that will never create a profit. What I’m totally against is structurally using estimates on every small task, accumulate these together into a big estimate and a release date of a project, or for a Scrum sprint for that matter. This is what we learned NOT TO DO with waterfall back in the </em>20th century<em>. I refuse to go back there!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1301e29fa71" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mr-devops/40-of-it-projects-fail-to-predict-their-future-a1301e29fa71">40% of IT projects fail to predict their future</a> was originally published in <a href="https://medium.com/mr-devops">Mr. DevOps</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Azure Key Vault to Kubernetes]]></title>
            <link>https://medium.com/mr-devops/introducing-azure-key-vault-to-kubernetes-931f82364354?source=rss----688a4280e10c---4</link>
            <guid isPermaLink="false">https://medium.com/p/931f82364354</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[keyvault]]></category>
            <category><![CDATA[azure-key-vault]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[vault]]></category>
            <dc:creator><![CDATA[Jon Arild Tørresdal]]></dc:creator>
            <pubDate>Mon, 11 Mar 2019 12:57:57 GMT</pubDate>
            <atom:updated>2019-05-10T07:15:24.632Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B5bVV_mWpFMFwEFn.jpeg" /><figcaption>The bank vault in NoMad Downtown LA. Image by Benoit Linero.</figcaption></figure><blockquote>We created the <a href="https://github.com/SparebankenVest/azure-key-vault-to-kubernetes">Azure Key Vault to Kubernetes</a> project as a way for us in <a href="https://www.spv.no/english?WT.svl=topp_global_english">Sparebanken Vest</a> (Norwegian bank) to handle <a href="https://azure.microsoft.com/en-us/services/key-vault/">Azure Key Vault</a> secrets securely in Kubernetes. It made perfect sense to us to open-source this project, as it is not our core business. Hopefully others can find it useful too.</blockquote><p><a href="https://github.com/SparebankenVest/azure-key-vault-to-kubernetes">Azure Key Vault to Kubernetes</a> has two components that can be installed and run in the same cluster, or installed as single entities:</p><ul><li>Azure Key Vault Controller —synchronize Azure Key Vault secrets into native Kubernetes secrets, and keeps them updated</li><li>Azure Key Vault Env Injector — transparently inject Azure Key Vault Secrets into applications running in Kubernetes containers, without revealing its content to Kubernetes resources, Etcd or its users</li></ul><p>The recommendation is to have both installed, enabling native Kubernetes secrets when needed and transparently injecting environment variables for all other cases.</p><p>Another recommendation is to have a dedicated Azure Key Vault per Kubernetes cluster, and to store all secrets there and not in Kubernetes.</p><h3>Authentication and Authorization</h3><p>Having a dedicated Azure Key Vault per Kubernetes cluster also aligns with how authentication works with Azure Key Vault. By default it uses the same Service Principal that Kubernetes use when provisioning resources in Azure, like Load Balancers and VM’s. <a href="https://github.com/SparebankenVest/azure-key-vault-to-kubernetes#authorization">Explicit authorization</a> for Azure Key Vault must still be configured before the components will be able to access secrets. For details and other options for authentication, see the <a href="https://github.com/SparebankenVest/azure-key-vault-to-kubernetes/blob/master/README.md#authentication">project documentation</a>.</p><h3>Why not use Azure Key Vault directly from the Application?</h3><p>It is definitely possible and unfortunately quite common. The downside is a direct dependency to Azure Key Vault from the application, which locks the application to an environment where Azure Key Vault is available.</p><p>Adhering to the 12 Factor App, secrets is config, and should be injected into applications using environment variables. They are a language- and OS-agnostic standard. (ref 12 Factor App: <a href="https://12factor.net/config">https://12factor.net/config</a>)</p><h3>Trying out the Azure Key Vault Controller</h3><p>By using the Controller, Azure Key Vault secrets gets synchronized to Kubernetes as native Kubernetes secrets.</p><p>In the example below, a Azure Key Vault certificate with an exportable key, gets synchronized as a Kubernetes TLS secret by defining a AzureKeyVaultSecret resource like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/55e92667f19a6974d321b11a8b7582c1/href">https://medium.com/media/55e92667f19a6974d321b11a8b7582c1/href</a></iframe><p>Things to note:</p><ol><li>The Azure Key Vault object type is certificate</li><li>The Kubernetes output type is kubernetes.io/tls</li></ol><p>When applying the above resource to Kubernetes, a native Kubernetes secret gets created by the Controller:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14bfdabd6ed4e37092eb6cf273613759/href">https://medium.com/media/14bfdabd6ed4e37092eb6cf273613759/href</a></iframe><h3>Trying out the Azure Key Vault Env Injector</h3><blockquote>Working for a Norwegian bank, security is top priority. Certain secrets are so sensitive that no-one should be able to read its content. This is problematic in Kubernetes, as all secrets are plain text (base64 encoded).</blockquote><blockquote>Even though locking down and hiding secrets from users is possible in Kubernetes, it adds complexity and reduces agility. We’ve found that using Azure Key Vault together with the Env Injector allows us to completely lock down certain secrets only allowing the application access.</blockquote><p>Three things must be present in Kubernetes to transparently inject environment variables from Azure Key Vault into applications:</p><ol><li>The Azure Key Vault Env Injector</li><li>A AzureKeyVaultSecret resource definition</li><li>An environment variable with a placeholder pointing to the AzureKeyVaultSecret resource above</li></ol><p>Using the same example as with the Controller where the Azure Key Vault secret is a certificate with an exportable private key. The AzureKeyVaultSecret will be reused, but the output section is removed, since this is not needed by the Env Injector:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/36a4862c0cb3bbb6c4c98c8068abd164/href">https://medium.com/media/36a4862c0cb3bbb6c4c98c8068abd164/href</a></iframe><p>Reference the AzureKeyVaultSecret using its name, from an environment variable inside the container spec:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6b85d721ca03674fea16d9faf335464d/href">https://medium.com/media/6b85d721ca03674fea16d9faf335464d/href</a></iframe><p>Note how a “query string” is used to retrieve the private/public keys from the Azure Key Vault secret.</p><p>That’s it! The content of the secret in Azure Key Vault will now be injected into the application through the environment variables MY_PUBLIC_KEY and MY_PRIVATE_KEY.</p><blockquote>The really cool thing about this solution is that Kubernetes (and its users) can only see the placeholder for the secret, not the secret value. The secret value is ONLY available INSIDE the application.</blockquote><h4>Chasing the secret inside Kubernetes</h4><p>Is the secret only available to the application? Are you sure about that? How about the env section of the container spec after the Pod is provisioned?</p><pre>$ kubectl get pods my-pod-77cb7d647-gx68n -o yaml</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec23263d791b981d99fa08b2301c6559/href">https://medium.com/media/ec23263d791b981d99fa08b2301c6559/href</a></iframe><p>How about listing environment variables after exec into the container?</p><pre>$ kubectl exec -it my-pod-77cb7d647-gx68n /bin/sh</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/501d6d968812b386bc10fd29417247e0/href">https://medium.com/media/501d6d968812b386bc10fd29417247e0/href</a></iframe><p>So yes, the secret is ONLY visible to the application.</p><h4>What is going on under the hood?</h4><p>Diving straight to code, this is the magic sauce:</p><pre>syscall.Exec(binary, os.Args[1:], environ)</pre><p>The code above is from an application that is part of the Azure-Key-Vault-to-Kubernetes project, called azure-keyvault-env, and resposible for these key tasks:</p><ol><li>Extract any environment variables containing the value &lt;something&gt;@azurekeyvault</li><li>Look up AzureKeyVaultSecret resources identified in 1.</li><li>Download secrets from Azure Key Vault using information from 2.</li><li>Add secrets as environment variables to the environ map in the code above</li><li>Execute the original application found in the container, injecting environment variables from 4.</li></ol><p>For this to work the azure-keyvault-env application gets injected into the container and takes the original application’s place. The big question is then: How does the azure-keyvault-env application get injected into the container?</p><p>The short answer is through a Kubernetes <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/">init-container</a> after being configured in the Pod by a <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/">Kubernetes Mutating Admission Webhook</a>. For further details, read <a href="https://github.com/SparebankenVest/azure-key-vault-to-kubernetes#how-it-works">how in the documentation</a> and check out the code for these two components: <a href="https://github.com/SparebankenVest/azure-key-vault-to-kubernetes/tree/master/cmd/azure-keyvault-env">azure-keyvault-env</a> and <a href="https://github.com/SparebankenVest/azure-key-vault-to-kubernetes/tree/master/cmd/azure-keyvault-secrets-webhook">azure-keyvault-secrets-webhook</a>.</p><h3>Summary</h3><p>By providing these two tools to the community, secret management just got easier, more convenient and secure, by combining Kubernetes with Azure Key Vault.</p><p>If native Kubernetes secrets is needed, the Azure Key Vault Controller elegantly synchronize the secrets and add nice features like automatically convert Azure Key Vault certificates to TLS secrets in Kubernetes. At the same time, users can take advantage of all the features in Azure Key Vault, and feel confident that all secrets will sync nicely to Kubernetes if needed.</p><p>When it comes to the Env Injector, it is a pretty cool solution to transparently inject Azure Key Vault secrets to applications that way. Even cooler is the fact that the application is the only one that can see the secret!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=931f82364354" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mr-devops/introducing-azure-key-vault-to-kubernetes-931f82364354">Introducing Azure Key Vault to Kubernetes</a> was originally published in <a href="https://medium.com/mr-devops">Mr. DevOps</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[If you still insist on feature branching, you are hurting your business and our profession]]></title>
            <link>https://medium.com/mr-devops/if-you-still-insist-on-feature-branching-you-are-hurting-your-business-and-our-profession-32e1109d4594?source=rss----688a4280e10c---4</link>
            <guid isPermaLink="false">https://medium.com/p/32e1109d4594</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[lean]]></category>
            <dc:creator><![CDATA[Jon Arild Tørresdal]]></dc:creator>
            <pubDate>Mon, 13 Mar 2017 17:09:05 GMT</pubDate>
            <atom:updated>2017-03-14T09:44:15.287Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*yT93zP9z5nFEMPvnvkGUzw.jpeg" /><figcaption>Indian Elephant Postcard <a href="http://www.delcampe.net/">www.delcampe.net</a></figcaption></figure><blockquote>The way our industry is using feature branching is hurting the quality, speed and agility of software development. As a profession we need to let go of our religious believes towards feature branching and stop adopting certain vendor tools that accelerate this downward spiral. Please stop, raise your eyes and point out the elephant in the room.</blockquote><p><em>Note: I decided to keep the context of this article to co-located teams. I believe the general principals also apply to open source projects and distributed teams, but those different contexts would need its own explanations (maybe in a future article).</em></p><p>I know these are bold statements, but it is time to speak up. Far too often feature branching is THE biggest bottleneck in the pipeline to production. Teams working towards increased deploy frequency, faster feedback loops and better quality cannot afford to batch their work into long-lived branches. Long-lived being more than one day.</p><p>The drawbacks of batching was proven by Toyota back in the 1950&#39;s and 60’s and detailed by <a href="https://en.wikipedia.org/wiki/Taiichi_Ohno">Taiichi Ohno</a> (1912–1990) in his book <em>Toyota seisan hoshiki (1978), </em>or<em> </em><a href="http://a.co/3BW8Czm"><em>Toyota Production System</em></a><em> (translated 1988)</em>. Today known as Lean Manufacturing. Later proved to <a href="https://en.wikipedia.org/wiki/Lean_software_development">also apply to software development</a>, and is today one of the core principles of DevOps.</p><h3>What is wrong with feature branching?</h3><blockquote>In theory there is nothing wrong with feature branching. It is the way most teams practice feature branching that is problematic.</blockquote><p>The common practice is to accumulate or batch work into long-lived branches without integrating with trunk frequently enough.</p><p>Proper use of feature branching would be to practice <a href="https://mrdevops.io/continuous-integration-ci-is-that-what-were-doing-e3137dfd39fd#.qd1n30d5z">continuous integration</a> as it was intended, by integrating your feature branch to trunk at least once per day. In my 20-odd long career, I have still not come across a team doing that.</p><blockquote>In my work I see teams either doing long-lived feature branches or no feature branching at all – frequent integration of feature branches is not common practice.</blockquote><p>So what are the consequences of doing long-lived feature branches?</p><ol><li><strong>We delay integration and hinder communication</strong> — basically we opt out of continuous integration</li><li><strong>No integration between feature branches</strong>, unless feature branches explicitly pull from each other, which is not a common practice. This is what Martin Fowler calls <a href="http://martinfowler.com/bliki/FeatureBranch.html">Promiscuous Integration</a> (3rd sub-chapter).</li><li><strong>When we merge, we introduce many changes at once (large batch)</strong>, which can be disruptive and in general harder to find and fix issues because of the amount of changes introduced. With Lean its proven that adding small changes incrementally over time is much more effective and provides better quality than batching work.</li><li><strong>We opt out of the other practices of continuous integration</strong>, like automated build, test, performance and security testing. Even though it is possible to have these performed on a branch, the value is limited, since it is not integrated with everything else.</li><li><strong>We delay internal feedback loops.</strong> Only when pulling from trunk will we locally integrate with outside changes. Note that even if we did pull from trunk on a regular basis, it is only internal to us — nobody else knows about our work.</li><li><strong>We delay external feedback loops.</strong> Only when we merge with trunk will others be able to see and integrate with our work, and get actual feedback from the integration.</li><li><strong>We exponentially increase merge complexity</strong> and increase the likelihood of creating conflicts with every new living branch</li><li><strong>We tend to avoid refactoring</strong> in fear of merge conflicts — which prevents paying down technical debt</li></ol><h3>Feedback, feedback, feedback</h3><p>A common theme here is missing out on feedback. Often, missed feedback opportunities include valuable information that you could have used to make better decisions, preventing rework. Everyone and everything outside our batch will not see any changes before they all arrive at once, missing potentially valuable information that could have influence their decisions on their work.</p><p>Only when we merge a feature branch will we get feedback on the result of the integration. If it did not work out as expected, it is often too late, too much or both — to do something about. This is wasteful if we could have done something about it earlier, but actively (or passively) put ourself in a position where we could not.</p><h3>Common efforts to improve feature branching</h3><p>I’ve seen many attempts to work around the consequences listed above. Most commonly:</p><ul><li>Pull and merge to/from feature branches frequently</li><li>Setup “continuous integration” for every branch</li><li>Every branch gets its own test environment</li></ul><p>Let us walk through each in turn.</p><h4>Pull and merge to/from feature branch frequently</h4><p>This works. Especially if you do it continuously. But why work in a feature branch if you are continuously integrating anyway?</p><h4>Setup “continuous integration” for every branch</h4><p>This will let you execute build, test and the other CI practices, but you will still not integrate and get feedback of any integration issues, and you will still introduce a big batch of work at the end. Actually, in my experience, branches with their own dedicated CI tends to live even longer, making the problem worse.</p><h4>Every branch gets its own dedicated test environment</h4><p>I leave it for you as an exercise to figure this one out. A hint is integration.</p><h3>Last but not least…</h3><blockquote>If you and your team do not notice friction with long lived feature branches, you are not moving fast enough. If/when you increase your deploy and feedback frequencies, feature branching will fight you.</blockquote><p>And what is the alternative? In my opinion it is Trunk-Based Development which I wrote about earlier:</p><p><a href="https://mrdevops.io/trunk-based-development-8376fe577c11">Trunk-Based Development</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32e1109d4594" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mr-devops/if-you-still-insist-on-feature-branching-you-are-hurting-your-business-and-our-profession-32e1109d4594">If you still insist on feature branching, you are hurting your business and our profession</a> was originally published in <a href="https://medium.com/mr-devops">Mr. DevOps</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trunk-Based Development]]></title>
            <link>https://medium.com/mr-devops/trunk-based-development-8376fe577c11?source=rss----688a4280e10c---4</link>
            <guid isPermaLink="false">https://medium.com/p/8376fe577c11</guid>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[lean]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Jon Arild Tørresdal]]></dc:creator>
            <pubDate>Thu, 17 Nov 2016 10:30:58 GMT</pubDate>
            <atom:updated>2017-08-31T02:40:06.904Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EyWDYoOBSQ2xo0QyZ39frA.png" /><figcaption>Complex Track Work: Toronto Union Station West Leads by <a href="https://www.flickr.com/people/photos_by_laurence/">https://www.flickr.com/people/photos_by_laurence/</a></figcaption></figure><blockquote>Trunk-based development is when all developers check in their code to trunk at least once per day. A.k.a. continuous integration.</blockquote><p>In other words, no long-lived branches, where long-lived is more than one day.</p><h3>Reasons for trunk-based development</h3><p>When I talk to people about <em>trunk-based development</em>, it is often in relation to DevOps, continuous delivery, or a curiosity to why companies like Google and Facebook do things the way they do.</p><blockquote>In my experience, increased deployment frequency is by far the most common reason for trunk-based development.</blockquote><p>Other less obvious reasons are:</p><ul><li>increase collaboration and transparency of work in process</li><li>better quality</li><li>it is a requirement for <a href="https://mrdevops.io/continuous-integration-ci-is-that-what-were-doing-e3137dfd39fd#.oqi5yszai">continuous integration</a> and continuous delivery</li></ul><p>For the rest of this article I’m going to assume the main motivator is more frequent deployments. Of course “frequent deployments” should not be a goal in itself, but underlying reasons could be:</p><ul><li>being able to quickly respond to change</li><li>involve downstream work centers more often (testers, stakeholders, operations, customers etc) to increase frequency of feedback loops</li><li>enable canary release and do customer experimentation</li><li>reduce time to market</li></ul><p>Obviously, if we want more frequent deployments at one end, that means more frequent code commits to trunk at the other end. Even though you do not HAVE to deploy every change in trunk to production, you want to make sure you CAN.</p><blockquote>When teams start to execute their deploy process more frequently, new constraints starts to surface. One of these constraints is often branching.</blockquote><h3>Trunk-based development from a Lean perspective</h3><p>In Lean terms, we want to optimize for <em>flow of work, </em>to be equipped to handle the increased frequency. Techniques for increasing flow is typically <em>small batch sizes</em> and <em>reducing work in process</em> (WIP).</p><p>What we effectively do when branching, is batch work. This is considered waste — inventory that is not being pulled into the product. If we want to increase flow we need less batching, which means short lived branches or no branches at all.</p><p>By focusing on small batches we get the added benefit of more frequent feedback, which makes our work more transparent to everyone else.</p><p>To reduce WIP, we need to integrate often, which effectively means <a href="https://mrdevops.io/continuous-integration-ci-is-that-what-were-doing-e3137dfd39fd#.s50v8chye">continuous integration</a>, which means pushing changes continuously.</p><blockquote>The consequence is that practices like developing features in isolation, stabilizing code over a time period, or do large refactoring work in isolation is no longer an option. We need to look for other solutions.</blockquote><p>The solution suggested here is of course <em>trunk-based development</em>, but to pull that off successfully we need to always keep trunk in a deployable state. This is what most people have a hard time believing is possible. Many changes to trunk all the time and still be able to deploy at any time? How can that be?</p><h3>How do we make sure trunk is always in a deployable state?</h3><p><em>Trunk-based development</em> is simple, but not easy. You will make mistakes. Also known as learning. There are things you will have to un-learn — like promises around branching that is not true when you are aiming for frequent deployments.</p><p>I have personally practiced <em>trunk-based development</em> for many years, and today I cannot imagine going back to using branches. Gary Gruver from HP express the same view from his engineers:</p><blockquote>“Engineers thought trunk-based development would never work, but once they started, they couldn’t imagine ever going back”</blockquote><p>When I talk to developers practicing feature branches, I have a hard time following their reasoning. To me it feels completely counter intuitive. They on the other hand do not believe what I telling them is possible.</p><p>I also realized that most people had a different understanding of continuous integration than I had, so I wrote an <a href="https://mrdevops.io/continuous-integration-ci-is-that-what-were-doing-e3137dfd39fd#.oqi5yszai">article about that</a>.</p><blockquote>Trunk-based development and continuous integration goes hand-in-hand, and one would not work effectively without the other.</blockquote><p>To me it boils down to a shift in developer mindset, quality awareness and small incremental changes together with the practices of continuous integration. If we manage that, we manage to keep trunk in a always deployable state.</p><p>In addition we want our changes integrated in production, but we need to prevent unfinished functionality to be visible to our customers. The most common technique for this is using feature toggles. But remember, limiting work-in-process (WIP) is important, and you want to have as few feature toggles active as possible. This reduces complexity and makes it easier to test.</p><h3>The shift</h3><p>Will trunk never break? Sure, but it will be fixed extremely fast cause every push is very small and easy to fix.</p><p>Something happens to us as developers when we know that our changes can end up in production at any time. It has a direct and positive impact on the quality of the work we do.</p><p>You might think that it will cause developers to push code to trunk infrequently — meticulously develop and test their functionality for days before pushing. In fact, the exact opposite happens. Developers push very small changes. They quickly realize that the more code they batch up, the higher the risk of introducing errors, and missing out on important feedback.</p><h3>Conclusion</h3><p>I do not believe I can convince you trunk-based development is the way to go, just by coming up with good arguments and explanations. What I do hope is to have injected a set of thoughts that you will reflect on in your daily work. Hopefully one day you and your team will feel the consequences described, and want to try out trunk-based development.</p><p>If you do, do not do a full blown trunk-based development effort in your entire organization. Have a team or project try it out, assess and monitor. Know that certain things will need to change. You will not be successful with trunk-based development if you think and do the same as with feature branching.</p><blockquote>Note: there ARE good reasons for branches, but I recommend teams using branching as an exception, not as a rule. We need to be aware of the sacrifices we make when deciding to branch.</blockquote><p>And lastly from the 2016 <a href="https://puppet.com/resources/white-paper/2016-state-devops-report/">State of DevOps Report</a>:</p><blockquote>“The idea that developers should work in small batches off master or trunk rather than on long-lived feature branches is still one of the most controversial ideas in the Agile canon, despite the fact it is the norm in high-performing organizations such as Google. Indeed, many practitioners express surprise that this practice is in fact implied by continuous integration, but it is: The clue is in the word “integration.””</blockquote><h3>Next</h3><p><a href="https://mrdevops.io/if-you-still-insist-on-feature-branching-you-are-hurting-your-business-and-our-profession-32e1109d4594">If you still insist on feature branching, you are hurting your business and our profession</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8376fe577c11" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mr-devops/trunk-based-development-8376fe577c11">Trunk-Based Development</a> was originally published in <a href="https://medium.com/mr-devops">Mr. DevOps</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Integration (CI) — Is that what we’re doing?]]></title>
            <link>https://medium.com/mr-devops/continuous-integration-ci-is-that-what-were-doing-e3137dfd39fd?source=rss----688a4280e10c---4</link>
            <guid isPermaLink="false">https://medium.com/p/e3137dfd39fd</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[tbd]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[lean]]></category>
            <dc:creator><![CDATA[Jon Arild Tørresdal]]></dc:creator>
            <pubDate>Mon, 07 Nov 2016 09:40:04 GMT</pubDate>
            <atom:updated>2017-08-31T02:36:06.877Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rmjpK_l1mMXWFCuBMJQK1g.png" /></figure><blockquote>Continuous Integration (CI) is not just about what happens on the CI Server, but what happens before — when and how often you integrate your code! <br>- me</blockquote><p>Most people think of <em>continuous integration</em> as what happens on the build server and onwards. Like code being built (if needed) and tested automatically on every push to your source control system. That is all good, but a very important and easily ignored fact of <em>continuous integration</em> is what happens prior to the CI Server. The part where the <strong>actual continuous integration</strong> happens!</p><p>This is clearly communicated in the beginning of the <a href="https://en.wikipedia.org/wiki/Continuous_integration">Wikipedia article</a> on <em>continuous integration</em>:</p><blockquote>…<strong>continuous integration</strong> (<strong>CI</strong>) is the practice of merging all developer working copies to a shared mainline several times a day.</blockquote><p>Anyone can contribute to a Wiki article, right? So another source of authority on the subject is Martin Fowler’s <a href="http://martinfowler.com/articles/continuousIntegration.html">article</a> from 2006 (10 years ago):</p><blockquote><em>Continuous Integration is a software development practice where</em> members of a team integrate their work frequently, usually <strong>each person integrates at least daily </strong>— leading to multiple integrations per day.</blockquote><p>Or from the recently released <a href="https://amzn.com/1942788002">DevOps Handbook</a> by <a href="https://medium.com/u/25ce121a07f2">Jez Humble</a>, <a href="https://medium.com/u/68ca219afa64">Gene Kim</a>, Patrick Debois (<a href="https://twitter.com/patrickdebois">@patrickdebois</a>) and John Willis (<a href="https://twitter.com/botchagalupe">@botchagalupe</a>):</p><blockquote>Continuous integration was designed to solve this problem [merging code is painful] by making merging into trunk a part of everyone’s daily work.</blockquote><p>So I want to ask the following question:</p><blockquote>If we’re working on branches or feature branches that live for more than one day without integrating with trunk/master — are we doing <em>continuous integration</em>?</blockquote><p>I would argue we are not. So what is my point in all this? Am I trying to stop people running around saying they are doing CI, when in fact they are not? No. Beside the fact that it’s convenient to have a common understanding of what continuous integration REALLY is, I’m aiming for answers to these questions:</p><blockquote>Why is it important to integrate code to trunk/master several times a day?</blockquote><blockquote>What are the possible consequences of not doing continuous integration, from a Lean and DevOps perspective?</blockquote><p>That will be the topic of my next article on <a href="https://mrdevops.io/trunk-based-development-8376fe577c11?source=linkShare-5f2326ac59d0-1504146862">Trunk Based Development (TBD)</a> a.k.a. NoBranching.</p><p>For reference, <a href="https://medium.com/u/2397d2a0811b">Grady Booch</a> was the one who pioneered the term <em>continuous integration</em> in 1991 and referenced it in his book <em>Object Solutions: Managing the Object-Oriented Project </em>published in 1995:</p><blockquote>“The macro process of object-oriented development is one of ‘continuous integration’… At regular intervals, the process of ‘continuous integration’ yields executable releases that grow in functionality at every release… It is through these milestones that management can measure progress and quality, and hence anticipate, identify, and then actively attack risks on an ongoing basis.”</blockquote><p>Booch did not mention <em>a shared mainline</em> or <em>several times a day, </em>but <em>continuous integration</em> was later integrated as one of the key 12 practices of Extreme Programming by <a href="https://medium.com/u/db2690bcb10e">Kent Beck</a>, and was later heavily influenced by these practices and continued to evolve into what we have today.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3137dfd39fd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mr-devops/continuous-integration-ci-is-that-what-were-doing-e3137dfd39fd">Continuous Integration (CI) — Is that what we’re doing?</a> was originally published in <a href="https://medium.com/mr-devops">Mr. DevOps</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What does DevOps and the artist Timbuktu have in common?]]></title>
            <link>https://medium.com/mr-devops/what-does-devops-and-the-artist-timbuktu-have-in-common-2c4fdd4d334?source=rss----688a4280e10c---4</link>
            <guid isPermaLink="false">https://medium.com/p/2c4fdd4d334</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[trunk-based-development]]></category>
            <dc:creator><![CDATA[Jon Arild Tørresdal]]></dc:creator>
            <pubDate>Sun, 06 Nov 2016 12:59:20 GMT</pubDate>
            <atom:updated>2016-11-18T13:11:50.979Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nXZggs6kilg8J2JCbKmvRw.png" /></figure><blockquote>Everyone wants DevOps, but only a few is willing to do what it takes.<br>- me</blockquote><p>This reminds me of the Swedish artist <a href="https://en.wikipedia.org/wiki/Timbuktu_%28musician%29">Timbuktu</a> and the lyrics of the song “Alla vill till himmelen men ingen vill dö” (translated to: Everyone wants to go to heaven, but no one wants to die). The full chorus goes as follows (translated):</p><blockquote>Everybody wants to go to heaven, but few wants to die<br>We want to collect the price, but don’t sow any seeds<br>We want our piece of the cake and we want to eat it too <br>People want to take, but are reluctant to give</blockquote><p>The reality of DevOps is organizations will have to change in order to take advantage of the benefits it prescribes. Change is hard.</p><p>Too often I’m invited to customers to “implement DevOps”. Usually this means help them implement <a href="https://continuousdelivery.com/">Continuous Delivery</a>, but that’s usually impossible without changing the way they do their daily work — and to change.</p><p>Did you know that Continuous Integration is a prerequisite to Continuous Delivery? <a href="https://en.wikipedia.org/wiki/Continuous_integration">Continuous Integration</a> was coined by Grady Booch in 1991 and is today defined as:</p><blockquote>…continuous integration (CI) is the practice of merging all developer working copies to a shared mainline several times a day</blockquote><p>All too often CI Servers get confused with the practice of Continuous Integration. I usually take it one step further and argue that <a href="http://www.alwaysagileconsulting.com/articles/organisation-pattern-trunk-based-development/">Trunk Based Development</a> is a prerequisite to Continuous Integration!</p><p>Is your organization and developers willing to ditch long lived branches (&gt; 1 day), including feature branches, to successfully “implement” DevOps?</p><p>I plan to cover these and other topics in great more detail the coming months.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c4fdd4d334" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mr-devops/what-does-devops-and-the-artist-timbuktu-have-in-common-2c4fdd4d334">What does DevOps and the artist Timbuktu have in common?</a> was originally published in <a href="https://medium.com/mr-devops">Mr. DevOps</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>