<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ricardo Castro</title>
    <description>The latest articles on DEV Community by Ricardo Castro (@mccricardo).</description>
    <link>https://dev.to/mccricardo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F540442%2Ff10c35e4-f664-4eca-b643-2e27068b0a2c.jpeg</url>
      <title>DEV Community: Ricardo Castro</title>
      <link>https://dev.to/mccricardo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mccricardo"/>
    <language>en</language>
    <item>
      <title>How important is Observability for SRE?</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Fri, 11 Feb 2022 13:11:16 +0000</pubDate>
      <link>https://dev.to/squadcast/how-important-is-observability-for-sre-4lcl</link>
      <guid>https://dev.to/squadcast/how-important-is-observability-for-sre-4lcl</guid>
      <description>&lt;p&gt;&lt;em&gt;Observability is what defines a strong SRE team. In this blog, we have covered the importance of observability, and how SREs can leverage it to enhance their business.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Observability is the practice of assessing a system’s internal state by observing its external outputs. Through instrumentation, systems can provide telemetry such as metrics, traces, and logs that help organizations better understand, debug, maintain and evolve their platforms.&lt;/p&gt;

&lt;p&gt;SREs use many tools and practices to manage services at scale and observability is a crucial part of it. Observability enhances SRE by allowing its practitioners to infer a system’s internal state. Actionable data is of the utmost importance for SRE in order to develop and maintain scalable, reliable, and secure systems. Observability provides the data that SREs need to better understand their systems, what is happening, and why.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is Observability?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In traditional monitoring systems, you usually have a series of dashboards that help you understand when something wrong is happening. Usually in cloud native environments, using a microservices architecture, we assume services are meant to be run by software and not by humans. This increases the level of complexity and its dynamic nature makes it difficult to reason about problems. You need to make your systems observable so that you can dig into what’s going on.&lt;/p&gt;

&lt;p&gt;Observability gives you the capacity to measure the internal state of your systems by checking their external outputs. It is built around three key pillars: metrics, traces, and logs.&lt;/p&gt;

&lt;p&gt;Metrics are measurements of something about your system. They are numeric values, over an interval of time, usually with associated metadata (e.g., timestamp, name). They can be raw, calculated, or aggregated over a period of time. They can come from a variety of sources like servers or APIs. Metrics are structured by default and can be stored in open source systems like &lt;a href="https://prometheus.io/" rel="noopener noreferrer"&gt;Prometheus&lt;/a&gt; and &lt;a href="https://riemann.io/" rel="noopener noreferrer"&gt;Riemann&lt;/a&gt; or in off-the-shelf solutions like &lt;a href="https://aws.amazon.com/cloudwatch/" rel="noopener noreferrer"&gt;Amazon CloudWatch&lt;/a&gt; and &lt;a href="https://docs.microsoft.com/en-us/azure/azure-monitor/overview" rel="noopener noreferrer"&gt;Azure Monitor&lt;/a&gt;. These optimized storage systems allow you to perform queries, create alerts, and store them for long periods of time.&lt;/p&gt;

&lt;p&gt;Traces are the record of the execution path of a program or system. They represent the flow of a request through your services and allow you to see the end-to-end path of execution. Distributed tracing is particularly important in modern distributed architectures, like microservices. The primary building block of a trace is the span. In the &lt;a href="https://opentracing.io/" rel="noopener noreferrer"&gt;OpenTracing&lt;/a&gt; specification, &lt;a href="https://opentracing.io/docs/overview/spans/" rel="noopener noreferrer"&gt;spans&lt;/a&gt; encapsulate the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Operation name&lt;/li&gt;
&lt;li&gt;Start and finish timestamp&lt;/li&gt;
&lt;li&gt;key:value span Tags&lt;/li&gt;
&lt;li&gt;key:value span Logs&lt;/li&gt;
&lt;li&gt;SpanContext&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A trace is a group of multiple spans that usually contain “References” to each other. They can be displayed using open source solutions like &lt;a href="https://www.jaegertracing.io/" rel="noopener noreferrer"&gt;Jaeger&lt;/a&gt; or &lt;a href="https://zipkin.io/" rel="noopener noreferrer"&gt;Zipkin&lt;/a&gt; as well as in SaaS offerings like &lt;a href="https://www.honeycomb.io/trace/" rel="noopener noreferrer"&gt;Honeycomb&lt;/a&gt; or &lt;a href="https://docs.datadoghq.com/getting_started/tracing/" rel="noopener noreferrer"&gt;Datadog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Logs are text records that describe discrete events, at a specific point in time (e.g. error, an important operation was executed). They’re typically the first place you’ll look to find what is going on with your systems. They include a timestamp and a payload to provide context. Logs can be in three major formats: plain text, structured and binary. Structured logs, which include additional metadata, can be stored in systems like &lt;a href="https://www.elastic.co/elastic-stack/" rel="noopener noreferrer"&gt;Elasticsearch&lt;/a&gt; or &lt;a href="https://grafana.com/oss/loki/" rel="noopener noreferrer"&gt;Loki&lt;/a&gt; to be easily and efficiently queried.&lt;/p&gt;

&lt;p&gt;SREs can leverage this information to better understand, maintain and design systems that work at scale.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How can SREs leverage Observability&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;According to the &lt;a href="https://f.hubspotusercontent30.net/hubfs/5595333/Catchpoint-SRE-Report-2020.pdf" rel="noopener noreferrer"&gt;2020 SRE Report&lt;/a&gt;, only 53% of respondents said they were using observability tools. This is a surprisingly low number considering that the pressure to iterate faster and meet customer expectations increased the demand for observability.&lt;/p&gt;

&lt;p&gt;The increasing complexity of systems results in more unknowns and teams need to answer specific questions about their systems. Observability tools can help you take proactive actions to fix issues before they have a major user impact. In order to leverage observability, you’ll need to put in place the proper tooling and services to collect the necessary telemetry. Using open source software or commercial solutions you’ll need to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instrument your services to collect telemetry. This telemetry can come from servers, containers, or services and will provide information about your entire infrastructure&lt;/li&gt;
&lt;li&gt;Correlate data between multiple sources, creating context, enhancing visualization, and enhancing automation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By using relevant metrics that track user satisfaction you’ll be able to understand when your services are not being reliable enough. By using traces, you’ll be able to understand the flow of requests through your systems and pinpoint where bottlenecks are forming. By using logs you’ll be able to track and understand meaningful events in your services. Armed with this information you’ll be able to detect issues faster before compromising SLOs. Mean time between failures (MTBF), mean time to failure (MTTF), and mean time to repair/recovery (MTTR) can be greatly reduced due to better insights and the alerts observability provides. Well-crafted alerts, based on &lt;a href="https://www.squadcast.com/sre-tools" rel="noopener noreferrer"&gt;SLOs&lt;/a&gt; and powered by observability, can help reduce &lt;a href="https://www.squadcast.com/effective-on-call-and-incident-response" rel="noopener noreferrer"&gt;alerts&lt;/a&gt; to a sustainable amount of actionable events. This helps reduce burnout and creates a culture that supports sustainable innovation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.squadcast.com/post-incident-review" rel="noopener noreferrer"&gt;Incident analysis and postmortems&lt;/a&gt; benefit greatly from observability. It enables you to know what’s happening under the hood, what needs to be improved or fixed. It allows end-to-end observability, enabling faster root cause analysis and fixing.&lt;/p&gt;

&lt;p&gt;By gathering telemetry in a consistent and automated way, you’ll be able to implement &lt;a href="https://en.wikipedia.org/wiki/MLOps" rel="noopener noreferrer"&gt;MLOps&lt;/a&gt; and &lt;a href="https://en.wikipedia.org/wiki/Artificial_Intelligence_for_IT_Operations" rel="noopener noreferrer"&gt;AIOps&lt;/a&gt; practices. These practices use &lt;a href="https://en.wikipedia.org/wiki/Machine_learning" rel="noopener noreferrer"&gt;Machine Learning&lt;/a&gt; and &lt;a href="https://en.wikipedia.org/wiki/Artificial_intelligence" rel="noopener noreferrer"&gt;Artificial Intelligence&lt;/a&gt; techniques to simplify and enhance operations and accelerate problem resolution. They’ll allow you to replace repetitive manual tasks with intelligent and automated solutions that allow you to be proactive in the event of slowdowns or outrages. Observability generates huge amounts of information that humans can’t possibly analyze and correlate. By ingesting all that data, from the various observability solutions, these techniques can conclude what is relevant to focus and point SREs in the right direction.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How SRE and Observability can enhance business&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;SRE work and business goals are directly intertwined. Users determine the reliability of a system making it one of its most important features. Happy users generate value (e.g. revenue, product popularity), and as such, understanding and keeping users satisfied is of the utmost importance.&lt;/p&gt;

