Innovation meets resilience: Using ChatGPT in DevOps
An interview with a Clevertech developer turned DevOps leader using ChatGPT to save both time and money
This week, I got to chat with Thomas M., a consultant at Clevertech, to learn more about his experience using Chat GPT to build out an entire infrastructure on AWS
managed by Terraform, using GitHub Actions for the CI/CD pipeline and other automations. We discussed the strategies he used, and what he is planning to use AI for next.
_______________________
Thomas:
”to provide some background for this, I used to be a civil engineer with a passion for programming, and at some point, I decided to be a programmer and joined Clevertech as a front-end developer.
The first day I got here, my lead asked me to step into DevOps. I didn't know anything about DevOps. It was all new to me. I didn't even know the basics about Docker containers, Jenkins, or anything related to it.
I was tasked with the challenge migrating the infrastructure that we had. I had to transfer our infrastructure to AWS and use GitHub Actions for our CI/CD pipeline, which are all different tools than the ones the team used.
My deadline was two months. It was challenging because if I were to do this all by myself, I would have to read a lot, watch a bunch of videos and consume a ton of content, which I actually did.
However, Chat GPT enabled me to [migrate and build the infrastructure] in a quarter of the time that I would take to do it by myself or the conventional way of consuming all those videos. It sped up [the process] a lot.”
Vanessa:
”Yeah. So there's this body of information, but rather than having to wade through all of it, watch through all of it, Chat GPT allows you to shortcut, by saying: “This is what I need to do. How do I do that?” And it pulls out exactly what you need.”
Thomas:
”It is a really good consultant. So let's say I watch a video about how to do something, I can go on Chat GPT and ask, is this the best way to do it? Is this the most efficient way? And then it will answer back, saying, “Look, it's a good way, but there's this other method that you can try and take into consideration.”
Most often it would get things right, so it would put me on the right track.
Vanessa:
”So how do you know where it's getting things right and where it's not? How do you test if this is exactly what you want or not?”
Thomas:
”At the end of the day, I think it gets, let's say 70% of the things right. The other 30%, [Chat GPT] says with a confidence that can make you believe the sky is green… but it's wrong. So you have to test it. You have to validate it.
The things is, even if I didn't have the AI assisting me, I would actually have to go through this process the same way. I would have to try something, and then it would fail. Then I would try another thing. Using AI allows me to spend less time [researching] which is the conventional way of doing things.”
Vanessa:
”What kind of advice would you give to someone who wants to try out using Chat, GPT, or AI to build something like this? Were there specific questions that gave you a lot of information? What was your approach?”
Thomas:
”The secret here is to prompt the search in such a way that you get it to do exactly what you want.
I think you do have to know what you're doing and have some coding background because you have to be creative about what to ask.
There's a lot of experimentation that's being done in this field. But what I think works the most is that you actually have to go to the root of the problem. And then you start asking for specific stuff. Once you start asking about the root problem, not the result you want in the end, it will guide you to continue to ask more and more questions in the way it likes to be prompted. So, AI is learning from you - and you are learning from AI to find the ultimate solution.”
Vanessa:
”Was there a question that you asked or something that Chat GPT prompted you, that you would have never figured out on your own?”
Thomas:
”Oh, all the time.
But there's an interesting thing about AI programmers have for a good time now, a tool called GitHub Code Pilot and it tries to guess what you're doing. Then it shows suggestions about what it thinks you’re trying to do, considering the context of
the entire page.
What I realized about AI is that it treats code as a hard truth. If you only show code to it, it will try to code it the same way. But if you provide comments, it’s a different story, it treats comments as intent, which is more powerful.
Let's say I have a comment, I'm going to do this because of this. And then you start coding. AI might prompt you with a better way of doing it because it knows what you're trying to do.
If you remove the comment, it will treat your code as truth, it gets to a point where if part of your code is wrong, the suggestion that it makes won’t make any sense. So if I ask something and the answer does not make sense, there's something wrong with my question or the context that I provided.”
“And that's why I got so interested in this because I think it's the future and people that develop this ability to prompt the AI will actually have better chances of extracting the most out of it.”
Vanessa:
”Yeah, it's interesting because I'm a coach at Clevertech and we do a lot of work with developers on how to develop soft skills. A lot of the soft skills require you to have clarity around what it is that you're doing. Have clarity around what your client wants, be able to ask the right questions, be able to articulate what are the parameters within which we're working, and develop things that make sense in the context of the project.
So it seems like AI may take over some of the hard skills, but you're still going to need the critical thinking, the ability to inquire and to follow the trail wherever it leads, which is exciting.”
Thomas:
”Programmers actually hate comments in code, they say that code is its own language. So if the code is well written, it's all there. But AI learns with comments, at least the ones we have now. They are Large Language Models. At some point during its training, it looked at thousands of comments and textural context, look a the implementation, then concluded that this specific thing [code] achieves what the other [objective] is describing.
But the name of the game here is the intent. To extract the most out of AI, it
must know what you want, and a lot of times, even how you want.
Vanessa:
”So now the infrastructure is built, using Chat GPT, how has that been going? Is it working well? Have there been any places where you've had to adjust something?
Thomas:
“It's all done and running in production.
One interesting thing this new infrastructure enables us to do; every developer can spin up their own environment, and they can develop, test it like it’s in production, and then delete it. All done automatically via GitHub Actions and some clever triggers.
We can also turn those environments on and off with the push of a button.
On weekends, when nobody is working, we turn them off and spend nothing. Monday we turn them on and just pay for the hours that we're using. This is all possible because of this new way of implementing the infrastructure.
Overall, I think we got a 40% reduction in costs compared to the previous way of doing things, just by optimizing the infrastructure.
Through AI, we found out this is the best and recommended way of doing things. Not all companies do it because it's a new way of doing things. So we are implementing a cutting-edge solution because we asked Chat GPT “What's the best way of handling this?” And that's incredible.”
Vanessa:
”When you think about future projects, and utilizing AI, what's on the horizon for you?”
Thomas:
”Just to give an example, I created an extension on Google Chrome for it to help with code reviews. Every time a developer wants to push something to the repository, we do it by creating a Pull Request, and we ask our peers to review what we did, it’s an important part of maintaining a cohesive codebase.
If I have ten people on my team, I have to spend 1-2 hours a day reviewing their code. I created an extension that sends this to the AI and it helps me with the review.
I go to the Pull Request page and activate the extension. Behind the scenes, it calls ChatGPT with an initial prompt like “Act as a code reviewer of a Pull Request, providing feedback on the code being sent” it adds the code changes, and then in the end, I added, “As a code reviewer, your task is: to review the code changes and provide feedback; If there are any bugs or potential to introduce them, it is important to highlight it” and so on. After sending it, I get the AI’s opinion back in the extension seamlessly”
Vanessa:
”Coming into coding, from being a civil engineer, do you feel like that allowed you to problem solve or approach this particular challenge because of the other skills that you've developed? Things like critical thinking, problem-solving, etc., how has that influenced how you were using this tool?”
Thomas:
”Yeah, because I'm a ten-year professional. I was a civil engineer, I was a director at a company, and I'm a fully-fledged professional, but I'm not a senior programmer yet.
These skills transfer over. I think the skills I have of being organized, working as a team, and leading people, all can help.
As you said, in the end, I think soft skills are what enable you to kind of look at the problem and be able to pinpoint what you need, what is actually the problem here, what needs to be changed, and what's important. Those things matter because you can't just throw code out there. You need to understand what needs to be done and the direction you're headed.
Vanessa:
”Thank you Thomas for your time, it’s inspiring to hear. Time for me to start using this tool a bit more myself!”
How are YOU using Chat GPT or other AI tools in your work? We’d love to hear what’s been working for you.
Our culture here at Clevertech is one of innovation, resilience, and community support. If those values resonate with you and you are looking for remote work with high-quality tech projects, check out our current job openings.