<?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: Brian Haas</title>
    <description>The latest articles on DEV Community by Brian Haas (@brianhaas).</description>
    <link>https://dev.to/brianhaas</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%2F1453774%2Fddafa5fe-7564-468c-8ad6-4a5960348262.png</url>
      <title>DEV Community: Brian Haas</title>
      <link>https://dev.to/brianhaas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/brianhaas"/>
    <language>en</language>
    <item>
      <title>Cloud Resume Challenge - Chunk 3</title>
      <dc:creator>Brian Haas</dc:creator>
      <pubDate>Fri, 31 May 2024 22:36:33 +0000</pubDate>
      <link>https://dev.to/brianhaas/cloud-resume-challenge-chunk-3-4ana</link>
      <guid>https://dev.to/brianhaas/cloud-resume-challenge-chunk-3-4ana</guid>
      <description>&lt;p&gt;Here is the previous &lt;a href="https://dev.to/brianhaas/cloud-resume-challenge-chunk-2-1p78"&gt;post&lt;/a&gt; in this series.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's needed for the CRC Chunk 3
&lt;/h2&gt;

&lt;p&gt;Not much really. Just a few lines of javascript on the static website to call the API, get the hit count and present it on the page. &lt;/p&gt;

&lt;p&gt;This required me to revisit my &lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt; website. I opened up the developer tools in Edge to figure out which section was which to decide where I wanted to place my hit counter. &lt;/p&gt;

&lt;p&gt;I learned about layouts and partials in hugo in order to customize the Hugo template I was using to put my javascript code and hit counter section where I wanted. &lt;/p&gt;

&lt;p&gt;Here is the &lt;a href="https://github.com/chronosAZ/CRC-Frontend/blob/main/web/index.html#L96"&gt;finished HTML section&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here is what the counter looks like on my page:&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%2Fyovyh85wsbwzaq9wqf6l.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%2Fyovyh85wsbwzaq9wqf6l.png" alt="Image description" width="398" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What's next and final thoughts on the CRC
&lt;/h3&gt;

&lt;p&gt;There is quite a bit I can do to improve and refine the work I've done here. Namely, writing tests. I know, I know, I should've followed the test-driven development principle, but I didn't since it was a fairly simple application. &lt;/p&gt;

&lt;p&gt;I can also do some of the security mods and beef up the API function, so it counts unique visitors rather than just page hits.&lt;/p&gt;

&lt;p&gt;I'm also considering doing the challenge in Google Cloud and Azure to get more familiar with them. &lt;/p&gt;

&lt;p&gt;All in all, I think the CRC is good because it gives you a set of requirements, but it doesn't tell you how to do them, instead it leads you to resources to figure them out on your own. &lt;/p&gt;

&lt;p&gt;A lot of training these days is tutorial based, where they just walk you through the concepts and then give you all the code and answers, rather than have you try to work something out on your own. Figuring out how to solve a problem is what DevOps personnel do. &lt;/p&gt;

&lt;p&gt;Tools come and go. Figuring out how to onboard a new tool or new service and fit it into the existing tech stack, is way more important than just copying down someone else's answers. &lt;/p&gt;

&lt;p&gt;The CRC was a great refresher for me to get back in the workflow of a DevOps engineer.   &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>devops</category>
      <category>aws</category>
      <category>career</category>
    </item>
    <item>
      <title>Cloud Resume Challenge Chunk 2</title>
      <dc:creator>Brian Haas</dc:creator>
      <pubDate>Fri, 31 May 2024 21:42:27 +0000</pubDate>
      <link>https://dev.to/brianhaas/cloud-resume-challenge-chunk-2-1p78</link>
      <guid>https://dev.to/brianhaas/cloud-resume-challenge-chunk-2-1p78</guid>
      <description>&lt;p&gt;Please see &lt;a href="https://dev.to/brianhaas/cloud-resume-challenge-chunk-1-3681"&gt;Chunk 1 to see how we got here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's needed for the CRC chunk 2
&lt;/h2&gt;

&lt;p&gt;Chunk 3, is the "back end" of the &lt;a href="https://cloudresumechallenge.dev/"&gt;CRC&lt;/a&gt; challenge. Here are the pieces needed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A database to store the hit count - I chose DynamoDB.&lt;/li&gt;
&lt;li&gt;An API to retrieve/update the hit count in the database. I chose to use a Lambda function using Python. &lt;/li&gt;
&lt;li&gt;A way to trigger the Lambda function as a REST API. I chose to use Apigateway. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Getting started
&lt;/h3&gt;

&lt;p&gt;I used the aws console at first to get reacquainted with dynamodb, lambda and apigateway. After getting everything to work, I used &lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt; to deploy all of the infrastructure pieces. The Github repo can be found &lt;a href="https://github.com/chronosAZ/CRC-Backend"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Using boto3 and python in Lambda functions was nothing new. I was not that familiar with APIGateway though.&lt;/p&gt;

&lt;p&gt;The function to update the hit count in the dynamodb table is &lt;a href="https://github.com/chronosAZ/CRC-Backend/blob/main/code/hitcount.py"&gt;pretty straight forward&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The APIGateway pieces took a bit longer. It required some time reading the docs to understand staged, deployments, CORS configuration, etc. But, in the end, I got it all working and was able to use CURL and Postman to test out the API and successfully update the hit counter. &lt;/p&gt;