&lt;p&gt;Observability provides the tooling necessary to understand user happiness by offering solutions to craft SLOs that measure user happiness. SLO, which stands for Service Level Objective, are measurements of user satisfaction. Instead of understanding how reliable your systems are by using indirect measurements (e.g., server metrics like CPU and memory usage), SLOs can be crafted to understand how satisfied users are (e.g., users can’t buy certain products). You can leverage projects like &lt;a href="https://sloth.dev/" rel="noopener noreferrer"&gt;sloth&lt;/a&gt; to help craft SLOs, create dashboards and meaningful alerts. Businesses can use the metrics to make decisions about what features to develop and what type of work needs to be prioritized. SLO-based approaches allow organizations to have informed discussions, backed by data, about when reliability work should be a priority and when feature work should be prioritized.&lt;/p&gt;

&lt;p&gt;Having better insights and understanding about systems, allows organizations to reduce the cognitive load on engineers to develop and maintain services. Smaller, multifunctional, autonomous teams will be able to operate their services with increased productivity. Toil reduction is made easier since you now have ways to quickly measure and assess the impact of any change introduced to the system.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The increasing complexity of systems drives the need for better ways to understand them. Observability bridges the gap between your mental models about a system and what they really are. Metrics, traces, and logs provide the necessary information for you to develop and maintain services at scale.&lt;/p&gt;

&lt;p&gt;SREs can leverage observability in order to enhance their understanding of systems. Increased visibility allows engineers to more easily understand what is happening under the hood and what actions need to be performed. Well-crafted SLOs and alerts help SREs reduce burnout and be more effective.&lt;/p&gt;

&lt;p&gt;Businesses benefit from observability by leveraging it to understand user satisfaction. By understanding how happy users are with your services, you can make informed decisions about the type of work that needs to be prioritized. This increased systems understanding will allow engineers to reduce the cognitive load necessary to develop and maintain them, opening the door to smaller, multifunctional teams to be more effective.&lt;/p&gt;

&lt;p&gt;Keeping users happy and engineers more productive will help businesses thrive. Site Reliability Engineering will leverage observability tools to make that a reality.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://www.squadcast.com/" rel="noopener noreferrer"&gt;Squadcast&lt;/a&gt; is an incident management tool that’s purpose-built for SRE. Your team can get rid of unwanted alerts, receive relevant notifications, work in collaboration using the virtual incident war rooms, and use automated tools like runbooks to eliminate toil.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.squadcast.com/register/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuploads-ssl.webflow.com%2F5c51758c58939b30a6fd3d73%2F60d2ec8e2d9d85d17141958f_footer_banner-2000x761.png"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>sre</category>
      <category>observability</category>
      <category>monitoring</category>
    </item>
    <item>
      <title>Using a Kubernetes Service Mesh Worth It?</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Sat, 11 Dec 2021 08:37:25 +0000</pubDate>
      <link>https://dev.to/mccricardo/using-a-kubernetes-service-mesh-worth-it-38fc</link>
      <guid>https://dev.to/mccricardo/using-a-kubernetes-service-mesh-worth-it-38fc</guid>
      <description>&lt;p&gt;"A service mesh is a dedicated infrastructure layer that decouples some of the critical operational tasks of a distributed application from its business logic. Large-scale, Kubernetes-hosted microservice applications are natural candidates for service meshes due to their complex requirements of inter-services communication (e.g., retries, timeouts, traffic splitting), observability (e.g., metrics, &lt;a href="https://www.containiq.com/post/kubernetes-logging" rel="noopener noreferrer"&gt;logs&lt;/a&gt;, traces), and &lt;a href="https://www.containiq.com/post/kubernetes-security-best-practices" rel="noopener noreferrer"&gt;security features&lt;/a&gt; (e.g., authentication, authorization, encryption). Service meshes can offload many operational concerns of the &lt;a href="https://www.containiq.com/post/kubernetes-cluster" rel="noopener noreferrer"&gt;Kubernetes cluster&lt;/a&gt;, leaving the developers to focus on business logic."&lt;/p&gt;

&lt;p&gt;Is using a service mesh in Kubernetes really worth the trouble? Not sure? Then check &lt;a href="https://www.containiq.com/post/kubernetes-service-mesh" rel="noopener noreferrer"&gt;this&lt;/a&gt; out.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to improve your influence as an SRE</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Mon, 06 Dec 2021 12:45:21 +0000</pubDate>
      <link>https://dev.to/squadcast/how-to-improve-your-influence-as-an-sre-1eka</link>
      <guid>https://dev.to/squadcast/how-to-improve-your-influence-as-an-sre-1eka</guid>
      <description>&lt;p&gt;&lt;em&gt;Improving your influence over the company will help you deliver high quality work as your goals will be closely aligned with those of the company. In this blog piece, &lt;a href="https://www.linkedin.com/in/mccricardo/" rel="noopener noreferrer"&gt;Ricardo&lt;/a&gt; has explained how to improve your influence as an SRE.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Balancing fast-paced business requirements with the demands of keeping production services stable is not an easy task. SRE is an opinionated implementation of DevOps and is defined by Ben Sloss, VP of Engineering at Google as “what happens when you ask a software engineer to design an operations function”. And it even comes with a completely free &lt;a href="https://landing.google.com/sre/sre-book/toc/index.html" rel="noopener noreferrer"&gt;manual&lt;/a&gt; and &lt;a href="https://landing.google.com/sre/workbook/toc/" rel="noopener noreferrer"&gt;workbook&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Although SRE aims to be a “prescription” on how to run complex systems the right way, reliability can mean different things in different contexts. And, usually, unless things go wrong it’s hard to prioritize reliability work ahead of features and bug fixes.&lt;/p&gt;

&lt;p&gt;How can SREs encourage teams to think about their operational excellence? How can SREs go about making reliability part of everyone’s daily practices? How can SREs effectively influence people to take reliability seriously and incorporate SRE concepts and practices into their routines? It turns out this is one of the most important question every SRE faces.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Influence vs Authority&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When trying to disseminate a practice and cultivate change, you can usually go one of two routes: influence or authority. Influence is “the capacity to have an effect on the character, development, or behavior of someone or something, or the effect itself”. In your context, the goal is to provide best practices, resources, and tools in the hope teams adopt them.&lt;/p&gt;

&lt;p&gt;In contrast, authority is “the power or right to give orders, make decisions, and enforce obedience”. Applied to your context, it would be to dictate that teams must follow and adopt several operational practices.&lt;/p&gt;

&lt;p&gt;Both approaches can be valuable, depending on the context. For example, for critical systems (e.g. healthcare, aviation) authority might be required to ensure a certain level of safety. On the other hand, authority can be a detriment for teams, making them not feel part of the decision process, not taking into consideration their unique context, and alienating them. With that in mind, you want to be as influential as possible regarding reliability.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Improving SRE influence&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When it comes to improving influence there are several ways you can go about it. Applied to an SRE context, there are several tactics you can employ that will help you make reliability part of the discussion when building complex systems.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Make sure people understand your purpose and motivations&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;When people don’t understand your motivations and goals it’s natural for them to become defensive; it’s human nature. It will be a lot easier to spread a reliability mindset if people understand what you’re trying to achieve.&lt;/p&gt;

&lt;p&gt;If you’re a central SRE team make it crystal clear what your team does. Clarify if it’s an operational team that takes care of services in production or if it’s a team more focused on guidelines and tooling. Create artifacts that people can access asynchronously (e.g. internal documentation, blog posts) that makes it easy to understand what you’re working towards. Give internal presentations about your work and roadmap and make your team available (e.g. mailing list, slack channel) for consultation or even just for informal chats.&lt;/p&gt;

&lt;p&gt;In general, people will be more receptive and address your concerns if they know what you’re all about and that they can reach you when necessary.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Drive an understanding that SRE work ties directly to business goals&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;A system’s reliability is determined, fundamentally, by its ability to do what its users need it to do. It will then be determined by how happy users are and you know those happy users are good for business. Accepting that reliability is one of the most important requirements of any service, users determine its reliability.&lt;/p&gt;

&lt;p&gt;SRE work will be intimately tied to business goals. Satisfied users will generate value (e.g. revenue, product popularity) and reliability is a huge contributor to that perception. It will be important to drive this understanding that you’re not focusing on reliability just to be picky but because that concern will make your business prosper.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Create a common language to talk about reliability&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;You’ve probably been in a situation where you’re trying to communicate with someone that does not speak the same language as you. Maybe you’ve gone to a foreign country, you’re asking for directions and you don’t speak the local language. Eventually, you make whoever you’re trying to speak with understand, you just want the directions to that awesome attraction and they do their best to point you in the right direction. More often than not, it’s a difficult exchange.&lt;/p&gt;

