DMCA.com Protection Status Trending Topics About Devops

Saturday, 26 March 2022

 DevOps culture leads to DevOps practices that are geared toward streamlining and improving the development lifecycle, to reliably deliver frequent updates, while maintaining stability. 

To learn more, expand each of the following six categories.  

DevOps teams set strong cultural norms around transparency of information and communication. These cross-functional teams have ownership and thus, instead of evaluating just their work, they consider the project needs collectively. They build empathy for each other’s efforts, partnerships, and trust, while collaborating towards common goals. They physically bring together traditional development and operations workflows and systematically improve productivity. 


DevOps tools and automation of the delivery process, support these consolidated processes and workflows, coordinate efforts, automate repetitive tasks, and facilitate feedback loops required in good communication and collaboration.

Monitoring and observability are used to assess how effective changes to the application and infrastructure are, and how they impact performance and overall user experience. Part of DevOps feedback loops, monitoring and observability help teams react, learn, plan, and improve.


An observable system is a system that generates enough data from all resources, applications, and services in the form of logs, metrics, and traces to gain system-wide operational visibility. Logs report on discrete events, such as warnings. Metrics capture health and performance information, such as request rate or response time. Traces report on transactions and the flow of data across a distributed system, such as one comprised of microservices. 

By observing a system, you can draw concise inferences about why something is happening.

Monitoring tells you what is happening with your system. By consolidating and visualizing data gathered by an observable system over time, teams gain insight on performance, identify trends, can set alarms, and make predictions on expected outcomes.

Continuous integration is a DevOps software development practice where developers regularly merge their code changes into a central repository, after which automated builds and tests are run. This way, teams can resolve merging issues and code defects early, when they are easier and more cost effective to resolve.


Continuous integration most often refers to the build or integration stage of the software release process. It requires both an automation component (for example, a CI or build service) and a cultural component (for example, learning to integrate frequently). The key goals of continuous integration are to find and address bugs quicker, improve software quality, and reduce the time it takes to validate and release new software updates.

Continuous delivery is a software development practice where every code change is automatically built, tested, and then deployed to a non-production testing or staging environment. Manual approval is required before pushing to production. When properly implemented, developers will always have a deployment-ready build artifact that has passed through a standardized test process.


Continuous deployment is similar to continuous delivery, but with automatic deployment to production. Tested code does not need an explicit approval before being pushed to production.

A microservices architecture, is a design approach that builds an application as a set of loosely coupled services. Each service is designed for a set of capabilities and focuses on solving a specific business problem. Services do not need to share any of their code or implementation with other services. Any communication between individual components happens via well-defined APIs. These services can be assigned to fully accountable teams, and be developed, tested, an deployed independently of other services.


According to research from DevOps Research and Assessment (DORA), the type of architecture the team settles on, is a direct predictor of how successful they will be with achieving continuous delivery. The nature of microservices supports faster development, updates and corrections, and quicker deployments.

Development, testing, and production run on complex environments comprised of hardware and software. Manually spinning up and setting environments does not scale and is error prone. 


Infrastructure as code (IaC) is a practice in which infrastructure is provisioned and managed using code and software development techniques, such as version control and continuous integration.


The cloud’s API-driven model enables developers and system administrators to interact with infrastructure programmatically, and at scale, instead of needing to manually set up and configure resources. Because environments are defined by code, they can quickly be deployed with dynamically enforced compliance, updated with the latest patches, rolled back to a previous version, or duplicated in repeatable ways. Also, by reacting to environment changes through modification to this code, you can track changes, optimize resources, and improve system uptime. 

A DevOps pipeline is a set of stages that move code from source, all the way to deployment. The graphic that follows depicts typical stages in a DevOps pipeline and depicts the phases involved in a CI/CD pipeli


A CI/CD pipeline is a good example of how DevOps teams use tools to streamline workflows and standardize practices. A CI/CD pipeline assures code quality, security, and fast, consistent deployments by repeatably progressing through the pipeline. DevOps teams iteratively remove process overlaps, human errors, and bottlenecks through automation.

