Join us
@smosgr ・ Aug 26,2021 ・ 3 min read ・ 2k views
This talk was delivered during the internal Reply conference, Xchange 2021. In this article, we are going to start with some theoretical concepts and then we will explain in a more practical way by showing the results of our demo during the conference.
In the previous article (1/2), we have discussed the theory of DevOps and Infrastructure as Code. It’s now time to dig into the practical concepts of these topics and see the results of actual results from a CICD pipeline that runs Terraform and deploys the infrastructure for a Kubernetes cluster that can host a 5G networking solution (2/2).
The entire talk can be watched on the platform of the Xchange conference. It’s available for all Replyers and Reply’s customers.
First, in this practical article, we wanted to share the code used for the different Terraform demos. The <main.tf> files of each demo are shown also in the screenshots below.
Of course, we can do all these manually by typing a couple of commands on our local machine (assuming AWS credentials are set up). The commands we need to do this locally are:
Automation couldn’t be missing from one of our articles since we have talked about DevOps, CI/CD and other automation concepts recently in previous blogs. Below we can see how a Gitlab CI (CI/CD) pipeline looks like in the context of provisioning the infrastructure. The three steps are responsible for automatically building (init & validate), deploy and, when needed, destroy the infrastructure.
As with any code the tools we need to trigger automatically this pipeline is our IDE (we used IntelliJ), git and the setup on Gitlab CI (gitlab-ci.yml is attached below). Once we make a change and push the code to our repository the pipeline will be triggered and the steps will be executed.
Finally, following the successful execution of the pipeline i.e. green pipeline, we will be able to browse to our AWS account in the EC2 section and see what instances have been initiated. Below we can see the t2.small
EC2 instances created as part of the Elastic Kubernetes Service (EKS) when executing the TF files within the directory of “03-EKS-Cluster-Deployment-Auto”. Also a t2.micro
server is created by the TF code in the directory of “02-AWS-EC2-Provision-Auto”.
Before you go away, we would like to thank you for reaching this point. I really hope we have managed to transfer some knowledge to you. This article has delved into the practical concepts of DevOps and Infrastructure as Code (IaC). Our the previous article provides a theoretical explanation to these. If you would like to explore more of these services and concepts, at Reply we are offering the opportunity to discuss these topics and adjust them to your services and needs. Feel free to browse at Reply Online Services (ROSe) — rose.reply.com and book an appointment with us.
Net Reply UK consists of software developers, technology enthusiasts specialising in Telecommunications and technological concepts such as Software Defined Networks (SDN), Network Function Virtualisation (NFV), DevOps. Our mission is to build the Next Generation Networks leveraging the art of software and the latest technological trends. If you would like more information, feel free to reach out on LinkedIn (stelios-moschos) LinkedIn (thayná-dorneles). Alternatively, you can learn more about us on LinkedIn (Net UK) and Twitter (Net UK)
Join other developers and claim your FAUN account now!
Influence
Total Hits
Posts
Only registered users can post comments. Please, login or signup.