&lt;p&gt;Similarly, if you approach product development teams without a clear way to talk about and measure reliability, it will be hard to reason about it. Creating a shared language to talk about reliability, assess it and prioritize work will be detrimental to the success of your quest. The &lt;a href="https://www.oreilly.com/library/view/implementing-service-level/9781492076803/ch01.html" rel="noopener noreferrer"&gt;reliability stack&lt;/a&gt; will give you the basis for a framework that will make reliability conversations a lot easier. SLIs will provide you with the necessary reliability measurements while SLOs will allow you to assess, within a certain period of time, how reliable your system is. With those pieces in place, Error Budgets will make it easier to prioritize work that addresses reliability concerns.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Get buy-in&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Because there will always be bugs to fix and features to deliver, reliability will often be an afterthought. Getting buy-in will ensure teams have reliability in mind and will advocate for it on your behalf.&lt;/p&gt;

&lt;p&gt;Identify key stakeholders that will help you “spread the message” and treat reliability like an obvious requirement. This will be highly dependent on your organization, but before diving into processes and tools, you should first focus on people. Maybe you need to get product development teams onboard first so that management feels that, not only, reliability is important but that teams are taking it seriously and are receptive to prioritize reliability work. Or maybe you need to address it the other way around, getting buy-in from executives so that development teams understand the need for reliability and feel safe spending time working on it.&lt;/p&gt;

&lt;p&gt;Whatever route makes more sense in your context, it will definitely help you improve reliability awareness when key stakeholders are “on your side” and they themselves drive those discussions with peers as well as management.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Make your work visible&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;SRE work is, effectively, work. There’s engineering work but there’s also a lot of work related to advocating, coaching, or consulting. And it should be clear to everyone what you’re working on, what your goals are, what you’re trying to achieve, what your roadmap is.&lt;/p&gt;

&lt;p&gt;Whatever tools and processes product development teams are using, you should be using similar ones. This will help standardize how work is tracked and prioritized. It will allow teams to easily understand what you’re focusing on, if they require something from you that you’re not prioritizing or if your shared goals might be compromised.&lt;/p&gt;

&lt;p&gt;Making sure your work is visible will assure teams you don’t have any hidden agenda and that you’re all working with the same goals in mind.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Communicate extensively; always be on sales mode; build bridges&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;It’s very important to build bridges. People are a lot more receptive to hearing your thoughts and ideas if they trust you. If you start, out of the gate, telling people what they need to fix and prioritize, you’ll be met with a lot of resistance.&lt;/p&gt;

&lt;p&gt;Start by sitting down with teams and understanding what they do, what their products are, what pain points they have, and what they would like to improve. Actively listening can take you a long way. Ask questions, clarify issues, and understand what’s at stake. You’ll want teams to see you as a partner, that wants to make their lives easier and not as an adversary.&lt;/p&gt;

&lt;p&gt;An “us vs them” mentality can be attained quickly if you start imposing reliability-concern gates. Either with lengthy manual processes or automated blocking checks, enforcing might come at the expense of the team’s goodwill. Instead, work with them to make sure those concerns are valid, share engineering work that will address those concerns, and communicate well in advance about when, and if any blocking gate will be put in place.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Be self-service, not a bottleneck&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;SRE work is never-ending. It’s a day-to-day practice that needs to scale with the organization. And one of the best ways to scale it is to be self-service.&lt;/p&gt;

&lt;p&gt;You should be building tools that would make it easy for teams to incorporate reliability concerns into their work. For example, you could be building and maintaining libraries that export the necessary metrics to your monitoring system or that standardize logging. Or you could be building automation capabilities that would help diagnose problems in your systems. Or you could be building tools that automate manual tasks and address known issues within your systems. Most importantly, you don’t want to be a bottleneck. You want teams to be as independent as possible to do their work and deliver value to the business.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;SRE involves a lot of engineering work encompassing, at the same time, a lot of communication. A lot of that communication is targeted at influencing teams to take reliability seriously and make it part of their work.&lt;/p&gt;

&lt;p&gt;Making sure that teams understand what you're working towards is critical to get people on board. You should communicate extensively, create artifacts, give internal talks, partner with teams, and make your work visible. Make sure teams understand that reliability is measured by how happy users are with your services, that reliability work is focused on making sure they are satisfied, and that the business will thrive on that.&lt;/p&gt;

&lt;p&gt;Get people on board, get their buy-in. Your message and goals will be easier to spread if you have advocates on your side. Identify key stakeholders, work with them, understand their concerns and build with them a common understanding of what reliability looks like, that they would happily share with others. Having a shared language or framework, like the &lt;a href="https://www.oreilly.com/library/view/implementing-service-level/9781492076803/ch01.html" rel="noopener noreferrer"&gt;reliability stack&lt;/a&gt;, will make it a lot easier to talk about, assess, and prioritize reliability work.&lt;/p&gt;

&lt;p&gt;At the end of the day, you want to deliver value and enable teams to focus on delivering value to the business. Make yourself self-service. Build tools that help improve reliability, which is a no-brainer to use. Help teams solve pain points through automation. Build self-remediation tools to help address known issues in your system. And make sure you don’t become just another 'pain' or 'gate' that teams complain and dread about. You should be seen as a partner, as a team that works with the same goals in mind and that is there to help when necessary.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://www.squadcast.com/" rel="noopener noreferrer"&gt;Squadcast&lt;/a&gt; is an incident management tool that’s purpose-built for SRE. Your team can get rid of unwanted alerts, receive relevant notifications, work in collaboration using the virtual incident war rooms, and use automated tools like runbooks to eliminate toil.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://app.squadcast.com/register/" rel="noopener noreferrer"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ljesGLP7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://uploads-ssl.webflow.com/5c51758c58939b30a6fd3d73/60d2ec8e2d9d85d17141958f_footer_banner-2000x761.png" width="800" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>sre</category>
      <category>devops</category>
    </item>
    <item>
      <title>How to Measure System Reliability</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Sat, 13 Nov 2021 17:19:31 +0000</pubDate>
      <link>https://dev.to/mccricardo/how-to-measure-system-reliability-l00</link>
      <guid>https://dev.to/mccricardo/how-to-measure-system-reliability-l00</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://www.cprime.com/resources/blog/how-to-measure-system-reliability/" rel="noopener noreferrer"&gt;Cprime&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As businesses grow, new requirements arise for teams. The technology ecosystem becomes ever more complex and it is really important to understand each change and how it affects the overall system, as well as the service provided to users, who have high expectations. They expect systems to be up, responsive, fast, consistent, and reliable.&lt;/p&gt;

&lt;p&gt;System ReliabilityReliability for systems means that a system is doing what its users need it to do. The reliability of a system is essentially how happy the customer is and we know that a happy customer is better for business. If we accept that reliability is one of the most important requirements of any service, users determine this reliability, and it’s okay to not be perfect all the time. We need a way of thinking that can encompass these truths. We have limited resources to spend, be they financial, human, or political.&lt;/p&gt;

&lt;h2&gt;
  
  
  Service Level Indicators
&lt;/h2&gt;

&lt;p&gt;A metric is a measurement of something about a system. Good examples are the amount of memory a server is using, the time it takes an HTTP request to be fulfilled, or if an HTTP response was an error. Metrics are extremely important to understand a system and develop higher-level constructs that help us assess a system’s reliability.&lt;/p&gt;

&lt;p&gt;Since we can’t measure user happiness directly, &lt;strong&gt;Service Level Indicators (SLIs)&lt;/strong&gt; are proxies to help us gauge user satisfaction. &lt;strong&gt;SLIs&lt;/strong&gt; represent a quantifiable measure of service reliability and we can calculate them:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;SLI = (Good events / Valid Events) * 100%&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What is, then, a Good Event? This can be challenging to define. For example, measuring the latency for a service is not enough. What good latency is, needs to be defined so that the &lt;strong&gt;SLI&lt;/strong&gt; is useful. It forces a binary state to be achieved, even if the underlying metrics don’t provide a binary state.&lt;/p&gt;

&lt;p&gt;A good example of an &lt;strong&gt;SLI&lt;/strong&gt; would be:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Requests to a service will be responded to within 200ms.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Good events would be all requests that are responded to within 200ms. This &lt;strong&gt;SLI&lt;/strong&gt; provides information about whether or not the service is up if it is available, and also if it is responsive. With a simple &lt;strong&gt;SLI&lt;/strong&gt;, we can get a lot of information from the service state. The trick is to keep it simple and iterate. A good way to go about this is to choose important features the service is providing and measure what it’s valued by its users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SLIs&lt;/strong&gt; are foundational to assess the reliability of a system and are therefore very important that they are chosen meaningfully. If an &lt;strong&gt;SLI&lt;/strong&gt; isn’t good, concepts like &lt;strong&gt;SLOs&lt;/strong&gt; and &lt;strong&gt;Error Budgets&lt;/strong&gt; aren’t either. Why is this important? If reliability is always measured from the user’s perspective, a user can be a human or a machine,  and we choose an indicator that doesn’t measure user happiness, all  &lt;strong&gt;SLOs&lt;/strong&gt;, and &lt;strong&gt;Error Budgets&lt;/strong&gt; would be useless since users would be unhappy whether we are achieving the objective or not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Service Level Objectives
&lt;/h2&gt;