Every DevOps team requires an efficient and reliable CI/CD pipeline. A CI/CD pipeline requires a well-integrated tool chain. 

DevOps is a combination

 DevOps is a combination of:

Cultural philosophies for removing barriers and sharing end-to-end responsibility

Processes developed for speed and quality, that streamline the way people work

Tools that align with processes and automate repeatable tasks, making the release process more efficient and the application more reliable

Improving efficiency and predictability of the application and services.

Improving efficiency and predictability of the application and services.

As you go through the course, keep in mind that teams practice DevOps to increase innovation and agility, improve quality, release faster, and lower cost. DevOps improves delivery efficiency and predictability of the application and services.

Devops

 DevOps is the combination of cultural philosophies, practices, and tools that increases an organization’s ability to deliver applications and services at high velocity: evolving and improving products at a faster pace than organizations using traditional software development and infrastructure management processes. This speed enables organizations to better serve their customers and compete more effectively in the market. 

DevOps emphasizes better collaboration and efficiencies so teams can innovate faster and deliver higher value to businesses and customers.

An infinity loop formed by the software lifecycle stages is a common depiction of the ongoing collaboration and efficiencies suggested by DevOps.

An infinity loop formed by the software lifecycle stages is a common depiction of the ongoing collaboration and efficiencies suggested by DevOps.

DevOps is short for Development (Dev) and Operations (Ops). Dev are the people and processes that create software. Ops are the teams and processes that deliver and monitor the software. 




DATA-TYPE IN VARIABLES

 CONDITIONAL STATEMENT EXAMPLE


provider "aws" {

  region     = "us-east-1"

  access_key = "AUGQ"

  secret_key = "KMdfVkt1aurid"

}


variable "image" {

  type    = list

  default = ["ami-02e136e904f3da870", "ami-02e136e904f3da870", "ami-02e136e904f3da870"]


}


variable "instancetype" {

  type    = map

  default = {

    "dev" = "t2.small",

    "test" = "t2.medium",

    "prod" = "t2.large"


}

}



variable input {}


resource "aws_instance" "dev" {

  instance_type = var.instancetype["dev"]

  ami = var.image[0]

  count = var.input == "dev" ? 1 : 0


  tags = {

   Name = "dev-dep"


}


}


resource "aws_instance" "test" {

  instance_type = var.instancetype["test"]

  ami = var.image[1]

  count = var.input == "test" ? 2 : 0


  tags = {

   Name = "test-dep"

}

}




resource "aws_instance" "prod" {

  instance_type = var.instancetype["prod"]

  ami = var.image[2]

  count = var.input == "prod" ? 3 : 0


  tags = {

   Name = "dev-dep"

}

}

EQUAL TO



provider "aws" {
  region     = "us-east-1"
  access_key = "AUGQ"
  secret_key = "KfTMdfVkt1aurid"
}

variable "image" {
  type    = list
  default = ["ami-02e136e904f3da870", "ami-02e136e904f3da870", "ami-02e136e904f3da870"]

}

variable "instancetype" {
  type    = map
  default = {
    "dev" = "t2.small",
    "test" = "t2.medium",
    "prod" = "t2.large"

}
}


variable input {}

