Conf42 DevOps 2024 - Online

Platform Engineering with GitHub Actions: A Prometheus Deployment Example

Video size:

Abstract

Dive into Platform Engineering with GitHub as we explore the inner workings of Bitovi’s open-source “Deploy Prometheus” GitHub Action. Witness simplicity in action as we deploy Prometheus to a cloud provider using nothing but Bitovi’s seamless GitHub Action. Then, we’ll navigate the implementation details of the action repository itself to understand the behind-the-scenes magic which involves a brief overview on Bitovi’s Commons framework, a catalog for IaC. In this talk, we’ll show you how complex IaC deployments can be abstracted with GitHub Actions to provide a pleasing developer experience.

Summary

  • We will explore Bitovi's open source deploy Prometheus GitHub action. We will also explore Bitovis' open source framework, referred as commons. Commons ensures seamless integration of IAC tools such as terraform and ansible. At the end of this session, you'll be able to leverage the power of GitHub actions as a platform engineering.

Transcript

This transcript was autogenerated. To make changes, submit a PR.
With GitHub actions. A Prometheus deployments example the agenda for today is we will deploy Prometheus in AWS EC two instance using Bitovi's seamless GitHub action we will explore Bitovi's open source deploy Prometheus GitHub action. We will also explore Bitovi's open source framework, referred as commons, which ensures seamless integration of IAC tools such as terraform and ansible. At the end of this session, you'll be able to leverage the power of GitHub actions as a platform engineering. You'll also witness live deployment of Prometheus using Bitovis GitHub action. You will get insights into the Bitovis action repository. You will also discover that how Bitovi's internal frameworks commons ensure seamless integration of tools such as terraform and ansible without user worrying about installing or setup of these tools. Here we have a deployments repository in which user defines workflow, which would call Bitovi's GitHub action to deploy Prometheus and Grafana. Let's see the content of this repository. Under observability folder we have configuration related to Prometheus and Grafana, such as under Prometheus we have scrape targets for Prometheus to scrape metrics from. Similarly, under Grafana we have a data source for Grafana. Let's see the content of workflow file. Under workflow file we are calling Bitovi's GitHub action to deploy Prometheus and Grafana. You can also see that we are providing mandatory parameters aw access key id and secret access key to deploy Prometheus and Grafana in AWS EC two instance. Along with this, you can also pass AWS default region to deploy Prometheus in and similarly you can also specify which EC two instance type you want. Finally, you can see that we are passing the path for our configuration files here. Let's make a small change into the workflow file. I'm going to comment this line and I'm going to commit these changes directly into the main. Once these changes are committed directly into the main branch, the workflow would make use of Bitovis GitHub action and Commons to deploy Prometheus and Grafana in EC two instance. In the meantime, till this workflow is complex, let's see what's inside the action repository and what is Commons framework. We will start by exploring Bitovis GitHub action repository. Let's see the action file for the Bitovis GitHub action repository. Here you can see that we have all the inputs are exposed to make use by developers. Any steps such as ISE, any scripts or commands are defined into the steps. For example, we are copying all the configuration later to Prometheus and Grafana at appropriate destination. Similarly, we are also calling Bitovi's internal framework named as GitHub action Commons. Here you can see that we have passed this input parameter where we are specifying that the input for our ansible is at path. This in the similar way you can specify your path for other tools such as terraform and helm. And then Commons would make sure that your deployments are ready without you to concern about deploying or installing terraform, ansible or any IAC tools. Let's see the overall structure of commons repository as I shown you that in action we have certain kind of parameter. You can see that if your deployment require terraforms, you can specify the path of terraform using this input parameter. Similarly, you can specify the input for ansible and helm, and then Commons would make sure that the deployment is ready using appropriate IAC tools. Commons is trying to run few scripts and these scripts make sure that the code from deployment and action repo is merged together and it's defined in an order way for Bitovis to construct Ise as infrastructure as code. Let's explore all these repositories from diagram point of view. You can see that we have three repositories deployment repository, action Repo and comma repo. Deployment repo is used by user user would create workflow which would further call Bitovi's internal GitHub action. In Bintovi's internal GitHub action, we specify the deployments of tools such as Prometheus and Grafana, which further call Bitovi's internal framework referred as common, which is can open source framework commons. Make sure that your deployments is ready without you worrying about installing or setup any of IAC tools such as terraform or ansible. Commons is a wrapper around the bitops. Bitops has baked in terraform and ansible as containers commons also make sure to organize the structure of repository by merging the content of deployment repository and action repository commons also expose the output in a way so that they can be reused. This is all about deployments. Repository action repository common repository you can very easily leverage the power of commons and action without setting up any of IAC tools. Let's see the status of our actions. You can see that our action has been completed successfully. Now let's see the status of this into the EC two instance, our deployment for Prometheus and Grafana would be accessible at this IP address along with its respective port such as for Prometheus. We are making use of port number 9090 here you can see that we have our Prometheus deployments ready and from our status we can see the targets and we have our target up and healthy. So this is all about Bitovis GitHub action and Bitovis Open source framework Commons. Let us know if you have any questions or you need help setting your environment using platform Engineering. Thank you.
...

Karamveer Kaur Sangha

DevOps Consultant @ Bitovi

Karamveer Kaur Sangha's LinkedIn account



Awesome tech events for

Priority access to all content

Video hallway track

Community chat

Exclusive promotions and giveaways