Here is the previous post in this series.
What's needed for the CRC Chunk 3
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.
This required me to revisit my Hugo 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.
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.
Here is the finished HTML section
And here is what the counter looks like on my page:
What's next and final thoughts on the CRC
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.
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.
I'm also considering doing the challenge in Google Cloud and Azure to get more familiar with them.
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.
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.
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.
The CRC was a great refresher for me to get back in the workflow of a DevOps engineer.
Top comments (0)