resource "aws_instance" "dev" {
  instance_type = var.instancetype["dev"]
  ami = var.image[0]
  count = var.input == "dev" ? 1 : 0                              #if input is equal to dev create 1 if not then 0

  tags = {
   Name = "dev-dep"



 GREATER THAN EQUAL TO



provider "aws" {

  region     = "us-east-1"

  access_key = "AKGQ"

  secret_key = "Kkt1aurid"

}


variable "image" {

  type    = list

  default = ["ami-02e136e904f3da870", "ami-02e136e904f3da870", "ami-02e136e904f3da870"]


}


variable "instancetype" {

  type    = map

  default = {

    "dev" = "t2.small",

    "test" = "t2.medium",

    "prod" = "t2.large"


}

}



variable input {}


resource "aws_instance" "dev" {

  instance_type = var.instancetype["dev"]

  ami = var.image[0]

  count = var.input >= "2" ? 1 : 0


  tags = {

   Name = "dev-dep"


}

}


NOT EQUAL TO 

provider "aws" {
  region     = "us-east-1"
  access_key = "AUGQ"
  secret_key = "KVkt1aurid"
}

variable "image" {
  type    = list
  default = ["ami-02e136e904f3da870", "ami-02e136e904f3da870", "ami-02e136e904f3da870"]

}

variable "instancetype" {
  type    = map
  default = {
    "dev" = "t2.small",
    "test" = "t2.medium",
    "prod" = "t2.large"

}
}


variable input {}

resource "aws_instance" "dev" {
  instance_type = var.instancetype["dev"]
  ami = var.image[0]
  count = var.input != "2" ? 2 : 0     

  tags = {
   Name = "dev-dep"



Count Parameter

 provider "aws" {

  region     = "us-east-1"

  access_key = "AKQ"

  secret_key = "KfdfVkt1aurid"

}


variable "instancetags" {

  type    = list

  default = ["root", "user1", "user2"]

}


variable "instancetype" {

  type    = list

  default = ["t2.nano", "t2.micro", "t2.medium"]

}






resource "aws_instance" "cloud-instan" {

  ami           = "ami-02e136e904f3da870"

  instance_type = var.instancetype[count.index]

  count         = 3

  tags          = {

    Name        = var.instancetags[count.index]


local value

 NOTE:  we can use multiple services from one account. we can use tag for each resource. ==local value is a good concept than tags == if we need to change tag only we need to change local value.

vim aaa.tf

provider "aws" {

  region     = "us-east-1"

  access_key = "AUGQ"

  secret_key = "Kft1aurid"

}



locals {

  common_tag = {

   Name = "uk-project"

   Owner = "moon"

}

}


locals {

 usa = {

 Name = "us-pro"


}



}




resource "aws_instance" "web" {

  ami           = "ami-0ed9277fb7eb570c9"

  instance_type = "t3.micro"

  tags           = local.common_tag


}


resource "aws_vpc" "main" {

  cidr_block       = "10.0.0.0/16"

  instance_tenancy = "default"

  tags           = local.common_tag



}


resource "aws_ebs_volume" "example" {

  availability_zone = "us-east-1a"

  size              = 40

  tags           = local.common_tag



}



resource "aws_instance" "us1" {

  ami           = "ami-0ed9277fb7eb570c9"

  instance_type = "t3.micro"

  tags           = local.usa


}


resource "aws_vpc" "us2" {

  cidr_block       = "10.0.0.0/16"

  instance_tenancy = "default"

  tags           = local.usa



}



resource "aws_ebs_volume" "us3" {

  availability_zone = "us-east-1a"

  size              = 40

  tags           = local.usa



}


Terraform with VARIABLES

NOTE : DATA TYPES ARE STRING - NUMBER - LIST- MAP 


BY DEFAULT IT WILL TAKE STRING 


VIM TIM.TF 

provider "aws" {

  region     = "us-east-1"

  access_key = "AKVUGQ"

  secret_key = "KfU0tVkt1aurid"

}



resource "aws_elb" "bar" {                                      # load balancer search code in website 

  name               = var.elbname

  availability_zones = var.azname



  listener {

    instance_port     = 8000

    instance_protocol = "http"

    lb_port           = 80

    lb_protocol       = "http"

  }




  health_check {

    healthy_threshold   = 2

    unhealthy_threshold = 2

    timeout             = 3

    target              = "HTTP:8000/"

    interval            = 30

  }



  cross_zone_load_balancing   = true

  idle_timeout                = 400

  connection_draining         = true

  connection_draining_timeout = var.timeout


  tags = {

    Name = "cloud"

  }

}


resource "aws_instance" "new1" {

  ami           = var.image

  instance_type = var.mapvar["us-east-1a"]

  tags = {

   Name = var.instancetag[0]

}

}



resource "aws_instance" "new2" {

  ami           = var.image

  instance_type = var.mapvar["us-east-1b"]

   tags = {

   Name = var.instancetag[1]

}



}


resource "aws_instance" "new3" {

  ami           = var.image

  instance_type = var.mapvar["us-east-1c"]

   tags = {

   Name = var.instancetag[2]

}


VIM VAR.TF



}

variable "elbname" {

  type = string

}


variable "azname" {

 type = list

 default = ["us-east-1a","us-east-1b","us-east-1c"]

}


variable "timeout" {

  type = number

}



variable "instancetype" {

type = list

default = ["t2.micro","t2.medium","t2.small"]

}


variable "image"{

default = "ami-02e136e904f3da870"



}



variable "instancetag" {

type = list

default = ["new1","new2","new3"]


}


variable "mapvar" {

type = map

default = {

us-east-1a = "t2.large"

us-east-1b = "t2.medium"

us-east-1c = "t2.nano"

}

}



COPY SNAPSHOT EBS FROM ONE REGION TO ANOTHJER

 NOTE : CHANGE REGION WHERE WE NEED TO COPY



VI TTT.TF

provider "aws" {

  region     = "us-west-1"

  access_key = "AKKVUGQ"

  secret_key = "Kf9Vkt1aurid"

}



resource "aws_ebs_snapshot_copy" "example_copy" {

  source_snapshot_id = "snap-08bc5c27dad8e82b3"

  source_region      = "us-east-1"


  tags = {

    Name = "HelloWorld_copy_snap"

  }

}


EBS VOLUME

CREATE EBS VOLUME AND SNAPSHOT


 VI EBS.TF 


provider "aws" {

  region     = "us-east-1"

  access_key = "AKIBKVUGQ"

  secret_key = "KfU3xN99jTMdfVkt1aurid"

}


resource "aws_ebs_volume" "example" {

  availability_zone = "us-east-1a"

  size              = 10


  tags = {

    Name = "HelloWorld"

  }

}


resource "aws_ebs_snapshot" "example_snapshot" {

  volume_id = aws_ebs_volume.example.id


  tags = {

    Name = "HelloWorld_snap"


Sunday, 13 February 2022

What is DevOps ?

 DevOps in simplest terms is “how you build and deploy your software”.

It is about the culture that your team members live, the principles that guide your development process, the set of practices you follow to automate and speed up your delivery, the mindset you demonstrate to achieve complete customer satisfaction.

We all know, the word DevOps is a shortened acronym of Development and Operations. In essence, it is bringing together your software development team and operations team to work towards a common goal and have a unified vision. Their collective focus is always the product or the application which is being developed, rather than individual performances or targets.



In the DevOps world, Dev and Ops don’t work in silos anymore, but rather work in collaboration, as a single unit more efficiently and effectively. They perform their specialized roles effectively, but possess an end-to-end visibility of the whole process. Blame-game is replaced by mutual admiration and celebration of each other’s success. Challenges are solved together and continuous and rapid software delivery becomes the ultimate aim.

The assured benefits of DevOps philosophy are rapid software releases, shorter development cycles, reduced risks, quicker issue resolution, and better productivity. DevOps is a logical extension to agile and the main force behind the dynamism exhibited by many tech-giants for their extraordinary high performance. Shared responsibility, agile processes, automated tasks, smarter workflows, fearless innovation and continuous feedback are the driving factors of a DevOps approach.

DevOps is definitely not about “unlearning” how you have been developing software, but it is about “learning the new dynamics of software development” – improvising the existing processes, prioritizing tasks, changing perspectives and looking at the larger picture from organization’s benefit rather than individual accomplishments.

A DevOps team will also begin from requirements and go until deployment, code and test software, but they will integrate and automate the steps to make the whole process seamless, faster and productive. Let us now understand each of these steps in detail.


THE IMPORTANT PHASES IN A DEVOPS CYCLE
  • Continuous Development
  • Continuous Testing
  • Continuous Integration
  • Continuous Deployment
  • Continuous Monitoring
  • Continuous Feedback


Continuous Development

Software functionality is implemented and the versions of code is maintained using Version Control tools like Git, SVN, CVS etc.

Maintaining versions helps the developers to collaborate on the latest committed code and to rollback to previous versions in case of an unstable deployment.



Continuous Testing

Automation Testing is an efficient way to ensure code is thoroughly tested before it is released to production. Tools like Selenium, TestNG, Junit/NUnit are used to automate the test cases execution which saves time and effort. Reports generated help in defects analysis.

Triggering the entire automation testing process is vital and hence, the Continuous Integration tools come into the picture.


Continuous Integration

Developers commit their code after each update, to a shared code base and each integration is verified by an immediate build to minimize integration errors. It is undoubtedly the most crucial phase of DevOps cycle which holds it all together.

Popular tools are Jenkins, Bamboo and Hudson where Jenkins is the most widely used. These tools orchestrate the DevOps cycle.















Continuous Deployment

This is the phase where the code is actually deployed in production-like environments. Continuous Delivery is the process where new versions of an application are deployed frequently. In Continuous Deployment, we deploy each successful build to production automatically.

Configuration Management and Containerization tools that help in Continuous Deployment are Puppet, Ansible, Chef, SaltStack, Docker etc.


Continuous Monitoring

Monitoring performance of an application is as vital as its development. Defects that are left during Testing phase have to be reported as bugs and dealt with.

Splunk, ELK Stack, and Nagios are some of the popular tools for monitoring. These tools help you minimize the impact of failures.


Continuous Feedback

Feedback is the synergist for organizational changes. DevOps feedback loop has transformed the complete software delivery by highlighting all the major issues and bottlenecks before the actual release. Feedback is an integral part of all phases.

Due to shorter development cycles, we get frequent feedback from users which helps us to adapt quickly to changing dynamics. Each time we integrate, we test, or we deploy and run, the data we gather, are important feedback mechanisms for constant improvisation.





                                                   WHAT LED TO DEVOPS ?


Every organization must innovate and constantly improve to stay competitive in this expeditious IT world. Whether you sell physical merchandise, provide some online services, or deliver values through a web-based application, your business definitely has to build some code, run it in production and manage some IT infrastructure at an ever-growing rate. But how do you achieve this?




As we all know, there were many challenges with the conventional waterfall process. Software development and IT operations were two separate units that worked independently. Developers coded their pieces in secluded environments with unique configurations.

IT operations then took all the software artifacts and put them together as a running application in deployment that had desirable attributes such as high availability, scalability, and security.

Clients, as well as production support, were typically unaware of what the developers and testers were working on and if the business requirements changed midway, incorporating them within timelines and assuring quality was very difficult. The teams always blamed other counterparts for faults and failures.

With manual internal processes and workflows, productivity is always hampered by process bottlenecks or other dependencies.





The agile methodology could address some of these issues as it bridged the gap between developers and testers but Operations was still a separate entity, resulting in a huge delay in deployment. Agile made the development process faster through smaller and iterative deliveries, but there was a demand to reduce time-to-market and assure supreme quality.

DevOps was thus born, merging development and operations under one umbrella and significantly accelerating software delivery and offering incredible benefits.

DevOps owes its conception to Patrick Debois who coined the term ‘DevOpsDays’ for his conference in 2009 which emphasized on the power of different teams working together as ‘ONE’. Since then, started a new wave in technology and DevOps gradually became the IT buzzword which every organization wanted to adopt and experience.



DEVOPS IS NOT A DIFFERENTIATING FACTOR ANYMORE RATHER AN ESSENTIAL ELEMENT TO COMPETE AND SURVIVE IN THE IT INDUSTRY.



Benefits of DevOps

DevOps brings strategic shifts in processes, mindsets, culture, and collaboration and results in beneficial business outcomes.
IT Professionals with DevOps knowledge and expertise bring along important strategic skills that propels an organization’s culture.





The following benefits from DevOps will help an organization appreciate the impact of a DevOps approach, such as:

  • Accelerated Time to Market
  • Shorter development cycles
  • Effective communication and collaboration
  • Improved Product Quality and Higher customer satisfaction
  • Reduced Deployment Failures and Rollbacks
  • Reduced Time to Recovery
  • Reduced Costs