&lt;p&gt;Here is all of the &lt;a href="https://github.com/chronosAZ/CRC-Backend/tree/main"&gt;code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It was now time to glue it all together.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>webdev</category>
      <category>aws</category>
      <category>career</category>
    </item>
    <item>
      <title>Cloud Resume Challenge Chunk 1</title>
      <dc:creator>Brian Haas</dc:creator>
      <pubDate>Fri, 31 May 2024 20:52:12 +0000</pubDate>
      <link>https://dev.to/brianhaas/cloud-resume-challenge-chunk-1-3681</link>
      <guid>https://dev.to/brianhaas/cloud-resume-challenge-chunk-1-3681</guid>
      <description>&lt;h2&gt;
  
  
  Chunk 1: Building the Front End
&lt;/h2&gt;

&lt;p&gt;Chunk 1 of the AWS &lt;a href="https://cloudresumechallenge.dev/"&gt;CRC&lt;/a&gt; has a few things to accomplish:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build a resume site using static HTML and CSS&lt;/li&gt;
&lt;li&gt;Host the static content on an s3 bucket&lt;/li&gt;
&lt;li&gt;Access the website using HTTPS, which requires CloudFront&lt;/li&gt;
&lt;li&gt;Use a custom domain name, which will require a certificate for https usage and DNS entries using Route53&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Getting started
&lt;/h3&gt;

&lt;p&gt;I am not a front-end web developer, and UI/UX design is not one of my skills. So, rather than fumble around trying to make my resume webpage look good, I decided to use a static website generator. I chose to use &lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt;, since they have a lot of templates to choose from. &lt;/p&gt;

&lt;p&gt;Hugo has a bit of a learning curve, but once I got through that, it was pretty straight forward to edit and generate my &lt;a href="https://brianwhaas.com/"&gt;site&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The infrastructure
&lt;/h3&gt;

&lt;p&gt;To make things easy, I went ahead and registered a new domain name with AWS, and it automatically created a Route53 hosted zone. So that part was done.&lt;/p&gt;

&lt;p&gt;Rather than point and click in the AWS console, I decided to start with IaC using &lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt;. I also decided to use GitHub actions(&lt;a href="https://docs.github.com/en/actions"&gt;https://docs.github.com/en/actions&lt;/a&gt;) for CI/CD to get familiar with them. I had only used GitLab CI/CD and runners previously, which are very similar to GitHub Actions. &lt;/p&gt;

&lt;p&gt;You can see what I wrote &lt;a href="https://github.com/chronosAZ/CRC-Frontend/tree/main/tf"&gt;here&lt;/a&gt;. After scouring for examples, I wrote some scripts to create the s3 bucket, certificate, and CloudFront Distribution. &lt;/p&gt;

&lt;p&gt;Everything was working great, except I didn't realize that the CloudFront default root document(index.html), only applies to the actual web root, not any subdirectories. Unfortunately, the Hugo site I generated, used subdirectories for my individual pages. I &lt;a href="https://github.com/chronosAZ/CRC-Frontend/blob/main/tf/js/rewriteindex.js"&gt;wrote&lt;/a&gt; a CloudFront function to rewire all requests for "/ or subdir/" to grab the index.html document in that folder.  &lt;/p&gt;

&lt;p&gt;So far, so good. It was time to move onto the backend of the challenge. &lt;/p&gt;

</description>
      <category>devops</category>
      <category>webdev</category>
      <category>aws</category>
      <category>career</category>
    </item>
    <item>
      <title>Cloud Resume Challenge: The Beginning</title>
      <dc:creator>Brian Haas</dc:creator>
      <pubDate>Tue, 21 May 2024 21:40:52 +0000</pubDate>
      <link>https://dev.to/brianhaas/cloud-resume-challenge-the-beginning-4lcj</link>
      <guid>https://dev.to/brianhaas/cloud-resume-challenge-the-beginning-4lcj</guid>
      <description>&lt;h2&gt;
  
  
  How I got here
&lt;/h2&gt;

&lt;p&gt;Until 2 years ago, I had worked in IT since 1999. I was pretty burned out after 2021 for a lot of reasons and I needed a break, so I resigned my job as a DevOps Engineer in May of 2022. &lt;/p&gt;

&lt;p&gt;Fast forward almost 2 years and I am ready to get back into the workforce. Great timing huh? It appears the job market in Devops/cloud engineering is pretty tight and competitive at the moment. Quite a difference from 3-4 years ago when I would get at least 2-3 cold emails, LinkedIn messages, or calls from recruiters every week.&lt;/p&gt;

&lt;p&gt;After two years, my skills are a little rusty. I decided to work on refreshing an AWS certification that lapsed back in 2017. Going through the courses, I realized this stuff comes back to me very quickly. Learning news tools and technologies is the standard operating procedure for IT Ops and now DevOps. Digging through documentation, figuring things out, and getting stuff to work is the name of the game. &lt;/p&gt;

&lt;h2&gt;
  
  
  Enter the CRC
&lt;/h2&gt;

&lt;p&gt;Though my travels back into tech, I came across the &lt;a href="https://cloudresumechallenge.dev/"&gt;Cloud Resume Challenge&lt;/a&gt;. This was much more interesting to me. This was actual real world type work that I had done. It wasn't trying to sit through an AWS certification class and remembering what info about each service to regurgitate on a cert exam. So I decided to put the cert on hold and work on this. &lt;/p&gt;

&lt;p&gt;In my next few posts, I'll go over each "chunk", as listed in the CRC manual. I'm actually pretty much done, except for actually putting resume content into my resume page instead of just hosting a stub. &lt;/p&gt;

&lt;p&gt;It was good to work with all these pieces of tech again. More to come...&lt;/p&gt;

</description>
      <category>devops</category>
      <category>webdev</category>
      <category>aws</category>
      <category>career</category>
    </item>
  </channel>
</rss>
