Coder Social home page Coder Social logo

nagateja-dharam / 90days_devops_subham_answers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pavankumar0077/devops_learnings

0.0 0.0 0.0 39.78 MB

A documentation of my DevOps learnings - 90 days of devops answers

Shell 92.28% HCL 7.72%

90days_devops_subham_answers's Introduction

DevOps_learnings

Jenkins CI/CD Project with GitHub Integration using GitHub Webhook

An AWS instance is created and Jenkins is installed on that server. On the AWS management console, in the security section, the security group permissions are accessed and the port 8080 (port in which Jenkins server runs) is given anywhere or private IPv4 access using inbound rules. The server private IP is then used to access the port 8080. When the Jenkins dashboard appears, we must make sure to install the GitHub Integration plugin. A new job is created is created as Pipeline project of deployment. A suitable description is written, the project url from the github, the repository url is added and the branch name is also specified. GitHub hook trigger for GITScm polling is selected as the build trigger.

 docker-compose down
 docker-compose up -d

The following code is used for running the container of the todo-app and this code is written in the Execute Shell and changes are applied.

In the project GitHub repo settings, webhooks options is selected and a new webhook is added. A url is added in the following format

http://<private -ip>:8080//github-webhook/ 

The content type is selected as application/json and it is saved.

The purpose of webhook is that, every time a new pipeline is created the Jenkins server hits in the repo so that any change in the code is also reflected in the creation of the pipeline and running of the application.

Managing Deployments using Kubernetes Engine

Created a AWS t2.medium instance for using Kubernetes by installing minikube in Linux with the help of the following commands :

 curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
 sudo install minikube-linux-amd64 /usr/local/bin/minikube

To start your cluster :

 minikube start

Now using the vim text editor in Linux YAML scripts are written for pod, which is the smallest unit in a K8s cluster, deployment file for creating a deployment for the django-todo app, service file for creating a service and ingress file for hosting.

To run the files the following command is used :

 kubectl apply -f <file_name>

If the file contains namespace, which are a kind of tag to group certain files, the following command is used :

 kubectl apply -f <file_name> -n <namespace_used>

For viewing the running pods, deployments, services the following commands are used :

 kubectl get pods
 kubectl get deployments
 kubectl get services

Shell Scripting Project

A basic shell script in Linux which :

  • Greets the user according to the time of the day using conditional statements
  • Provides the information about :
    • Date and time
    • Uptime of the server
    • The last logins
    • The disk space and RAM
    • Utilization and the top CPU Process

90days_devops_subham_answers's People

Contributors

rajdeep1311 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.