&lt;p&gt;With an &lt;strong&gt;SLI&lt;/strong&gt; defined, a goal to be achieved is the next target. In other words, an &lt;strong&gt;SLI&lt;/strong&gt;defines what matters to users, while a &lt;strong&gt;Service Level Objective (SLO)&lt;/strong&gt; defines how many times it has to be achieved for users to be happy with the service.&lt;/p&gt;

&lt;p&gt;In a perfect world, 100% would be the target. Unfortunately, in the real world, reliability is expensive, and to achieve 100% no failures could occur. But the internet is complex. There are switches, cables, routers, ISPs, CDNs, etc, – and all of that sits between systems and the users using them. At any point in time, any of those can fail. With a slightly less reliable service, a user cannot distinguish between the failure of a system or the internet’s infrastructure. Systems should be built to be reliable enough to make the users happy, no more no less, and allow teams to invest time in providing business value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SLOs&lt;/strong&gt; are targets that are agreed upon, about what it means to be reliable enough,  for a service that is being provided during a period of time. It means that the more reliable a system has to be, the more expensive it will become.&lt;/p&gt;

&lt;p&gt;A good example of an &lt;strong&gt;SLO&lt;/strong&gt; would be:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;99% of requests to a service need to be responded to within 200ms within a 30 day period.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Error Budgets
&lt;/h2&gt;

&lt;p&gt;What is left from an &lt;strong&gt;SLO&lt;/strong&gt; is called an &lt;strong&gt;Error budget&lt;/strong&gt;. For example, when defining an &lt;strong&gt;SLO&lt;/strong&gt; of 99%, the &lt;strong&gt;Error Budget&lt;/strong&gt; would be 1%. &lt;strong&gt;Error Budgets&lt;/strong&gt; can be calculated:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Error Budget = 100% – SLO&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For the previous example, when the measurement period starts, 1% is the &lt;strong&gt;Error Budget&lt;/strong&gt; available. During the 30 days period, incidents will burn the &lt;strong&gt;Error Budget&lt;/strong&gt; each time they happen. An &lt;strong&gt;Error Budget&lt;/strong&gt; is effectively the percentage of reliability left, and it helps make educated decisions on whether, for example, to release a new feature or not based on the risk. They help make sure the operability process (e.g. incident response) is appropriate to the budget available for the service being provided.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SLIs&lt;/strong&gt;, &lt;strong&gt;SLOs&lt;/strong&gt;, and &lt;strong&gt;Error Budgets&lt;/strong&gt; form a framework that makes it possible to define what reliability means for services. It allows &lt;a href="https://www.cprime.com/resource/webinars/implementing-site-reliability-engineering-in-your-organization/" rel="noopener noreferrer"&gt;reliability&lt;/a&gt; to be continuously measured and provides a platform for educated decisions to be made about how to prioritize features against reliability work. It allows development and operations teams to agree on what reliability means for a service, supported by data and avoiding unnecessary confrontation. It allows teams to collaborate, as well as focus on their specific work, by making sure user satisfaction is measured and assessed.&lt;/p&gt;

</description>
      <category>sre</category>
      <category>sitereliabilityengineering</category>
      <category>reliability</category>
      <category>reliabilityengineering</category>
    </item>
    <item>
      <title>Troubleshooting Kubernetes FailedAttachVolume and FailedMount</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Thu, 11 Nov 2021 10:29:39 +0000</pubDate>
      <link>https://dev.to/mccricardo/troubleshooting-kubernetes-failedattachvolume-and-failedmount-3i14</link>
      <guid>https://dev.to/mccricardo/troubleshooting-kubernetes-failedattachvolume-and-failedmount-3i14</guid>
      <description>&lt;p&gt;You've been working with Kubernetes and sometime your stateful workloads fail. You regularly get &lt;strong&gt;FailedAttachVolume&lt;/strong&gt; and &lt;strong&gt;FailedMount&lt;/strong&gt; errors and you have no idea what's going on.&lt;/p&gt;

&lt;p&gt;If you want to find out what's going on and how you can go about fixing quickly them, check &lt;a href="https://www.containiq.com/post/fixing-kubernetes-failedattachvolume-and-failedmount" rel="noopener noreferrer"&gt;this&lt;/a&gt; out.&lt;/p&gt;

</description>
      <category>kubernetes</category>
    </item>
    <item>
      <title>From Zero to SRE</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Tue, 05 Oct 2021 16:24:10 +0000</pubDate>
      <link>https://dev.to/squadcast/from-zero-to-sre-1ep4</link>
      <guid>https://dev.to/squadcast/from-zero-to-sre-1ep4</guid>
      <description>&lt;p&gt;Traditionally, developing applications and running them in production was seen as completely separate worlds, usually being the focus and concern of different teams. This kind of separation gives birth to the proverbial wall that separates development and operations, where developers “throw” their code over the wall and expect operations teams to run and manage them in production. This results in teams having different and conflicting goals: development teams prioritize building and shipping new features while operations teams focus on system stability, where code changes are seen as potential threats.&lt;/p&gt;

&lt;p&gt;With systems getting larger and larger, this type of situation does not scale, and a new way of doing things needed to emerge. And in 2009 Patrick Debois coined the term “DevOps”, a set of principles and practices with emphasis on people and culture and the goal of improving collaboration between development and operations teams.&lt;/p&gt;

&lt;p&gt;A few years before, facing a similar situation, Google put Benjamin Treynor in charge of a team with the goal of ensuring that Google’s websites were available, reliable, and as serviceable as possible. Since Benjamin was a software engineer he approached an operations problem with a software engineering perspective, giving birth to what is today known as Site Reliability Engineering (SRE): “what happens when you ask a software engineer to design an operations team”. SRE rose to fame around 2016 after Google published the book &lt;a href="https://www.goodreads.com/book/show/27968891-site-reliability-engineering?ac=1&amp;amp;from_search=true&amp;amp;qid=yB0J8Ly3I0&amp;amp;rank=1" rel="noopener noreferrer"&gt;Site Reliability Engineering: How Google Runs Production Systems&lt;/a&gt;, describing a lot of the practices they use to run their systems in production.&lt;/p&gt;

&lt;p&gt;SRE is all about running reliable production systems. Big companies like Google, Facebook, or Amazon run large production systems and face many challenges most companies rarely do. Despite that, the way they run their systems can help us run ours. But even armed with all that information, how do we go about starting our SRE journey?&lt;/p&gt;

&lt;h2&gt;
  
  
  Firefighting
&lt;/h2&gt;

&lt;p&gt;In the beginning, teams are reactive. There are a lot of moving parts, highly complex systems, failures appearing right, left, and center. The world is chaotic and it seems close to impossible to apply any sort of engineering practice to tackle the situation. At this stage, teams don’t have many options and need to keep struggling, responding to a myriad of crises, while trying to reserve some time, energy, and focus to try and improve the situation. Putting brakes on feature development can help stabilize a system, getting teams some relief. Adding people to teams that can focus on automation, can help reduce toil.&lt;/p&gt;

&lt;p&gt;This is a difficult stage for teams. It requires a dual perspective since they will need to keep systems running while building a new approach to run operations. This is also a reflection on operations teams being brought late into the product cycle. They can be made aware of a new service or a new set of requirements just before a service needs to go live, or even worse, when something is already live and failing miserably.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gatekeeping
&lt;/h2&gt;

&lt;p&gt;Usually, one of the first measures that are put in place to deal with firefighting is gatekeeping. The goal is to make every change to production pass through and be approved by the SRE team. On a small scale, this approach can work for a while. But, as systems and teams grow, SRE teams start being a choke point, limiting change and slowing down other teams.&lt;/p&gt;

&lt;p&gt;At this stage, SRE teams work to become more engaged with development teams by implementing processes. While this reflects positive engagement, it can derail into an us-versus-them struggle, leading teams to circumvent the processes and SRE teams all together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Partnering
&lt;/h2&gt;

&lt;p&gt;When there are frameworks in place (e.g. SLOs and Error Budgets) that can be used to measure reliability and make decisions on how to act, SRE teams can remove themselves from the critical paths to production. They can then partner with development teams and work together to meet the desired reliability criteria. At the same time, SRE teams will be continually involved in how to measure the impact on user experience. At this stage, SREs are involved in the process earlier in the cycle and work alongside development teams right from the start, on the reliability of the product.&lt;/p&gt;

&lt;p&gt;Relationships between teams become a lot less antagonistic. SRE teams are regularly sought for cooperation since they enable much higher satisfaction and long-term value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enabling
&lt;/h2&gt;

&lt;p&gt;When reliability is part of the process, SREs are involved in the full lifecycle of a service, from creation to decommissioning. SREs can act as consultants, bringing consciousness about business goals, reliability, and security. Processes are in place to allow teams to measure how reliable their services are and how to act when necessary. This allows scalability since teams can operate independently while being able to rely on SREs when necessary. Development teams have the ability to pull SREs and SREs don’t need to impose demands. A voluntary, data-supported engagement between teams becomes enjoyable and sustainable.&lt;/p&gt;

