<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Caoimhe Harvey on Medium]]></title>
        <description><![CDATA[Stories by Caoimhe Harvey on Medium]]></description>
        <link>https://medium.com/@caoimheharv?source=rss-e2c7602edd1b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5mMP1iEA4hELg3AqBI2VIg.png</url>
            <title>Stories by Caoimhe Harvey on Medium</title>
            <link>https://medium.com/@caoimheharv?source=rss-e2c7602edd1b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 23:38:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@caoimheharv/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Tips for Writing Better Documentation]]></title>
            <link>https://caoimheharv.medium.com/tips-for-writing-better-documentation-15f14df0774f?source=rss-e2c7602edd1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/15f14df0774f</guid>
            <category><![CDATA[technical]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[tips-and-tricks]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[technical-writing]]></category>
            <dc:creator><![CDATA[Caoimhe Harvey]]></dc:creator>
            <pubDate>Sun, 28 May 2023 07:42:12 GMT</pubDate>
            <atom:updated>2023-05-28T07:42:12.333Z</atom:updated>
            <content:encoded><![CDATA[<p>We all know documentation is a very important but often neglected part of tech, and we can all recognize how game changing finding good documentation can be. Sadly, at least in my experience, if you’re working on a project, especially if it’s volatile and there are many changes, it can be hard to constantly update the docs to describe the latest version of the project. Then usually towards the end of the project, it’s often an “onto the next” mentality and the documentation of the project you just worked on is often left incomplete or out of date.</p><p>From having joined multiple organizations with extremely out of date documentation, or simply none at all, yes, quite literally no technical documentation as it was all in the heads of a handful of people, it can not only be frustrating for new joiners to the team, but also creates a lot of major functional problems in how the team operates.</p><p>How can we expect someone to onboard and learn about the project’s they’re meant to be working on if the only reference for the internal toolings/practices are only verbal? How can we expect the team members with all this knowledge in their heads to take hours out of their day to write documentation when surely they have more important things to do?</p><p>These are just some of the questions I hope to help answer and provide tips on generally writing documentation that should be understandable to anyone within the organization, not just people on your team or engineering.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uts9rRv2d-6blffS.jpeg" /><figcaption>Stock image</figcaption></figure><h3>Don’t overcomplicate things unnecessarily.</h3><p>I always like to think that good documentation should be simple and straight forward, it should explain the context behind the documentation (why is the tool, task, or documentation page being created) in a few sentences, then how to do whatever you are trying to achieve. If it’s a guide on how to set up an EKS cluster, for example, you don’t need to include a bunch of documentation about what K8 is and the history of EKS. These can be created as a separate document under the same section. Instead, the document should outline the scenario in which this document is relevant, and then a clear step by step instruction on how to achieve the EKS set up.</p><p>I often like to think, if I can show this document to my tech illiterate family members, be that grandparent or parent, and they can get the gist or a decent understand of the doc, then it’s comprehensive. Of course not all documentation can be simple, but trying to simplify as much as possible within the context of the document topic can help.</p><h3>Don’t be afraid to link to external sources.</h3><p>None of us know everything, and we don’t necessarily need to spend time re-writing something generally used in tech within our documentation when there are many, very good, external sources which already explain what we are trying to achieve.</p><p>For example, if I’m trying to write a document explaining the architecture of an EKS set up and I want to describe how to resolve an issue during set up that may occur with the kubelet, you can assume 90% of the people reading the doc know what the kubelet is, however, finding a good link that you feel describes very simply what a kubelet is and then referencing that in your doc can allow people to go deeper and gain a better understanding. It can also be helpful when you’re writing the docs as there could be more context around the subject of the document itself.</p><h3>Define what pre-requisite knowledge is required.</h3><p>It is very probable that the majority of the people reading your documentation are engineers, however, it’s also possible that non-engineers or people without the same context as you on the project will be reading your document. Adding a section at the start to define what knowledge is required to fully understand the document, or even, complete the required tasks in the document can be critical in helping it be understood by a wider audience.</p><h3>For the busy engineers, carve out time in your schedule to catch up on documentation.</h3><p>It’s easier said than done and I’m fully aware of this, we all say “here’s an hour where I will write docs” but then you get a ping or an email or something higher priority comes up and next thing you know there’s a draft or a half written document that get’s forgotten about. I’ve definitely been guilty of this.</p><p>Ultimately I think there’s a few things that lead to it, one of them is how highly does the organization value documentation? I’ve been in organizations where the issue of literally no documentation was raised to a manager and the response was “it’s not important, we will get to it later”, of course, later never arrived. Sometimes it’s the mental effort, documentation can be incredibly draining to write, especially at the end of a long project where the initial view of the project has evolved over time and there’s now <em>a lot</em> to document.</p><p>Having a regular hour or two during your week, for me a Friday afternoon usually works, in which you mark yourself as do not disturb on slack and just focus on updating any out of date documentation or creating new documentation can help the overall team and organization run a bit smoother.</p><h3>An architecture diagram says a thousand words.</h3><p>As the old saying goes “a picture says a thousand words”. Sometimes, if you’re describing the workings of a system and want to effectively show how everything works together, words can often be too confusing or convoluted. Diagrams can often serve to simplify this by creating a visual aid to piece all the technical text together. Many of us are visual learners and having a visual aid means that not only will your reader perhaps understand your overall document better, but it may also help them remember it better.</p><p>There are so many more tips, but to avoid writing a massive post I’ll just highlight some of the more common ones I use as well:</p><ul><li>If you’re writing a step by step guide, ask someone who is unfamiliar with the tasks in the guide to test it, if they get confused, lost or have many questions, just means the guide needs to be clearer.</li><li>Keep it short, no one likes to read text that rambles on forever, try to keep the document short and to the point.</li><li>Don’t be afraid to write documentation, you can always go back and edit it. Often if you find there is something that should be documented but isn’t, this is a perfect time for you to not only “add value” to the team, but also practice writing documentation. As with everything, the more you practice the better you become.</li><li>It can sometimes help to define the intended audience at the start of the document. If you’re a DevOps Engineer, you will need separate documentation for developers on how to, for example, interact with the CI/CD tooling vs what your team will need to interact with the tooling.</li></ul><p>Thanks for reading :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15f14df0774f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use ChatGPT to help you prepare for interviews]]></title>
            <link>https://blog.devgenius.io/how-to-use-chatgpt-to-help-you-prepare-for-interviews-8abe6ea67272?source=rss-e2c7602edd1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8abe6ea67272</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[interview-preparation]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Caoimhe Harvey]]></dc:creator>
            <pubDate>Thu, 13 Apr 2023 06:38:59 GMT</pubDate>
            <atom:updated>2023-04-23T19:08:00.404Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s no secret that things are a bit unstable at the moment, it seems every company is doing layoffs, and job security is a concern at the forefront of everyone’s mind. Whether you’ve been impacted by layoffs or are simply looking for new opportunities, even if you want to keep the interview skills sharp, here are some ways that ChatGPT can help you prepare for Engineering interviews.</p><p>Most Engineering interviews in my experience consist of 3–5 rounds, where the first is a recruiter screening, 2–3 rounds of coding/linux systems, system design, or general technical questions, and a final round focused more on company fit, behavioural and situational questions. This can be a lot to prepare for, especially if you haven’t touched things like LeetCode or HackerRank style questions or concepts like Big O, Data Structures or Algorithms in a long time.</p><ul><li><strong>“Explain it to me like I’m 5”</strong>: My favourite prompt for having ChatGPT explain relatively complex topics in a very simple way that is easy to understand, mostly because it sometimes starts with “Okay kiddo”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UyS0R7i5hRcRZxRvF3NOFQ.png" /></figure><ul><li><strong>If you’re not 100% sure about the topic, just keep asking questions</strong>: Unlike when you google a question, ChatGPT will give a direct answer without having to click on multiple links, also, unlike a human, if you spend 40 minutes asking ChatGPT to explain how to calculate Time or Space Complexity, for example, it won’t become frustrated with you if you simply cannot grasp it. So you can ask as many questions needed to understand a topic well.</li><li><strong>“Give me a coding problem and I will propose an optimised solution”</strong>: This prompt can lack a bit of creativity from the ChatGPT side, but I’ve found it’s a good starting point if you want to try something else for coding questions than HackerRank and LeetCode. <strong><em>Tip</em></strong>: You can spice up this prompt by getting more specific, for example, “Give me a challenging coding problem where the solution requires dynamic programming”, or “Give me some challenging code and I will calculate the Time and Space Complexity”.</li><li><strong>“Generate 10 interview questions for a [role] about [topic]”</strong>: One of the valuable things about ChatGPT is that it can come up with questions for interview topics that may be ones you’ve never heard of before, or about topics you may forget to review.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TgEmsyVKhh7rhCjjfpUEiA.png" /></figure><p>More general interview advice:</p><ul><li><strong>Don’t lie on your resume and know it inside out</strong>: The worst thing you can do is lie on your resume and claim to have experience you don’t have. It’s much more valuable to know the details you put on your resume well and be comfortable to talk about it, than to lie and be caught in a lie as that can immediately kill the interview.</li><li><strong>Prepare examples of past work</strong>: It’s always useful to be able to relate a question back to something you’ve worked on in the past, and being prepared with examples can help you answer and get to what you want to convey efficiently.</li><li><strong>Prepare questions for the interviewers</strong>: There’s usually a section at the end of each interview when you can ask questions to the interviewer(s). There are many guides and Career blogs/TikToks that give advice on which type of questions you should ask. These can range from “how did I do?” to “What’s the favourite part of your job?”, it can be hard to know what you <em>should</em> actually ask. I’ve found that generally asking about the interviewer’s experience, more about the company and the team or role, and trying to learn more about the tech stack and how the day to day is in the role has been more valuable for knowing what you will get yourself into if you were to receive an offer. Ultimately, the best questions are the ones that make neither you or the interviewer uncomfortable, and can help end the interview on a positive note.</li><li><strong>Try mock interviewing with a Rubber Duck</strong>: The Rubber Duck method is known to be a useful tool for developers and engineers to explain code and help work through debugging out loud where you, well, talk to a Rubber Duck. I have a little character from Animal Crossing that I use, but the idea is that when you do coding or system interviews, especially virtually, you need to be able to coherently explain and walk through your thought process out loud, pretending the Rubber Duck is your interviewer can help you get used to this and ultimately make the interview itself more relaxing as you’ve been practicing.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CIP5Nj3sRfnItHAffhMPEQ.jpeg" /><figcaption>My Rubber Duck for debugging and interview prep</figcaption></figure><p>I hope this helps the interviewing process and makes the preparation a bit easier. Interviewing can be very stressful, but at the end of the day, you just need to try your best and what will be will be.</p><p>Thanks for reading :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8abe6ea67272" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/how-to-use-chatgpt-to-help-you-prepare-for-interviews-8abe6ea67272">How to use ChatGPT to help you prepare for interviews</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Modern Monitoring Stack (Part 1)]]></title>
            <link>https://blog.devgenius.io/deploying-a-modern-monitoring-stack-part-1-5eb8ada105ba?source=rss-e2c7602edd1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5eb8ada105ba</guid>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[thanos]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[opentelemetry]]></category>
            <dc:creator><![CDATA[Caoimhe Harvey]]></dc:creator>
            <pubDate>Mon, 20 Mar 2023 07:41:44 GMT</pubDate>
            <atom:updated>2023-03-21T02:54:08.738Z</atom:updated>
            <content:encoded><![CDATA[<p>Monitoring is notoriously one of the more frustrating areas to setup and maintain in DevOps/SRE, and until this point in my career I hadn’t given it too much thought, as I’d mostly been on the maintaining side of things in roles where there was a legacy monitoring system of some form that worked just enough that we didn’t need to upgrade it.</p><p>One of the good things about having worked in a start-up is that there’s little legacy code, but it also means you need to configure and set everything up yourself, which means it’s perfect for learning how to research different toolings, design and implement a system with complete ownership.</p><p>For the needs at the time, the metrics monitoring stack that was <strong>deployed to EKS via ArgoCD (GitOps)</strong> was comprised of:</p><ul><li><a href="https://opentelemetry.io/docs/collector/">OpenTelemetry</a> (OTEL): The collector application allows you to not only collect metrics, but also logs and traces and send these to various locations. In this post, we will be focusing only on metrics. (Part 1)</li><li><a href="https://thanos.io/">Thanos</a>: The question of “Why Thanos and not Prometheus?” was naturally one that had to be asked and ultimately it boiled down to its ability to enable Prometheus operations with higher availability and unlimited storage via S3 (or other Object Store methods). Thanos is also built on top of the Prometheus Operator, meaning it is compatible with PrometheusRule CRDs for setting up alerting rules. (Part 1)</li><li><a href="https://grafana.com/">Grafana</a>: Well known tool for representing Metrics on a Dashboard. (Part 2)</li><li><a href="https://prometheus.io/docs/alerting/latest/alertmanager/">AlertManager</a>: Receives the alerting from the prometheus rules, in this case, from Thanos Ruler, and performs actions, such as notifying Slack channels, based on these. (Part 2)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*8XmFMuqxMcRrSe6nKkualg.png" /></figure><p>The overall idea of the design is to have a bunch of <em>lightweight OTEL deployments</em> which perform the scraping actions, then send the metrics to thanos-receive as a remote endpoint. <em>Thanos will then do all the heavy lifting</em>, it will upload these metrics to S3, allow for direct query, handle alerting rules, and compact the metrics that are older than a certain timeframe. The alerting rules will then forward alerts to <em>AlertManager where it will send the neccesary alerts</em>, and Grafana will take both AlertManager and Thanos as a data source and dashboards and alerting can be viewed elegantly.</p><figure><img alt="Sample design of the described metrics system." src="https://cdn-images-1.medium.com/max/711/1*3cVE7uQzM5QcXwzToSlOyg.png" /><figcaption>Sample diagram for the proposed metrics system</figcaption></figure><p>These posts will <strong>not</strong> cover the AWS set up portion which includes VPC Peering or setup, Hosted Zone/DNS setup, exposing Grafana, Thanos, or AlertManager within the organization, ArgoCD or security setup and other related component. This will solely focus on the setup and deployment of each of the components listed above.</p><h3>Thanos</h3><p>One of the great things about Kubernetes and EKS, is the support for Helm Charts. With a variety of choices for Thanos, I opted for the <a href="https://artifacthub.io/packages/helm/bitnami/thanos">Bitnami Helm Chart</a> as, initially, it appeared to provide all the support needed for all the components, as other Helm Charts may have not had support for Thanos Receive or other minor things.</p><p>The values.yaml passed to the Helm Chart looked something like this:</p><pre>objstoreConfig:<br>  type: S3<br>  config:<br>    bucket: thanos-metrics-bucket<br>    endpoint: s3.region.amazonaws.com<br>    sts_endpoint: sts.amazonaws.com<br>    aws_sdk_auth: true<br>receive:<br>  enabled: true<br>  resources:<br>    limits:<br>      memory: 25Gi<br>    requests:<br>      memory: 25Gi<br>      cpu: 1000m<br>  autoscaling:<br>    enabled: true<br>    minReplicas: 2<br>    maxReplicas: 6<br>    targetCPU: 75<br>    targetMemory: 75<br>  serviceAccount:<br>    annotations:<br>      eks.amazonaws.com/role-arn: arn:aws:iam::aws_account_id:role/thanos-receive-sa<br>query:<br>  enabled: true<br>  replicas: 2<br>storegateway:<br>  enabled: true<br>  replicas: 2<br>  serviceAccount:<br>    annotations:<br>      eks.amazonaws.com/role-arn: arn:aws:iam::aws_account_id:role/thanos-storegateway-sa</pre><h4>Some limitations or problems encountered and how they were resolved…</h4><p><strong>Thanos Ruler does not support Rule Selector in Bitnmai</strong></p><p>The biggest limitation encountered when specifically using the Bitnami Helm Chart was the inability to define a ruleSelector for the thanos-ruler component.</p><p>This ruleSelector effectively allows you to define some labels or expressions that Thanos Ruler can look for in any PrometheusRule CRDs. The benefit of having this in a large distributed system with multiple teams and users, is that you can allow each team to create their own Alerting Rules by creating a CRD file and including the label required to be picked up by Thanos Ruler.</p><p>The Bitnami Chart, however, only supports having this defined as a ConfigMap which then must be uploaded. Having multiple people and teams making relatively frequent updates to a single ConfigMap sounds like a recipe for disaster as potential misconfiguration of one rule could then impact all others not being picked up as well.</p><p>To get around this limitation, Thanos Ruler was deployed by using the ThanosRuler CRD from the<a href="https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.ThanosRuler"> Prometheus Operator</a>.</p><p>All that really needs to be defined for it to work similarly to the Helm deployment is:</p><pre>apiVersion: monitoring.coreos.com/v1<br>kind: ThanosRuler<br>metadata:<br>  name: thanos-ruler<br>spec:<br>  replicas: 3<br>  ruleSelector:<br>    matchLabels:<br>      component: thanos-ruler<br>  queryEndpoints:<br>    - dnssrv+_http._tcp.thanos-query.thanos.svc.cluster.local<br>  alertmanagersConfig:<br>    name: alertmanager-config-secret<br>    key: alertmanager-config.yaml</pre><p>This configuration will then pick up any PrometheusRule CRD’s with component: thanos-ruler in the labels.</p><p><strong>Thanos Receive Memory Usage surging</strong></p><p>As you probably noticed, thanos-receive is the only component with memory and cpu usage defined, as well as the only one in an AutoScaling group.</p><p>This is mainly due to <em>many issues</em> experienced during deployment and continuous running where, as traffic would increase, thanos-receive would begin having memory increase a lot. Often this would result in CrashLoopBackoff errors from OOMKilled, and so more memory was continuously allocated, EKS Nodes upgraded, and the number of thanos-receive replicas increased. This, in part, was caused by misconfiguration of the OpenTelemetry side (covered below), however, the issues persisted even with those issues resolved, though, much less frequent.</p><p>The best way I found at the time to resolve these issues was to set up an autoscaling group, where once the existing nodes reached a certain threshold, the number of pods would increase for thanos-receive and this would help manage the traffic and allow the pods and service to go into a crash loop all together while also ensuring that the pods had sufficient memory to avoid memory surging too quickly for the HPA to keep up.</p><p>This approach seemed to prove successful, however, <em>it is quite fragile</em>.</p><h3>OpenTelemetry</h3><p>As the OTEL deployments are meant to be very lightweight, the majority of the default values found in the OpenTelemetry Collector Helm Chart should suffice, however, we want to enable and disable certain things.</p><pre>mode: daemonset<br>config:<br>  exporters:<br>    prometheusremotewrite:<br>      endpoint: http://thanos-receive.thanos.svc.cluster.local:9093<br>      external_labels:<br>        cluster: my-eks-cluster-name<br>  processors:<br>    memory_limiter:<br>      check_interval: 5s<br>      limit_percentage: 80<br>      spike_limit_percentage: 25<br>    batch:<br>      send_batch_size: 2048<br>      timeout: 30s<br>  receivers:<br>    prometheus:<br>      config:<br>        global:<br>          scrape_interval: 30s<br>          scrape_timeout: 15s<br>        scrape_configs:<br>          - job_name: &#39;pods&#39;<br>            scheme: https<br>            tls_config:<br>              ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt<br>              insecure_skip_verify: true<br>            bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token<br>            kubernetes_sd_configs:<br>            - role: pod<br>              selectors:<br>              - role: pod<br>                field: &quot;spec.nodeName=$KUBE_NODE_NAME&quot;<br>  service:<br>    pipelines:<br>      logs: null<br>      traces: null<br>      metrics:<br>        exporters:<br>          - prometheusremotewrite<br>        processors:<br>          - batch<br>          - memory_limiter<br>        receivers:<br>          - prometheus<br>clusterRole:<br>  create: true<br>  rules:<br>    - apiGroups:<br>        - &#39;&#39;<br>      resources:<br>        - &#39;pods&#39;<br>        - &#39;nodes&#39;<br>        - &#39;endpoints&#39;<br>        - &#39;services&#39;<br>        - &#39;namespaces&#39;<br>      verbs:<br>        - &#39;get&#39;<br>        - &#39;list&#39;<br>        - &#39;watch&#39;<br>presets:<br>  clusterMetrics:<br>    enabled: false<br>  kubernetesAttributes:<br>    enabled: true<br>  kubeletMetrics:<br>    enabled: true</pre><p>By default, the OTEL Collector is deployed as a replicaset, this can cause certain duplication issues where each pod in the collector (if HA deployment) is querying each endpoint or node multiple times, instead of just the specific pods or node the collector is deployed on. By switching the deploymentMode to daemonset there will be one OTEL Collector per EKS node. However, by default, you will still find that each collector pod will query all endpoints for the pods in the cluster. This can cause memory usage to surge for the Thanos Receive deployment as it will be receiving a high volume of traffic from the collector.</p><p>To resolve this, you can define a selector in your Prometheus Scrape Job to only scrape pods where the nodeName is the same as the OTEL Collector Pod’s nodeName .</p><pre>kubernetes_sd_configs:<br>- role: pod<br>  selectors:<br>  - role: pod<br>    field: &quot;spec.nodeName=$K8S_NODE_NAME&quot;</pre><p>Additionally, if you don’t plan to use OTEL Collector for getting logs or traces, you might want to disable these pipelines, otherwise, these will be created when the pods start up, which could potentially cause misleading errors (making it harder to troubleshoot) or even increase the memory usage of the OTEL pods.</p><pre>config:<br>  service:<br>    pipelines:<br>      logs: null<br>      traces: null</pre><p>It’s also recommended by the Helm Chart, when OTEL Collector is deployed as a daemonset to set the following configuration for the presets:</p><pre>presets:<br>  clusterMetrics:<br>    enabled: false<br>  kubernetesAttributes:<br>    enabled: true<br>  kubeletMetrics:<br>    enabled: true </pre><p>I hope Part 1 was useful and helpful incase you’ve encountered some of the setup issues described or simply want to know how difficult it can be to deploy Thanos or OpenTelemetry for Metrics.</p><p>Part 2 coming soon which will cover the Grafana and AlertManager components of the monitoring stack! In the meantime, let me know if you have any experience with these tools, did you encounter any issues, are there things you would have done different, etc :)</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5eb8ada105ba" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/deploying-a-modern-monitoring-stack-part-1-5eb8ada105ba">Deploying a Modern Monitoring Stack (Part 1)</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using ChatGPT for DevOps]]></title>
            <link>https://blog.devgenius.io/using-chatgpt-for-devops-7daa7c1783e9?source=rss-e2c7602edd1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7daa7c1783e9</guid>
            <category><![CDATA[devops-practice]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Caoimhe Harvey]]></dc:creator>
            <pubDate>Thu, 09 Feb 2023 07:36:42 GMT</pubDate>
            <atom:updated>2023-03-20T07:59:20.302Z</atom:updated>
            <content:encoded><![CDATA[<p>Edit: This was written about ChatGPT-3 which was the latest available at the time of writing.</p><p>I had been working in the DevOps and Site Reliability space for roughly 5 years by the time that ChatGPT made it’s earth shattering debut to the world, and it truly revolutionized my workflow, but I’ll get into that more later.</p><p>Similarly to many of us, I had heard the rumours of ChatGPT being able to write a complete application from scratch, and thinking “it can’t really be that good” decided to test it out and see for myself.</p><p>Initially, I started asking it to produce small scripts in Python and Bash, just to dip my toes in the OpenAI/ChatGPT waters.</p><figure><img alt="Leveraging OpenAI’s ChatGPT for Automation Scripting" src="https://cdn-images-1.medium.com/max/531/1*nYHGGGKYau3OqaD-45luHw.png" /><figcaption>ChatGPT writing an automated Python Script to perform memory checks on VMs.</figcaption></figure><p>The results blew me away! 🤯 Not only did it produce code with perfect syntax but it also explained the code to me!</p><p>At the time, I had been working on deploying Airflow to an EKS Cluster using Helm via Terraform, this setup took me roughly 3–5 days to get all squared away and tested, so I asked ChatGPT to write configuration for this.</p><p>While it did produce good configuration, it wasn’t exactly what I was looking for or hoping for, instead, I asked it’s OpenAI sibling, <a href="https://platform.openai.com/playground">the Platform Playground</a> the same question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MGGSJ_YWY9L6IV1CnehCfA.png" /><figcaption>OpenAI’s Platform Playground tool generating Terraform Code for Apache Airflow deployment via Helm.</figcaption></figure><p>The OpenAI Platform Playground tool was such a game changer! It produced the code as it appears to have internet access where ChatGPT does not, and therefore can provide more well rounded configuration. The configuration seen here that was output by the Playground tool was almost identical to the one I had configured a few days prior manually, and what took me a few days, it took this AI a few seconds. From here, I began incorporating it into my regular workflow.</p><p>I tried asking ChatGPT about specific infrastructure design and configuration options for the metrics set up I was working on at the time. ChatGPT was able to give an answer in a matter of seconds that perfectly answered my questions and advised about best practice where hours of reading Thanos docs and different resources online couldn’t give a definite way forward.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*arDa5kHmbHgimPpuumv7IA.png" /><figcaption>Asking ChatGPT a technical infrastructure design question.</figcaption></figure><p>After a few weeks of using both of these tool to simply generate code and answer basic questions, I began running into issues with another project I was working on, so I turned to ChatGPT to see if it could provide me an answer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*JG98i8i-2yeXqUjLR_yE5g.png" /><figcaption>ChatGPT providing details on how to troubleshoot and triage an error.</figcaption></figure><p>While ChatGPT didn’t provide much new information about how to troubleshoot or resolve the error from what I had already tried or found online, it can always help remind you to check something that may have been missed or forgotten. I’m sure with different errors it may give more detailed responses and may even provide the specific solution to a given error. This opens the door for so many, especially more junior engineers, to hone their troubleshooting and triaging skills through ChatGPT. It may also change the entire flow for how we investigate various issues not only in CI/CD and Infrastructure, but even for debugging code.</p><p>These two tools combined, ChatGPT and OpenAI Playground, have truly allowed me to improve and optimize my workflow. Helping unblock me at various points over the last two months when I simply cannot find what I need on Google or just need a quick question answered.</p><h3>Tips and Tricks to get the most out of using ChatGPT for DevOps</h3><ul><li><strong>Specify Versions</strong>: if you want ChatGPT to generate configuration based on a Helm Chart (for example) that may have multiple versions, I’ve found that it doesn’t always take the latest by default. It can be helpful to include the version of the configuration you want in the request to get more accurate results.</li><li><strong>Trust but verify</strong>: as the quote goes “trust but verify”, you can trust that the output that ChatGPT is giving you is good and is error free, but as with any code obtained online, you should always read through it yourself and ensure you understand it before adding it to your project. Never assume that code generated by ChatGPT, no matter how amazing or excellent, is production ready out of the box.</li><li>If ChatGPT isn’t giving the responses you want, you can also try using <a href="https://platform.openai.com/playground"><strong>OpenAI’s Playground</strong></a>. It’s important to add that there is a free trial for this product line, but one the trial ends it becomes paid.</li><li><strong>Give examples</strong>: it can be helpful to provide more information when asking ChatGPT something, this can also be done in the form of giving it an example. Instead of just asking regex to find an ip address in a string which may yield, you can instead say regex to find an ip address in a string, for example, in a string 1.1.1.1:0000 the regex should match 1.1.1.1 and it will perhaps generate a more exact response for your query.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g_abD32nhlkI0nn7mJr7iA.png" /></figure><p>Ultimately, at the current version of ChatGPT, I don’t believe DevOps Engineers or SRE’s are at risk for being replaced anytime soon. ChatGPT, however, offers plenty of ways and opportunities for engineers for increase their productivity and help unblock themselves in ways that may have taken days or multiple people’s assistance previously.</p><p>Thanks for reading :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7daa7c1783e9" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/using-chatgpt-for-devops-7daa7c1783e9">Using ChatGPT for DevOps</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>