In this blog, we will monitor the AWS EC2 instances using Prometheus and visualize the dashboard using Grafana.

Agenda

  1. What is Prometheus
  2. Install Prometheus and configure Prometheus to monitor itself
  3. Install Node Exporter on other EC2 Instances
  4. Configure Prometheus for the EC2 Instance
  5. EC2 Service Discovery for Prometheus
  6. Install Grafana

Prerequisite:

  1. Prometheus EC2 instance t2.micro
  2. Node EC2 instances to monitor
  3. Security Groups Configured properly
  4. Clone this git repo

Security Groups Configured on EC2 Instances

Port 9090 — Prometheus Server

Port 9100 — Prometheus Node Exporter

Port 3000 — Grafana

Prometheus EC2 Instance

Configure the security group on EC2 Instance where Prometheus Server is installed as shown below…


In this blog, we will explore Kubernetes Objects ,learn about how to create a Nginx deployment using yaml file.

We will also learn how to rollback the deployment and how the revision number changed when we do the rollback.

Prerequisite

  1. Kubernetes Cluster should be configured
  2. Kubectl configured

Follow my YouTube video or blog to setup the prerequisite.

Kubernetes Objects

Kubernetes objects are persistent entities in the Kubernetes system. Kubernetes uses these entities to represent the state of your cluster.

A Kubernetes object is a “record of intent” — once you create the object, the Kubernetes system will constantly work to ensure that object exists. …


In this blog, we will explore Google Kubernetes Engine. We will setup a Kubernetes Cluster using Google Kubernetes Engine(GKE) Service which is provided by Google.

With GKE, we don’t need to build a cluster from scratch. Instead, clusters can be launched and turned down on demand.

Check out my GCP For beginners tutorial if you are not familiar with GCP.

Introduction

We can create Kubernetes Engine cluster using GCP console or using gcloud CLI.

CLI is a more flexible way to make the operation repeatable or to integrate it with your existing pipeline.

Prerequisite

1. GCP Project Created

2. gcloud CLI…


In this blog, we will explore how to create an account in GCP and learn creating resources like VPC, subnets, firewalls.

Image for post
Image for post
GCP infrastructure

Setup a GCP account

  1. Go to https://cloud.google.com/.
  2. Click the “Try Free” button
  3. Sign up and follow the prompts
  4. GCP will give $300 as a free credit to use for this example

Creating a GCP project

Let’s create a GCP project → navigate as per the screen shown below and click on the dropdown

Image for post
Image for post

Here, you will see all the projects which are already present and an option to create a new project

Image for post
Image for post

It will also provide you the information how much quota is available for you. …


In this blog, we will explore how can we encrypt and decrypt files using GPG.

GPG (GNU Privacy Guard) is a free encryption software which is compliant with OpenPGP Standard. This is used to encrypt the secrets and share it with anyone.

We will learn how to use PGP encryption to send encrypted messages to anyone.

How to do the setup

  1. Download software from here
  2. Click on the exe file, install it with all default settings
  3. Generate the keypair

Once installation is complete, below screen will come

Image for post
Image for post

Click on New Key Pair — you can provide any random values.

Provide the passphrase — This is required to decrypt/import any file. …


Check my YouTube video for this article

For more articles, please follow my website

https://devops4solutions.com/

As development, staging and production environment are isolated from each other, so does the terraform code required to. In order to built a re-usable terraform code for both staging and production environment, without conducting copy and paste, one must follow the modules strategy. In this blog we will learn how to create Reusable infrastructure with Terraform Modules

Terraform modules:

Think of them just like functions in a programming language, which we define once and then call them by passing parameters from anywhere in the code. …


Check my YouTube video for this article

https://www.youtube.com/watch?v=MLDFcN3IhB0

For more articles, please follow my website

https://devops4solutions.com/

In this blog, we will learn How to manage terraform state file remotely on S3 bucket. By default, our terraform state file is stored locally. Now we will explore to store it in S3 bucket

If you are working on a team, then its best to store the terraform state file remotely so that many people can access it

If the state file is stored remotely so that many people can access it, then you risk multiple people attempting to make changes to the same file at the exact same time. So we need to provide a mechanism that will “lock” the state if its currently in-use by another user. …


Check out my YouTube video for this article

In this blog we will do the Terraform Installation on AWS EC2 Linux Instance. We will learn basics of Terraform and its basic commands to launch an Ec2 instance.

Before starting the installation, lets explore what is terraform.

Introduction

Terraform is a cross-platform tool, which means that it does not only interact with AWS — it can also interact with a multitude of other platforms, such as GCE, VMware, OpenStack, and Azure.

The main benefit of it is that rerunning a declarative definition will never do the same job twice, whereas executing the same shell script will most likely break something on the second run. …


Check out my video for this article

For more article, check out my blog https://devops4solutions.com/

In this blog, we will see what is docker volumes and why do we need to use volumes. We will explore options for the data storage in docker. How we can persist the data using docker volumes?

If you do not know about Docker, refer my docker article for the basic understanding

Three types of storage is present in docker

  1. bind mount
  2. tmpfs mount
  3. volume — is the most preferred mechanism for persist the data

In the below diagram, we have

  1. Host machine where docker is installed
  2. bind mount — which uses the filesystem of your local docker host machine to persist/store your…

Check out my video for this article

For more article, check out my blog https://devops4solutions.com/

In this blog, we will learn what is docker-compose and how we can deploy a tomcat application which uses mysql database. We will learn how we can setup a development environment using docker-compose in a single command

Prerequisite:

  1. Docker and Docker-compose installed

INTRODUCTION

  • Docker-compose is a tool which is used to deploy multi-container application.
  • One single yaml file to deploy your application on the server.
  • Best suited for the developers to setup their workstation in a single command without installing any kind of dependencies for the application
  • docker-compose up to start your…

About

Nidhi

Devops Automation Enginneer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store