&lt;p&gt;Enabling SRE teams to become highly functional is a long process. It takes time and some steps are “mandatory”. Starting in firefighting mode is almost inevitable for most organizations. It is then, when they realize that a new approach to manage operations needs to emerge. At this stage, some time has to be set aside so that teams can work on processes and tools to help ease the pain of constant firefighting. A lightweight gatekeeping stage can help bring teams together as well as identifying processes and automation that would pave the way to the partnering stage. Enabling stage is the end goal where teams work together, armed with tools that help measure reliability, and processes that help prioritize work and decide how to proceed when reliability is at risk.&lt;/p&gt;

&lt;p&gt;While some short-circuiting can be done to accelerate the process, some stages build on others and use them as foundations. High-level management support can help accelerate the evolution by allowing teams to focus on prioritizing the work that will make them reach the enabling stage. Focus on success stories to help build momentum. A lot of SRE is cultural, a different way of doing things. Successes help build a narrative and motivate people to follow the same path.&lt;/p&gt;

&lt;p&gt;Creating an SRE team can seem like a daunting task and there are several topologies that can be adopted. Each organization needs to find what better suits its needs. But there are some guiding principles to help navigate this journey:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Start small and iterate&lt;/strong&gt; -  in the beginning, keep it simple. Select a small group of people to implement SRE practices. Find what works and what doesn’t. Iterate and onboard new practices&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Find the right people&lt;/strong&gt; - SRE teams should have a mix of domain knowledge. Either through internal or external hiring, aim to build teams with a diverse set of skills&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scan for the right qualities&lt;/strong&gt; - depending on the scope and topology of the team, the skill set might defer. Some good qualities to scan for are the ability to see the bi picture, the ability to troubleshoot,  good communication skills, desire to remove toil, a knack to dig deeper, and do excellent teamwork&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Training&lt;/strong&gt; - a lot of SRE work is cultural. The ability to communicate well and provide training to teams is paramount&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Guidelines and Governance&lt;/strong&gt; - SRE teams help facilitate the adoption of a reliability mindset. They can help establish guidelines that make it easier for teams to onboard reliability practices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Either through a separate SRE team or any other &lt;a href="https://www.goodreads.com/book/show/44135420-team-topologies" rel="noopener noreferrer"&gt;topology&lt;/a&gt;, it’s important to start simple and iterate. Introduce SRE principles, assess, find out what works, and then incorporate. Navigating from Firefighting to Enabling is a journey and it will be slightly different for each organization.&lt;/p&gt;

</description>
      <category>sre</category>
      <category>sitereliabilityengineering</category>
      <category>reliabilityengineering</category>
    </item>
    <item>
      <title>From Monolith to Microservices and Beyond</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Tue, 05 Oct 2021 16:22:09 +0000</pubDate>
      <link>https://dev.to/mccricardo/from-monolith-to-microservices-and-beyond-12ce</link>
      <guid>https://dev.to/mccricardo/from-monolith-to-microservices-and-beyond-12ce</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://www.cprime.com/resources/blog/from-monolith-to-microservices-and-beyond/" rel="noopener noreferrer"&gt;Cprime&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Monolithic architectures were the de facto standard of how we built internet applications. Despite still being used nowadays, microservices have grown in popularity and are becoming the established architecture to build services. Service-oriented Architectures (SoA) are not new but the specialization into microservices, which are loosely coupled, and independently deployable smaller services, that focus on a single well-defined business case, became wildly popular since they enable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faster delivery&lt;/li&gt;
&lt;li&gt;Isolation&lt;/li&gt;
&lt;li&gt;Scaling&lt;/li&gt;
&lt;li&gt;Culture&lt;/li&gt;
&lt;li&gt;Flexibility&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Distributed systems are complex. The above (simplified) diagram depicts how a monolith can be broken down into microservices but hides a lot of complexity, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Service discovery&lt;/li&gt;
&lt;li&gt;Load balancing&lt;/li&gt;
&lt;li&gt;Fault tolerance&lt;/li&gt;
&lt;li&gt;Distributed tracing&lt;/li&gt;
&lt;li&gt;Metrics&lt;/li&gt;
&lt;li&gt;Security&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mm9aa9hip2fm1uui5t2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mm9aa9hip2fm1uui5t2.jpg" alt="Alt Text" width="498" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As systems grow bigger and bigger these challenges become exacerbated to the point where they become virtually impossible to tackle by teams focusing on specific business cases.&lt;/p&gt;

&lt;p&gt;With the advent and popularization of containers, technologies emerged to tame the ever-growing operations demand, offering rich sets of features. Enter &lt;a href="https://kubernetes.io/" rel="noopener noreferrer"&gt;Kubernetes&lt;/a&gt;, the most popular container platform today, supported by every major cloud provider, offering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automated rollouts and rollbacks&lt;/li&gt;
&lt;li&gt;Storage orchestration&lt;/li&gt;
&lt;li&gt;Automatic bin packing&lt;/li&gt;
&lt;li&gt;Self-healing&lt;/li&gt;
&lt;li&gt;Service discovery and load balancing&lt;/li&gt;
&lt;li&gt;Secret and configuration management&lt;/li&gt;
&lt;li&gt;Batch execution&lt;/li&gt;
&lt;li&gt;Horizontal scaling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Orchestration platforms like Kubernetes aim to ease the operational burden on teams while bringing some new development patterns to the mix. But while this is true, there’s some effort that still has to be put into operating services, from the development team’s point of view. Platforms like Kubernetes have their own “language” that needs to be understood so that applications can be deployed on it as well as a diverse set of configuration features and requirements. For example,  for Kubernetes to optimally handle service lifecycle, services should provide health endpoints that Kubernetes will use to probe and decide when to restart such service.&lt;/p&gt;

&lt;p&gt;Although Kubernetes was developed to orchestrate containers at large, it does not manage containers directly. Instead, it manages &lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/" rel="noopener noreferrer"&gt;Pods&lt;/a&gt; which are groups of containers that share storage and network resources and have the same lifecycle. Kubernetes guarantees that all containers inside a Pod are co-located and co-scheduled and that they all run in a shared context.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe9218g2a2oxasrfee4ho.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe9218g2a2oxasrfee4ho.jpg" alt="Alt Text" width="441" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These shared facilities between containers facilitate the adoption of patterns for composite containers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sidecar&lt;/strong&gt; - extend and enhance the main container, making it better (e.g filesystem sync)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ambassador&lt;/strong&gt; - proxy connections to and from the outside world (e.g. HTTP requests)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adapter&lt;/strong&gt; - standardize and normalize output from sources (e.g. data from centralized logging)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By going deeper into microservices architectures, with the ultimate goal of each microservice focusing only on its own business logic, we can hypothesize that some functionalities could be abstracted and wrapped around the business logic using the above composite patterns. In general, services require:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lifecycle management&lt;/strong&gt; - deployments, rollbacks, configuration management, (auto)scaling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Networking&lt;/strong&gt; - service discovery, retries, timeouts, circuit breaking, dynamic routing, observability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource binding&lt;/strong&gt; - message transformation, protocol conversion, connectors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stateful Abstractions&lt;/strong&gt; - application state, workflow management, distributed caching&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Service Mesh
&lt;/h2&gt;

&lt;p&gt;A Service Mesh is a dedicated and configurable infrastructure layer with the intent of handling network-based communication between services. &lt;a href="https://istio.io/" rel="noopener noreferrer"&gt;Istio&lt;/a&gt; and &lt;a href="https://linkerd.io/" rel="noopener noreferrer"&gt;Linkerd&lt;/a&gt; are two examples of implementations. Most implementations usually have two main components: the Control plane and the Data plane. The Control plane manages and configures the proxies that compose the Data plane. Those Data plane proxies are deployed as sidecars and can provide functionalities like service discovery, retries, timeouts, circuit breaking, fault injection, and much more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flc04da6pd6x425n5etzl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flc04da6pd6x425n5etzl.jpg" alt="Alt Text" width="561" height="241"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By using a Service Mesh, services can offload these concerns and focus on business rules. And since microservices can be developed using different languages and frameworks, by abstracting these functionalities, they do not have to be redeveloped and maintained for each scenario.&lt;/p&gt;

&lt;h2&gt;
  
  
  Serverless Computing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Serverless_computing" rel="noopener noreferrer"&gt;Serverless computing&lt;/a&gt; comes into play with the promise of freeing teams from having to deal with operational tasks. The general idea with Serverless computing is to be able to provide the service code, together with some minimal configuration, and the provider will take care of the operational aspects. Most cloud providers have serverless offerings and there are also serverless options on top of Kubernetes that use some of the patterns mentioned before. Some examples are &lt;a href="https://knative.dev/docs/" rel="noopener noreferrer"&gt;Knative&lt;/a&gt;, &lt;a href="https://kubeless.io/" rel="noopener noreferrer"&gt;Kubeless&lt;/a&gt;, or &lt;a href="https://www.openfaas.com/" rel="noopener noreferrer"&gt;OpenFaaS&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Distributed Application Runtimes
