<?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[Stories by Henric Englund on Medium]]></title>
        <description><![CDATA[Stories by Henric Englund on Medium]]></description>
        <link>https://medium.com/@hnrc?source=rss-61d1cb735a93------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9ndyC3rUOfiVPpK5XyC5tg.png</url>
            <title>Stories by Henric Englund on Medium</title>
            <link>https://medium.com/@hnrc?source=rss-61d1cb735a93------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 16:32:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hnrc/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Continuous delivery and DevEx]]></title>
            <link>https://storytel.tech/continuous-delivery-and-devex-fa89996fe0e6?source=rss-61d1cb735a93------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa89996fe0e6</guid>
            <category><![CDATA[developer-experience]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[continuous-deployment]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Henric Englund]]></dc:creator>
            <pubDate>Wed, 30 Aug 2023 09:45:36 GMT</pubDate>
            <atom:updated>2023-08-30T09:58:17.737Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is a story about how we at Storytel tied our delivery procedures and tools together to massively level up our developer experience.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9p6m3t3Z-tjHmYkdxExRMA.png" /></figure><h3>But first some background</h3><p>We were coming out of a phase of organic growth and our processes weren’t as polished as they could and should have been.</p><p>Over the years we accumulated a range of different tools and had a very manual and somewhat tedious process for how code got into production. Without going into too much detail, we can just say that the journey to production consisted of around 10-<em>ish</em> manual steps.</p><p>To tackle this debt, we decided to consolidate all our delivery-related tools into a fully automated, streamlined, and opinionated delivery pipeline, with next-level developer experience built in from the get-go.</p><p>We didn’t only want to optimize for the usual suspects, the short feedback loops, and the small but frequent production deploys, we also wanted to make the whole thing <em>“fun” </em>to work with.</p><h3>Guiding principles</h3><p>We started off by gathering our team of platform engineers and fleshed out some guiding principles for how we envisioned our opinionated delivery pipeline to work and behave.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xZ70oMiRYoTvLJvDn_jtGA.png" /><figcaption>Danger: Genius at work.</figcaption></figure><h4><strong>🤖 As little human involvement as possible</strong></h4><p>We wanted the path to production to be as <strong>frictionless as absolutely possible</strong>, i.e. eliminate all unnecessary chores and automate everything that can be automated.</p><p>The core of this was to trigger the delivery pipeline <strong>on every commit</strong> to the main branch, and for the delivery pipeline to take code changes <strong>all the way</strong> to production, every time.</p><p>This would then ensure that:</p><ul><li>The main branch is at any given time reflecting what’s running in production.</li><li><strong>All</strong> changes, small or big, go out in production minutes after they have been merged.</li><li>The feedback loop from code merge to production is as short as possible.</li></ul><h4>🚧 Build once and run everywhere</h4><p>We have several environments (production, development, local) and it’s generally considered good practice to <a href="https://12factor.net/dev-prod-parity"><strong>have as much parity</strong></a><strong> as possible</strong>.</p><p>In this case, this meant that the same container image should be used in all environments, i.e., build it once in the pipeline and run the same image in production as in all pre-production environments.</p><h4>🔎 Pipeline visibility</h4><p>Visibility and insight are crucial and we wanted our engineers (and others) to have <strong>full visibility</strong> into how their code is <strong>progressing through the delivery pipeline</strong>. At the same time, we didn’t want people to jump between many different tools to gather that insight.</p><p>What we really wanted was for all relevant events from all the different parts of the pipeline to be consolidated in a single “view”, where the relevant information is beautifully presented, approachable, and without adding any unnecessary noise.</p><h4>🔒 Secure by default</h4><p>It wouldn’t make a whole lot of sense for us to give away the keys to our castle to a third party, especially considering all the leaks that have been going on over the last couple of years.</p><p>You generally don’t want anyone but yourselves to have access to our production environment, meaning that whatever is integrated with our environments should be owned and managed by ourselves.</p><h3>Execution</h3><p>With our guiding principles in place, we went on to sketch out a solution.</p><p>We knew we wanted to build upon and leverage the tooling we already had, only introduce new technologies if absolutely necessary, and package everything as a streamlined pipeline instead of as individual tools.</p><p>To tie everything together into a cohesive experience, we decided to emit events from all relevant parts of the pipeline and implement an event aggregating service responsible for piping and presenting the progress of a pipeline run in Slack, in a beautiful way.</p><p>The following image shows how we envisioned this to work:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vcXcuQpRbPQNbdMWxlN_cA.png" /><figcaption>Masterplan</figcaption></figure><h4><em>Continuous Delivery vs. Continuous Deployment</em></h4><p>CD is one of the more confusing acronyms because it can mean both continuous <strong><em>delivery</em></strong> and continuous <strong><em>deployment</em></strong>. The difference between the two is that <em>continuous deployment</em> takes a code change all the way to production with no human intervention whatsoever, while with <em>continuous delivery</em> the very last step, the production deploy, is manually triggered. It’s still a fully automated process, it’s just that the trigger is manual.</p><p>We’ll revisit this and go full <em>continuous deployment</em> at a later stage but for us, it made the most sense to start with <em>continuous delivery</em> for the time being.</p><p>Anyhow, that’s why there’s a box in the drawing above saying Approve production deploy<em>, </em>it’s a button in Slack, the manual trigger.</p><h4>🤹 Implementation</h4><p>The pipeline starts with a GitHub Actions workflow going off on each and every commit to the main branch.</p><p>This can be seen as the <em>continuous integration</em> phase of the pipeline.</p><p>In this phase, we’re kicking off tests, compiling the code, running security scanning and we’re putting together a Docker image. All of these tasks fire off their own events, such as Tests started when the tests start running and Tests finished when they finish successfully.</p><p>As mentioned earlier, all these events are piped to and rendered in Slack through our <em>event aggregation service.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MXyXu015pUM_8aAFC13y_g.png" /></figure><p>We’re using ArgoCD for GitOps and we’re keeping all our Kubernetes manifests for all workloads in a centralized repo. The last part of the GitHub Actions workflow is to push a commit to this repo saying that there’s a new image version available for the workload we’re currently building.</p><p>We’re now entering the <em>continuous delivery</em> phase.</p><p>At this point we only want the change to go out in our development environment so those are the only manifests we’re touching. This commit will also fire off an event Rollout started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ta2EfRkUNwspVC5r467x4Q.png" /></figure><p>Shortly after, ArgoCD will pick up the updated manifests and apply the changes according, effectively rolling out our newly built images in our development environment and sending out a Rollout finished event.</p><p>With the code change out in the development environment we can move on to the last phase of the pipeline, the production deploy. The one step of the process that has a manual element.</p><p>We’re showing a button in our Slack bot with the text Promote to production. When a user clicks this button (as they should) we’re kicking off another GitHub Actions workflow that is updating the production version of the Kubernetes manifests. This is firing a new Rollout started event, but this time for production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RzvzBrIjBEWacVvS_LLXfQ.png" /></figure><p>Again, ArgoCD will shortly pick up the updated manifests, apply the changes to the production environments, and emit the corresponding Rollout finishedevent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ETcUgElmR6FBqilm0ZtSsQ.png" /></figure><p>That’s it. Our code change is now running in production and the journey to get there was both smooth, secure, and fun. Mission accomplished! 💪</p><p>That’s the full delivery pipeline implemented with GitHub Actions, ArgoCD, Slack, and some clever glue code.</p><p>What’s explained above is obviously the happy path but as we all know things can and will go wrong, so there are also corresponding X failed events that are picked up and acted on accordingly by the event aggregation service, basically notifying the user that something broke and needs to be looked into.</p><h3>Wrap-up</h3><p>We went into this with the ambition to massively reduce the amount of manual toil and improve our developer experience, and we can safely say that we managed to achieve that. The number of steps required to ship something to production <strong>was reduced from 10-<em>ish </em>to just 2.</strong></p><p>Great success! <strong>🎉</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THozkrBpm2Q6bVkBKT68jQ.png" /><figcaption>Before vs. after</figcaption></figure><p>In addition, we kept the complexity to a minimum by re-using what we already had, with the true key being that all relevant tooling was extended to emit events.</p><p>All in all, this gave us a full-fledged and streamlined continuous delivery pipeline that is not only optimized for short feedback loops but is also fun to work with and beautiful to look at.</p><p>In a future episode, we’ll dive deeper into the learnings and the impact all of this had on our engineering teams, so stay tuned!</p><p>Cheers and thanks for reading! 🍻</p><p>All kudos go to the great platform engineering team at Storytel who did all the hard work. 🌟</p><p><em>Credits: </em><a href="https://pixelspeechbubble.com/"><em>Pixelspeechbubble.com</em></a><em> and </em><a href="https://www.avatarsinpixels.com/"><em>Avatarsinpixels.com</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa89996fe0e6" width="1" height="1" alt=""><hr><p><a href="https://storytel.tech/continuous-delivery-and-devex-fa89996fe0e6">Continuous delivery and DevEx</a> was originally published in <a href="https://storytel.tech/">Storytel Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitHub Actions self-hosted runners with AWS CDK]]></title>
            <link>https://medium.com/schibsted-engineering/github-actions-self-hosted-runners-with-aws-cdk-562a02bc1a61?source=rss-61d1cb735a93------2</link>
            <guid isPermaLink="false">https://medium.com/p/562a02bc1a61</guid>
            <category><![CDATA[continous-delivery]]></category>
            <category><![CDATA[cdk]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[Henric Englund]]></dc:creator>
            <pubDate>Fri, 18 Feb 2022 07:50:53 GMT</pubDate>
            <atom:updated>2022-02-18T07:50:53.948Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0h7PgZVAFnUStZXj" /><figcaption>Photo by <a href="https://unsplash.com/@synkevych?utm_source=medium&amp;utm_medium=referral">Roman Synkevych</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Cost-optimized, elastic, and fully managed, on AWS 🚀</h4><p>GitHub Actions, GitHub’s own CI/CD solution, is pretty sweet in that it’s fully integrated with the usual GitHub user experience, resulting in tremendous amounts of soft values and synergies, especially for those who spend all their awake time on GitHub.</p><p>So what do you do if you are, for example, on GitHub Enterprise Server and there are no Actions runners available or if you need more execution minutes than what’s included in your GitHub plan?</p><p><strong>You launch your own runners!</strong></p><p>Right, so how does that work?<br>The most basic setup is quite easy, it’s just a matter of configuring and spinning up a binary that registers with GitHub. However, for things to scale and work well in a bigger organization there has to be a process around everything which takes care of stuff like <strong>scaling, performance, security, and cost-efficiency.</strong></p><p>This is where AWS CDK comes in.<br>We have produced <strong>a higher-level CDK construct library</strong> to make it easy, fun, and convenient to provision GitHub Actions workers in a scaleable way, on AWS, without any fuzz.</p><p><strong>👉 </strong><a href="https://github.com/schibsted/github-actions-self-hosted-cdk"><strong>https://github.com/schibsted/github-actions-self-hosted-cdk</strong></a><strong> 👈</strong></p><p>Because it’s a pre-baked CDK library, anyone can start using it today and enjoy their self-hosted GitHub Actions runners, but because this is a blog post, let’s dig into how it works, what’s going on under the hood, and how it has been designed.</p><h3>So, let’s get to it!</h3><p>The way the CDK construct works is that, when it’s being provisioned, with cdk deploy, it sets up everything needed to have a full-blown fully event-driven GitHub Actions environment. That is:</p><ul><li>It produces an AMI, an Amazon Machine Image, with <strong>all the bells and whistles needed to run the GitHub Actions runner with Docker support.</strong></li><li>It also deploys a Lambda-backed API Gateway, responsible for launching new EC2 instances when jobs are queued in GitHub Actions, based on the pre-baked AMI.</li><li>The usual suspects. Networking, and security groups.</li></ul><h4>How it works under the hood</h4><p>The Lambda listens to webhook events from GitHub and launches new short-lived EC2 instances as needed.</p><ul><li>Which <strong>instance type to use</strong> is defined on the GitHub Actions job level and <strong>can vary throughout a workflow</strong>, making it possible to use beefier instances for heavy workloads and smaller instances for jobs that don’t require much resources.</li><li>The EC2 instances can be configured to <strong>either be </strong><a href="https://aws.amazon.com/ec2/spot/"><strong>Spot instances</strong></a><strong> (i.e. possibly cheaper) or use on-demand pricing</strong>.</li><li>All <strong>instances are set up to self-destruct</strong> when their job is completed or after some pre-defined timeout, both for cleanup purposes and to prevent unexpected recurring costs.</li><li>Networking can be configured to be either private or public. Private means that instances are launched in a private subnet and all outgoing traffic is routed through a NAT Gateway with a static IP. Public means public subnets, but don’t worry, the instances are still protected with restrictive security groups.</li><li>By being strict about using ephemeral instances we can<strong> guarantee that each and every job get a clean and isolated environment</strong> to run in.</li></ul><h4>Boxes and arrows</h4><p>This drawing visualizes how all the things tie together and relate to each other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IwigPRbflcFG2Loe" /><figcaption>Solution architecture</figcaption></figure><h3>Alrighty, how do get this off the ground?</h3><p>Here’s when AWS CDK really comes in to shine.<br>Because a CDK library is nothing but an NPM package it’s trivial to distribute and start using, just like you would use any other NPM package.</p><p><em>(AWS CDK works with several different programming languages and one does not necessarily have to use Typescript, but it’s by far the most popular choice so we’ll stick to that today)</em></p><p>There’s a better and more detailed guide on how to get started in the <a href="https://github.com/schibsted/github-actions-self-hosted-cdk/blob/main/README.md">README</a>but here’s the gist of it:</p><h4>First things first (getting ready for CDK)</h4><ol><li>Make sure your ~/.aws/credentials is properly set up.</li><li>Install the CDK CLI, npm install -g aws-cdk.</li><li>Bootstrap your AWS account for CDK by running by following the instructions in the <a href="https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html">CDK Bootstrapping guide</a>.</li></ol><h4>Create a new CDK project</h4><ol><li>Create a new Typescript project.</li><li>Add@schibsted/github-actions-self-hosted-cdk and aws-cdk-libas dependencies.</li><li>Shove this into a file and adjust to your likings:</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/45d4a7075f07e55d85fb44d76d690b58/href">https://medium.com/media/45d4a7075f07e55d85fb44d76d690b58/href</a></iframe><h4>Off we go! 🚀</h4><ol><li>Provision everything with cdk deploy.</li><li>Configure GitHub to send workflow_job events to the endpoint that is printed by the end of the cdk deploy run.</li></ol><p><strong>That’s it. Reasonably straightforward.<br></strong>You now have a full-blown event-driven self-hosted GitHub Actions environment ready waiting for you in your AWS account!</p><h4>Yay, cool, anything else?</h4><p>Yeah, a certain label is required on every workflow job to specify which instance type to use. It can be any (x86 based) instance type available in the region where this is running.</p><p>This example shows a workflow where the build jobs are running on m5.medium instances and the deploy jobs on t3.micro.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/81d51255d6ab6a596cf42f1f9edc772c/href">https://medium.com/media/81d51255d6ab6a596cf42f1f9edc772c/href</a></iframe><h3>What’s next?</h3><p>At the top of the nice-to-have-we-should-totally-add-this list, we have support for ARM/Graviton2 based EC2 instances. This is likely to come soon-<em>ish.</em></p><p>Thanks for reading, cheers and have a good day! 🍻</p><p><em>PS: We’re hiring and have exciting positions in all our locations across the Nordics and Poland. Check out our open positions at </em><a href="https://schibsted.com/career/"><em>https://schibsted.com/career/</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=562a02bc1a61" width="1" height="1" alt=""><hr><p><a href="https://medium.com/schibsted-engineering/github-actions-self-hosted-runners-with-aws-cdk-562a02bc1a61">GitHub Actions self-hosted runners with AWS CDK</a> was originally published in <a href="https://medium.com/schibsted-engineering">Schibsted engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deathstar — Application-level chaos engineering]]></title>
            <link>https://medium.com/schibsted-engineering/death-star-application-level-chaos-engineering-6f6862d77544?source=rss-61d1cb735a93------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f6862d77544</guid>
            <category><![CDATA[chaos-engineering]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[reliability]]></category>
            <dc:creator><![CDATA[Henric Englund]]></dc:creator>
            <pubDate>Wed, 06 Oct 2021 13:35:35 GMT</pubDate>
            <atom:updated>2021-10-06T13:39:10.677Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*25r2wmPsiTjmpXSs" /><figcaption>Photo by <a href="https://unsplash.com/@stonehood?utm_source=medium&amp;utm_medium=referral">Stone Hood</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3><strong>Deathstar</strong> — Application-level chaos engineering</h3><h4>Or, how to break things without breaking things</h4><p>At <a href="https://schibsted.com/">Schibsted</a> we take great pride in always being up, always serving the public with breaking and important news, especially when it matters the most and even when internal systems are on fire.</p><p>With that in mind and because we are determined to build resilient systems, it makes sense that we also continuously and thoroughly test our setup to truly feel confident that things are working as expected at any given moment.</p><p>The most dramatic and also most realistic approach is to practice what’s commonly known as <a href="https://principlesofchaos.org/">“Chaos engineering”</a>, e.g. break things on purpose in a controlled manner to identify weaknesses and to build confidence in a system’s capability to withstand turbulence.</p><p><strong>We ❤️ controlled chaos.</strong></p><h3>Chaos engineering at Schibsted</h3><p>Chaos engineering can be applied from different angles and at different layers of a system’s stack, e.g. infrastructure, network, or application.</p><p>We are focusing on the application level in this article, for the following reasons:</p><ul><li>We develop software and we ship to production many times per day.</li><li><strong>No software is perfect</strong>, they all contain bugs and all sorts of weird unexpected behavior.</li><li><strong>We are for that reason to some extent one of the biggest threats to our own stability and availability.</strong></li><li>We are operating at a pretty high abstraction level when it comes to network and infrastructure and should be able to trust AWS/GCP to do their part of the contract.</li><li>Any network or infrastructure issue will in one way or another bubble up and impact the application level.</li></ul><p>Unfortunately, there weren’t any really good general-purpose open-source utilities for application-level chaos engineering available, so we <strong>decided to build one ourselves.</strong></p><h3>👋 Meet Deathstar</h3><p>We call it <a href="https://github.com/schibsted/deathstar"><strong>Deathstar</strong></a>, our application-level chaos engineering utility.</p><h3>How is this different from other chaos engineering tools?</h3><p>It differs from the most iconic chaos engineering too, <a href="https://netflix.github.io/chaosmonkey/">Chaos Monkey</a>, in many ways.</p><p><strong>Deathstar operates on the application level.</strong> It does not fiddle anything with the underlying infrastructure. It don’t even know anything about the infrastructure.</p><p>This means that Deathstar works in exactly the same way, no matter if things are running on EC2, Heroku, Kubernetes, GCP, ECS, or as a standalone service on someone’s laptop.</p><p>It also means that it has the potential of <strong>carrying through more intelligent and tailored attacks</strong>, attacks that for example only target a predefined request pattern.</p><p>The idea is that, by consciously taking down an app, or parts of an app, even if it’s just for a very short period of time, we are<strong> forcing all dependencies of that app to handle outages in a graceful way.</strong></p><h3>What kind of simulations are we talking about?</h3><p>At the time of this writing we have support for two types of simulations:</p><ul><li><strong>Error</strong> — make the target under attack throw errors, e.g. respond with an unexpected HTTP status code.</li><li><strong>Slow</strong> — make the target under attack unreasonably slooow.</li></ul><p>All simulations can be applied to either all endpoints of an app or a selected few endpoints.</p><p>It’s also possible to define a list of endpoints and HTTP headers that should be excluded from a simulation if needed.</p><h3>Okay cool, but.. how does it work?</h3><p>Deathstar comes in two parts, a Slack bot, and a middleware.</p><h4>Slack bot</h4><p>This can be seen as <strong>the Deathstar control plane</strong>. It’s ultimately responsible for coordinating and carrying out simulations.</p><p>A strong motivator for building this around a Slack bot is that it makes it possible to present attack simulations in a user-friendly and approachable way. Basically <strong>making it less scary to nuke a vital app.</strong> Keep reading to get a glimpse of what the Slack bot looks like in action.</p><h4>Middleware</h4><p>The middleware needs to be included in all services that are to be attacked by Deathstar.</p><p>The<strong> purpose of the middleware is to act on instructions from the Deathstar control plane</strong>, instructions that are broadcasted during an outage simulation.</p><h3>Mkay, but how does it really work?</h3><p>Here’s basically what’s going on:</p><ul><li>Deathstar pops up in your Slack and asks if it’s okay to run a simulated attack.</li></ul><figure><img alt="The Deathstar bot asking if it’s okay to run an attack simulation" src="https://cdn-images-1.medium.com/max/766/1*NS1UHqyoCP2v8-0_PaEcpw.png" /><figcaption>The Deathstar bot asking if it’s okay to run an attack simulation.</figcaption></figure><ul><li>Once accepted Deathstar will write a file to AWS S3 with instructions about the attack.</li><li>The middleware in all running instances of the app picks up the instructions and starts acting accordingly. This can for example mean that HTTP requests to a certain endpoint suddenly stop working.</li><li>Meanwhile, the control plane monitors the service under attack to verify that everything is going according to plan. It also monitors all services that depend on the attacked service, to make sure we don’t have any unexpected cascading errors. All of this is reported back to Slack.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cJTgYT2G5pwbBtvZTyeqhQ.png" /><figcaption>Deathstar in middle of a simulation. Status is continuously reported back to Slack.</figcaption></figure><ul><li>After some time, when the simulation is finished, a new instruction is sent out to all instances, to stop the simulation.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*L9k6zaiPrSc48lekGw-kgw.gif" /><figcaption>A successful run of 6 simulation suits.</figcaption></figure><h3>So how would this look like from a flow chart perspective?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T0oFw-GljtW8KaGW-Zbzww.png" /><figcaption>Deathstar flow chart.</figcaption></figure><h3>Talk is cheap, show me the code!</h3><ul><li><a href="https://github.com/schibsted/deathstar">https://github.com/schibsted/deathstar</a> — This is the Deathstar control plane / Slack bot</li><li><a href="https://github.com/schibsted/deathstar-middleware">https://github.com/schibsted/deathstar-middleware</a> — A Deathstar middleware for Node.js/Koa based apps</li></ul><p>The middleware is kind of simplistic in its nature and it should be somewhat trivial to re-implement in another language or for another framework than Koa.</p><p>Thanks for reading, cheers and have a good day! 🍻</p><p><em>PS: We’re hiring and have exciting positions in all our locations across the Nordics and Poland. Check out our open positions at </em><a href="https://schibsted.com/career/"><em>https://schibsted.com/career/</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f6862d77544" width="1" height="1" alt=""><hr><p><a href="https://medium.com/schibsted-engineering/death-star-application-level-chaos-engineering-6f6862d77544">Deathstar — Application-level chaos engineering</a> was originally published in <a href="https://medium.com/schibsted-engineering">Schibsted engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>