&lt;/h2&gt;

&lt;p&gt;Projects like &lt;a href="https://dapr.io/" rel="noopener noreferrer"&gt;Dapr&lt;/a&gt; aim to be the Holy Grail for application development. Their goal is to help developers build resilient services that run in the cloud. By codifying best practices for building microservices into independent and agnostic building blocks that can be used only if necessary, they allow services to be built using any language or framework and run anywhere.&lt;/p&gt;

&lt;p&gt;They offer capabilities around networking (e.g. service discovery, retries), observability (e.g. tracing) as well as capabilities around resource binding like connectors to cloud APIs and publish/subscribe systems. Those functionalities can be provided to services via libraries or deployed using sidecars.&lt;/p&gt;

&lt;h2&gt;
  
  
  Microservices and Beyond
&lt;/h2&gt;

&lt;p&gt;Microservices are entering an era of multi-runtime, where interactions between the business logic and the outside world are done through sidecars. Those sidecars offer a lot of abstractions around networking, lifecycle management, resource binding, and stateful abstractions. We get the benefits of microservices with bounded contexts handling their own piece of the puzzle.&lt;/p&gt;

&lt;p&gt;Microservices will focus more and more on differentiating business logic, taking advantage of battle-tested, off-the-shelf sidecars that can be configured with a bit of YAML or JSON and updated easily since they’re not part of the service itself. Together they will compose the intricate web services that will power the future. &lt;/p&gt;

</description>
      <category>microservices</category>
    </item>
    <item>
      <title>How awesome is cookiecutter?</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Wed, 07 Jul 2021 17:05:31 +0000</pubDate>
      <link>https://dev.to/mccricardo/how-awesome-is-cookiecutter-m9f</link>
      <guid>https://dev.to/mccricardo/how-awesome-is-cookiecutter-m9f</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://mccricardo.com/cookiecutter/" rel="noopener noreferrer"&gt;mccricardo.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Have you ever been in the sittuation of trying to structure a project but having no idea how? Maybe you're new to a specific technology and have no clue how to organize things. Or maybe you start projects often and keep repeating the same set of tasks over and over again.&lt;/p&gt;

&lt;p&gt;If you read &lt;a href="https://mccricardo.com/backstage-software-templates/" rel="noopener noreferrer"&gt;Backstage Software Templates&lt;/a&gt; maybe you noticed something called &lt;strong&gt;cookiecutter&lt;/strong&gt;. So, what is it? Apart from being awesome, &lt;strong&gt;cookiecutter&lt;/strong&gt; is a command-line utility that is able to create projects from templates. This allows us and our teams to specify templates for projects, use those templates and share them among teams. We can even embed it into other tools, like &lt;a href="https://backstage.io/" rel="noopener noreferrer"&gt;Backstage&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quickstart
&lt;/h2&gt;

&lt;p&gt;There are &lt;a href="https://cookiecutter.readthedocs.io/en/1.7.2/installation.html" rel="noopener noreferrer"&gt;several options&lt;/a&gt; to install &lt;strong&gt;cookiecutter&lt;/strong&gt; but we will go with &lt;a href="https://pypi.org/project/pip/" rel="noopener noreferrer"&gt;pip&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;~ pip install --user cookiecutter
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have &lt;strong&gt;cookiecutter&lt;/strong&gt; installed, we can define our templates and start using them. Even better is the fact that we can use publicly available templates and start coding right away. For our purposes, we'll be creating a &lt;a href="https://golang.org/" rel="noopener noreferrer"&gt;Go&lt;/a&gt; project using the &lt;a href="https://github.com/lacion/cookiecutter-golang" rel="noopener noreferrer"&gt;cookiecutter-golang&lt;/a&gt; template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;~ cookiecutter https://github.com/lacion/cookiecutter-golang.git
full_name [Luis Morales]: Ricardo Castro
github_username [lacion]: mccricardo
app_name [mygolangproject]: demo
project_short_description [A Golang project.]: A demo
docker_hub_username [lacion]: mccricardo
docker_image [lacion/alpine-base-image:latest]: golang:1.16.5-apline3.14
docker_build_image [lacion/alpine-golang-buildimage]: golang:1.16.5-apline3.14
Select docker_build_image_version:
1 - 1.13
2 - 1.12.9
3 - 1.11.9
Choose from 1, 2, 3 [1]: 1
Select go_mod_or_dep:
1 - mod
2 - dep
Choose from 1, 2 [1]: 1
use_docker [y]: y
use_git [y]: y
use_logrus_logging [y]: y
use_viper_config [y]: y
use_cobra_cmd [y]: y
Select use_ci:
1 - travis
2 - circle
3 - none
Choose from 1, 2, 3 [1]: 3
Initialized empty Git repository in /home/mccricardo/test/demo/.git/
[master (root-commit) 2e82ac9] Initial Commit.
 13 files changed, 597 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 AUTHORS.md
 create mode 100644 CONTRIBUTING.md
 create mode 100644 Dockerfile
 create mode 100644 Makefile
 create mode 100644 README.md
 create mode 100644 cmd/root.go
 create mode 100644 cmd/version.go
 create mode 100644 config/config.go
 create mode 100644 go.mod
 create mode 100644 log/log.go
 create mode 100644 main.go
 create mode 100644 version/version.go
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After &lt;strong&gt;cookiecutter&lt;/strong&gt; has finished doing its &lt;em&gt;magic&lt;/em&gt; we can take a look at the result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;~ demo git:(master) ls
AUTHORS.md  cmd  config  CONTRIBUTING.md  Dockerfile  go.mod  log  main.go  Makefile  README.md  version
~ demo git:(master) cat main.go 
package main

import (
    "github.com/mccricardo/demo/cmd"
)

func main() {
    cmd.Execute()   
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As we can confirm, based on the &lt;a href="https://github.com/lacion/cookiecutter-golang" rel="noopener noreferrer"&gt;cookiecutter-golang&lt;/a&gt; template, &lt;strong&gt;cookiecutter&lt;/strong&gt; went ahead and created a folder strucutre as well as several files with boilerplate code.&lt;/p&gt;

&lt;p&gt;Go ahead and take a look at the &lt;a href="https://cookiecutter.readthedocs.io/en/1.7.2/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; as well as the &lt;a href="https://github.com/cookiecutter/cookiecutter" rel="noopener noreferrer"&gt;source code&lt;/a&gt; and add one more tool to your automation arsenal.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Giving back</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Sun, 04 Jul 2021 15:38:55 +0000</pubDate>
      <link>https://dev.to/mccricardo/giving-back-34bj</link>
      <guid>https://dev.to/mccricardo/giving-back-34bj</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://mccricardo.com/giving-back/" rel="noopener noreferrer"&gt;mccricardo.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The last two and half months have been intense. Nine conference talks, starting on a new role and a lot of reading have consumed a lot of time. Talks in particular take a lot of time. From thinking about a topic, building the presentation, to practicing, a lot of effort goes into making something with enough quality to be accepted at a conference. Coupled with regular blogging, it's like having a second job. So, why do I do it? And more importantly, why should most of us give it a try?&lt;/p&gt;

&lt;h2&gt;
  
  
  Paying it forward
&lt;/h2&gt;

&lt;p&gt;Most of my career has been built on the shoulders of giants. Everything from open-source software, splendid blog posts, to videos on complex topics have helped me progress and getter better at what I do. It's only fair to contribute back and help others. While once upon a time I contributed directly to &lt;a href="https://github.com/mozilla-b2g/mozbench/graphs/contributors" rel="noopener noreferrer"&gt;a&lt;/a&gt; &lt;a href="https://github.com/mozilla-services/pulseguardian/graphs/contributors" rel="noopener noreferrer"&gt;couple&lt;/a&gt; of OSS projects, nowadays I feel I add more value by blogging and giving talks. I still do the occasional contribution now and then.&lt;/p&gt;

&lt;h2&gt;
  
  
  Helping us learn
&lt;/h2&gt;

&lt;p&gt;Blogging and giving talks also help us learn. Often when I want to learn about a topic I decide on giving a talk and/or blog about it. Curiously, the fact of forcing ourselves to explain something to people helps us reason more clearly about that topic as well as understanding it more deeply.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a personal brand
&lt;/h2&gt;

&lt;p&gt;Putting ourselves out there makes people aware of we who are and what we do. Over time we start to build a personal brand and get known by the value we provide. It can help our professional careers as well as our self-confidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Impostor syndrome
&lt;/h2&gt;

&lt;p&gt;"Impostor syndrome refers to an internal experience of believing that you are not as competent as others perceive you to be" and this one of the main reasons people don't blog or give talks. Fun fact: we don't have to be the supreme authority on a topic to deliver expertise on it; people will benefit a lot from our hard work and will thank us for it. &lt;/p&gt;

&lt;h2&gt;
  
  
  It's fun
&lt;/h2&gt;

&lt;p&gt;If you're like me you'll always get a bit nervous once a new blog post gets published or your about to deliver a talk. That said, we learn to deal with that and it becomes fun. The benefits &lt;strong&gt;seriously&lt;/strong&gt; outweigh the risks. It's hard work but it's fun!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not give it a try?
&lt;/h2&gt;

&lt;p&gt;We don't have to give a hundred talks a year or write a blog post every day. We can start small, see how it feels, see what works and what doesn't, find our niches. Over time things start to gain momentum and the whole world benefits from it.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Backstage Software Templates</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Tue, 13 Apr 2021 21:37:28 +0000</pubDate>
      <link>https://dev.to/mccricardo/backstage-software-templates-2jf6</link>
      <guid>https://dev.to/mccricardo/backstage-software-templates-2jf6</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://mccricardo.com/backstage-software-templates/" rel="noopener noreferrer"&gt;mccricardo.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If our goal is to make our lives and the lives of those that work with us easier and happier, Backstage Software Templates can give us a hand. This tool can help us create Components inside Backstage that will load code skeletons, fill in some variables and publish that template somewhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's get this party started
&lt;/h2&gt;

&lt;p&gt;If you've been following along, in &lt;a href="https://mccricardo.com/backstage-intro/" rel="noopener noreferrer"&gt;Backstage intro&lt;/a&gt; we set up our Backstage installation locally and, conveniently, bootstrapped a lot of components, including Software Templates. Let's right to it.&lt;/p&gt;

&lt;p&gt;We'll start by selecting &lt;strong&gt;Create Component&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx00i1piod7bg5u6lrr00.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx00i1piod7bg5u6lrr00.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We'll then select &lt;strong&gt;Golang Microservice&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fisz3bpayqedtwju6k4mh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fisz3bpayqedtwju6k4mh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We'll be displayed a form requesting some necessary information. We'll fill it in and click &lt;strong&gt;Next Step&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssu746ddknsx1c04pa66.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssu746ddknsx1c04pa66.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A new form will be displayed that will allow us to set up VCS integration.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxmwqj1bkyiutnz55dly.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxmwqj1bkyiutnz55dly.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At last, we will be shown a review and we can proceed with &lt;strong&gt;Create&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdzxminl5sucpf9ymzt9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdzxminl5sucpf9ymzt9.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And Backstage will do its magic.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Famqmcqxsav9602i4rbkv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Famqmcqxsav9602i4rbkv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A new component will be created.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fho9he7eqkr5c5sdzydmm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fho9he7eqkr5c5sdzydmm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As well as a new repo with a lot of code.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4383kiunrf6fjgvzlcfh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4383kiunrf6fjgvzlcfh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2cdyvrbifbpdcqcfzud.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2cdyvrbifbpdcqcfzud.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's take a moment to take a look around and let that sink in.&lt;/p&gt;

&lt;h2&gt;
  
  
  What just happened?
&lt;/h2&gt;

&lt;p&gt;Based on a template, Backstage was able to create a new repo, full of code and integrations. The setup we did in &lt;a href="https://mccricardo.com/backstage-intro/" rel="noopener noreferrer"&gt;Backstage intro&lt;/a&gt; brought all of that free of charge. Taking a look at &lt;code&gt;app.config.yaml&lt;/code&gt; we can see:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="na"&gt;catalog&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;allow&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;Component&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;System&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;API&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Group&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;User&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Template&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Location&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
  &lt;span class="na"&gt;locations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;url&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://github.com/spotify/cookiecutter-golang/blob/master/template.yaml&lt;/span&gt;
      &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;allow&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;Template&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This points to the following template:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;backstage.io/v1alpha1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Template&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;golang-starter&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Golang Microservice&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Create a Golang repo with this template built by members of the Go community&lt;/span&gt;
  &lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;experimental&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;go&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;web@example.com&lt;/span&gt;
  &lt;span class="na"&gt;templater&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cookiecutter&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;service&lt;/span&gt;
  &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;
  &lt;span class="na"&gt;schema&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;component_id&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;project_short_description&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;docker_image&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;docker_build_image&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;docker_build_image_version&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;use_logrus_logging&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;use_viper_config&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;use_ci&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;use_cobra_cmd&lt;/span&gt;
    &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;component_id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Name&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Unique name of the component&lt;/span&gt;
      &lt;span class="na"&gt;project_short_description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Description&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Description of the component&lt;/span&gt;
      &lt;span class="na"&gt;docker_image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Docker Image&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;The docker base image to use when running the service&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;alpine-base-image:latest&lt;/span&gt;
      &lt;span class="na"&gt;docker_build_image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Docker Build Image&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;The docker base image to use when building the service&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;golang&lt;/span&gt;
      &lt;span class="na"&gt;docker_build_image_version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Docker Build Image Version&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;The image version to use when building the service&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
        &lt;span class="na"&gt;enum&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;alpine&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;alpine&lt;/span&gt;
      &lt;span class="na"&gt;use_logrus_logging&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Enable Logrus Logging (https://github.com/sirupsen/logrus)&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
        &lt;span class="na"&gt;enum&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;y"&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;n"&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;y"&lt;/span&gt;
      &lt;span class="na"&gt;use_viper_config&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Enable Viper Config (https://github.com/spf13/viper)&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
        &lt;span class="na"&gt;enum&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;y"&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;n"&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;y"&lt;/span&gt;
      &lt;span class="na"&gt;use_cobra_cmd&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Enable Cobra CLI Tools (https://github.com/spf13/cobra)&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
        &lt;span class="na"&gt;enum&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;y"&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;n"&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;y"&lt;/span&gt;
      &lt;span class="na"&gt;use_ci&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Add CI&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Add a CI config to the repo, Gitub Actions, Circle or Travis are the only supported right now&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
        &lt;span class="na"&gt;enum&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;github&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;travis&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;circle&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;none&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;github&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now something has to interpret this and do some magic. This is where &lt;code&gt;packages/backend/src/plugins/scaffolder.ts&lt;/code&gt; comes into play:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SingleHostDiscovery&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@backstage/backend-common&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;CatalogClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@backstage/catalog-client&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;CookieCutter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;CreateReactAppTemplater&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;createRouter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Preparers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Publishers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Templaters&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@backstage/plugin-scaffolder-backend&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Docker&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dockerode&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Router&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;PluginEnvironment&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../types&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;createPlugin&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="nx"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;database&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;PluginEnvironment&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Router&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cookiecutterTemplater&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CookieCutter&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;craTemplater&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CreateReactAppTemplater&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;templaters&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Templaters&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="nx"&gt;templaters&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cookiecutter&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cookiecutterTemplater&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;templaters&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cra&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;craTemplater&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;preparers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Preparers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;logger&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;publishers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Publishers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;logger&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dockerClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Docker&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;discovery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;SingleHostDiscovery&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;catalogClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CatalogClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;discoveryApi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;discovery&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;createRouter&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="nx"&gt;preparers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;templaters&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;publishers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;dockerClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;database&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;catalogClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;reader&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;@backstage/plugin-scaffolder-backend&lt;/code&gt; through &lt;code&gt;CookieCutter&lt;/code&gt; &lt;em&gt;"knows"&lt;/em&gt; how to bootstrap Golang projects based on &lt;a href="https://github.com/lacion/cookiecutter-golang" rel="noopener noreferrer"&gt;cookiecutter-golang&lt;/a&gt;. And that's how all the magic happens.&lt;/p&gt;

&lt;p&gt;Eventually, we will need to &lt;a href="https://backstage.io/docs/features/software-templates/adding-templates" rel="noopener noreferrer"&gt;add our own templates&lt;/a&gt; and we will need help &lt;a href="https://backstage.io/docs/features/software-templates/writing-templates" rel="noopener noreferrer"&gt;writing them&lt;/a&gt;. And if the &lt;a href="https://backstage.io/docs/features/software-templates/builtin-actions" rel="noopener noreferrer"&gt;builtin actions&lt;/a&gt; are not enough this might include writing &lt;a href="https://backstage.io/docs/features/software-templates/writing-custom-actions" rel="noopener noreferrer"&gt;custom actions&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Backstage Software Templates takes a big leap into providing standardization and help teams become more productive faster.&lt;/p&gt;

</description>
      <category>backstage</category>
    </item>
    <item>
      <title>Backstage TechDocs</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Mon, 05 Apr 2021 21:44:34 +0000</pubDate>
      <link>https://dev.to/mccricardo/backstage-techdocs-2k0</link>
      <guid>https://dev.to/mccricardo/backstage-techdocs-2k0</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://mccricardo.com/backstage-techdocs/" rel="noopener noreferrer"&gt;mccricardo.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Documentation, that thing everyone complains about but few want to create or maintain. However, good documentation is priceless, and the less painful it is to create, maintain and access the more valuable it becomes.&lt;/p&gt;

&lt;p&gt;TechDocs is Backstages’s docs-as-code built-in solution and this basically means we can write our documentation in files that live together with our code. It's based on &lt;a href="https://www.mkdocs.org/" rel="noopener noreferrer"&gt;MkDocs&lt;/a&gt; although there are &lt;a href="https://backstage.io/docs/features/techdocs/architecture#future-work" rel="noopener noreferrer"&gt;plans&lt;/a&gt; to support other types of sources. TechDocs enables documentation to be found from a service page in Backstage's Catalog and be built with good old Markdown.&lt;/p&gt;

&lt;h2&gt;
  
  
  How TechDocs works
&lt;/h2&gt;

&lt;p&gt;Backstage generates documentation in a three-step process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prepare&lt;/strong&gt; - fetch the source  files from the source code and pass them to the generator&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate&lt;/strong&gt; - run the build phase (through a container or &lt;code&gt;mkdocs&lt;/code&gt; cli)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Publish&lt;/strong&gt; - upload the generated files to storage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5pm4fty1hf5f2j2e3sip.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5pm4fty1hf5f2j2e3sip.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
(image source: Backstage official documentation)&lt;/p&gt;

&lt;p&gt;As shown above, for a production deployment, this process should be decoupled from the Backstage deployment. Backstage would &lt;code&gt;only&lt;/code&gt; be responsible for fetching and presenting the generated documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Documentation template
&lt;/h2&gt;

&lt;p&gt;Documentation can be created as a standalone project and our local setup already has a template that we can play with.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foskvew6taukxxstfa4bv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foskvew6taukxxstfa4bv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Add TechDocs to our setup
&lt;/h2&gt;

&lt;p&gt;For our demo, we'll go with a simpler setup (as shown below) and let Backstage do all the heavy lifting. To make things even easier will need &lt;a href="https://www.docker.com/" rel="noopener noreferrer"&gt;Docker&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F212guvxag1j1fz39sesr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F212guvxag1j1fz39sesr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
(image source: Backstage official documentation)&lt;/p&gt;

&lt;p&gt;We well reuse our &lt;a href="https://gitlab.com/mccricardo-blog-demos/gitops-flux-helm" rel="noopener noreferrer"&gt;repository&lt;/a&gt; from the &lt;a href="https://mccricardo.com/gitops-fluxcd/" rel="noopener noreferrer"&gt;Flux CD&lt;/a&gt; post. We'll add a few files and edit another. We'll start by creating a &lt;code&gt;mkdocs.yaml&lt;/code&gt; file.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="na"&gt;site_name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;gitops-flux-helm-docs'&lt;/span&gt;

&lt;span class="na"&gt;nav&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;Home&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;index.md&lt;/span&gt;

&lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;techdocs-core&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next we create an &lt;code&gt;index.md&lt;/code&gt; inside a &lt;code&gt;docs&lt;/code&gt; folder.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;


&lt;span class="c1"&gt;# Example&lt;/span&gt;

&lt;span class="s"&gt;This is a basic example of documentation.&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We'll now edit &lt;code&gt;catalog-info.yaml&lt;/code&gt; and add the following annotation under &lt;code&gt;metadata&lt;/code&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;annotations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;backstage.io/techdocs-ref&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;url:https://gitlab.com/mccricardo-blog-demos/gitops-flux-helm&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;From the repository side, we're done. We've added the necessary configuration that will allow Backstage to find &lt;code&gt;docs/index.md&lt;/code&gt; and generate the documentation. We now turn our attention to Backstage. On &lt;code&gt;app-config.yaml&lt;/code&gt; we'll add the following code.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;

&lt;span class="na"&gt;techdocs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;builder&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;local'&lt;/span&gt;
  &lt;span class="na"&gt;generators&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;techdocs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;docker'&lt;/span&gt;
  &lt;span class="na"&gt;publisher&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;local'&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;And that's it. We'll let Backstage do all the heavy lifting (with a bit of help of Docker).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2se4qayfoibqtyb4l46q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2se4qayfoibqtyb4l46q.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9d7m434aq0xwk4kq4hg0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9d7m434aq0xwk4kq4hg0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>backstage</category>
    </item>
    <item>
      <title>Backstage Catalog</title>
      <dc:creator>Ricardo Castro</dc:creator>
      <pubDate>Sat, 03 Apr 2021 16:31:51 +0000</pubDate>
      <link>https://dev.to/mccricardo/backstage-catalog-393c</link>
      <guid>https://dev.to/mccricardo/backstage-catalog-393c</guid>
      <description>&lt;p&gt;Originally published on &lt;a href="https://mccricardo.com/backstage-catalog/" rel="noopener noreferrer"&gt;mccricardo.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now that we have an idea of &lt;a href="https://mccricardo.com/backstage-intro/" rel="noopener noreferrer"&gt;what Backstage is and can do&lt;/a&gt; and of &lt;a href="https://mccricardo.com/backstage-architecture/" rel="noopener noreferrer"&gt;what is under the hood&lt;/a&gt; we can start to explore some of its features. In this post, we'll explore the Backstage Catalog.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Catalog?
&lt;/h2&gt;

&lt;p&gt;The Backstage Catalog aims to be the centralized hub to track ownership and metadata of all the software in our ecosystem (services, APIs, libraries, data pipelines, etc). Metadata YAML files are at the heart of the Catalog, alongside the code, and will enable Backstage to collect it and make it visible. The Catalog allows teams to manage and maintain their software within a uniform view. Moreover, it will make all software in our organizations discoverable.&lt;/p&gt;

&lt;p&gt;If you've gone through &lt;a href="https://mccricardo.com/backstage-intro/" rel="noopener noreferrer"&gt;Backstage intro&lt;/a&gt; you can find the Catalog at &lt;a href="http://localhost:3000/catalog" rel="noopener noreferrer"&gt;http://localhost:3000/catalog&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to add components to the catalog
&lt;/h2&gt;

&lt;p&gt;As mentioned above, metadata YAML files are at the heart of the Catalog and should be stored in your VCS of choice. We can add components to the Catalog in several different ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Manually register components - via &lt;a href="https://github.com/backstage/backstage/tree/master/plugins/catalog-import" rel="noopener noreferrer"&gt;Catalog Import plugin&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fou51wvsyw4z6wssxwors.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fou51wvsyw4z6wssxwors.png" alt="Alt Text" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Static configuration&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Creating new components through Backstage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Integrating with an external source - some organizations already have an existing system for keeping track of software and they can be integrated into Backstage&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Static configuration
&lt;/h1&gt;

&lt;p&gt;We'll get our hands "dirty" and will add a service to the Catalog through configuration. For that, we'll use a &lt;a href="https://gitlab.com/mccricardo-blog-demos/gitops-flux-helm" rel="noopener noreferrer"&gt;repository&lt;/a&gt; created for the &lt;a href="https://mccricardo.com/gitops-fluxcd/" rel="noopener noreferrer"&gt;Flux CD&lt;/a&gt; demo and integrate it in Backstage. We'll add a &lt;code&gt;catalog-info.yaml&lt;/code&gt; file to the repository with a simple &lt;a href="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component" rel="noopener noreferrer"&gt;Component&lt;/a&gt; configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;backstage.io/v1alpha1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Component&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gitops-flux-helm&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Gitops Flux Helm demo&lt;/span&gt;
  &lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;gitops&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;service&lt;/span&gt;
  &lt;span class="na"&gt;lifecycle&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;production&lt;/span&gt;
  &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;user:guest&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Moving our attention to Backstage, under &lt;code&gt;app-config.yaml&lt;/code&gt; we'll update two sections:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;integrations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;gitlab&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gitlab.com&lt;/span&gt;
      &lt;span class="na"&gt;token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;YOUR-API-TOKEN&amp;gt;&lt;/span&gt;

&lt;span class="na"&gt;catalog&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;allow&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;Component&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;System&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;API&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Group&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;User&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Template&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Location&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
  &lt;span class="na"&gt;locations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# gitops-flux-helm project&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;url&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://gitlab.com/mccricardo-blog-demos/gitops-flux-helm/-/blob/master/catalog-info.yaml&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And voila, Backstage can now track our project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4opk9p4qbsapl5qbdpjc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4opk9p4qbsapl5qbdpjc.png" alt="Alt Text" width="800" height="395"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fp5mbqggawoo6oikg8w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fp5mbqggawoo6oikg8w.png" alt="Alt Text" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This static configuration achieves a similar outcome to manually registering components. But when you couple this type of setup with discovery integrations like &lt;a href="https://backstage.io/docs/integrations/github/discovery" rel="noopener noreferrer"&gt;Github Discovery&lt;/a&gt; magic starts to happen.&lt;/p&gt;

&lt;p&gt;Components created through Backstage are automatically registered in the catalog. In a future post, we'll explore Backstage Software Templates and see &lt;em&gt;real magic&lt;/em&gt; happening.&lt;/p&gt;

</description>
      <category>backstage</category>
    </item>
  </channel>
</rss>
