Book Image

DevOps Bootcamp

By : Mitesh Soni
Book Image

DevOps Bootcamp

By: Mitesh Soni

Overview of this book

DevOps Bootcamp delivers practical learning modules in manageable chunks. Each chunk is delivered in a day, and each day is a productive one. Each day builds your competency in DevOps. You will be able to take the task you learn every day and apply it to cultivate the DevOps culture. Each chapter presents core concepts and key takeaways about a topic in DevOps and provides a series of hands-on exercises. You will not only learn the importance of basic concepts or practices of DevOps but also how to use different tools to automate application lifecycle management. We will start off by building the foundation of the DevOps concepts. On day two, we will perform Continuous Integration using Jenkins and VSTS both by configuring Maven-based JEE Web Application?. We will also integrate Jenkins and Sonar qube for Static Code Analysis. Further, on day three, we will focus on Docker containers where we will install and configure Docker and also create a Tomcat Container to deploy our Java based web application. On day four, we will create and configure the environment for application deployment in AWS and Microsoft Azure Cloud for which we will use Infrastructure as a Service and Open Source Configuration Management tool Chef. For day five, our focus would be on Continuous Delivery. We will automate application deployment in Docker container using Jenkins Plugin, AWS EC2 using Script, AWS Elastic Beanstalk using Jenkins Plugin, Microsoft Azure VM using script, and Microsoft Azure App Services Using Jenkins. We will also configure Continuous Delivery using VSTS. We will then learn the concept of Automated Testing on day six using Apache JMeter and URL-based tests in VSTS. Further, on day seven, we will explore various ways to automate application lifecycle management using orchestration. We will see how Pipeline can be created in Jenkins and VSTS, so the moment Continuous? Integration is completed successfully, Continuous Delivery will start and application will be deployed. On the final day, our focus would be on Security access to Jenkins and Monitoring of CI resources, and cloud-based resources in AWS and Microsoft Azure Platform as a Service.
Table of Contents (9 chapters)

Need for DevOps

There is a famous quote by Harriet Tubman which you can find on (http://harriettubmanbiography.com). It says :

Every great dream begins with a dreamer. Always remember, you have within you the strength, the patience, and the passion to reach for the stars to change the world .

Change is the law of life and that is applicable to organizations as well. If any organization or individual looks only at the past or present patterns, culture, or practices, then they are certain to miss future best practices. In the dynamic IT world, we need to keep pace with the technology evolution.

We can relate to George Bernard Shaw's saying:

Progress is impossible without change, and those who cannot change their minds cannot change anything.

Here, we are focusing on changing the way we manage the application life cycle.

The important question is whether we really need this change? Do we really need to go through the pain of this change?

The answer is yes.

One may say that such kinds of change in business or culture must not be forceful.

Agree.

Let's understand the pain points faced by organizations in application life cycle management in the modern world with the help of the following figure:

Considering the changing patterns and competitive environment in business, it is the need of the hour to improve application life cycle management.

Are there any factors that can be helpful in these modern times which can help us to improve application life cycle management?

Yes. Cloud computing has changed the game. It has opened doors for many path-breaking solutions and innovations. Let’s understand what cloud computing really means and how terms like DevOps and automation play an important role for enterprise companies.

Overview of cloud computing

Cloud computing is the next logical step in terms of the evolution of computing. From traditional data centers and virtualization, to hybrid environments, private, public, and hybrid cloud services, cloud computing is a type of computing that provides multitenant or dedicated computing resources such as compute, storage, and network, which are delivered to cloud consumers on demand. It comes in different flavors which include cloud deployment models and cloud service models. The most important thing in this is the way its pricing model works, which is pay-as-you-go.

Cloud deployment models describe the way cloud resources are deployed:

1) Private cloud: private cloud consists of cloud resources that are behind the firewall and on-premise exclusively for a specific organization
2) Public cloud: public cloud consists of cloud resources that are available to all organizations and individuals
3) Hybrid cloud: hybrid cloud consists of cloud resources that are available to a specific set of organizations that share similar types of interests or similar types of requirements
4) Community cloud: community cloud consists of cloud resources that combine two or more deployment models

Cloud service models describe the way cloud resources are made available to customers of all kinds, from individuals and small organizations, to large enterprises.

It can be in the form of pure infrastructure, where virtual machines are accessible and controlled by cloud consumers or end users, that is, Infrastructure as a Service (IaaS); or a platform where runtime environments are provided so that the installation and configuration of all software needed to run the application is already available and managed by cloud service providers, that is, Platform as a service (PaaS); or Software as a Service (SaaS), where the whole application is made available by cloud service providers with the responsibility of infrastructure and the platform remaining with the cloud service provider.

There are many Service Models that have emerged during the last few years, but IaaS, PaaS, and SaaS are based on the National Institute of Standards and Technology (NIST) definition:

Cloud computing has a few characteristics that are significant such as multitenancy, pay-as-you-use similar to electricity or gas connection, On Demand Self Service, Resource Pooling for better utilization of compute, storage, and network resources, Rapid Elasticity for scaling up and scaling down resources, based on needs, in an automated fashion, and Measured Service for billing.

Over the years, the usage of different cloud deployment models has varied based on use cases. Initially, public cloud was used for applications that were considered noncritical, while private cloud was used for critical applications where security was a major concern.

Hybrid cloud and public cloud usage has evolved over time, with the experience and confidence in the services provided by cloud service providers. Similarly, the usage of different cloud service models has varied based on use cases and flexibility. IaaS was the most popular in the early days, but PaaS is catching up in its maturity and ease of use with enterprise capabilities such as auto-scaling, support for multiple programming languages, and support for end-to-end application life cycle management tools.

Overview of DevOps

DevOps is all about the culture of an organization, processes, and technology to develop communication and collaboration between development and IT operations teams to manage the application life cycle more effectively than the existing ways of doing it. We often tend to work based on patterns to find reusable solutions from similar kinds of problems or challenges.

Over the years, achievements and failed experiments, best practices, automation scripts, configuration management tools, and methodologies have become an integral part of DevOps culture.

It helps to define practices for a way of designing, a way of developing, a way of testing, a way of setting up resources, a way of managing environments, a way of configuration management, a way of deploying an application, a way of gathering feedback, a way of code improvements, and a way of doing innovations.

The following are some of the visible benefits that can be achieved by implementing DevOps practices.

DevOps culture is considered an innovative package to integrate Dev and Ops teams in an effective manner that includes components such as continuous build integration, continuous testing, cloud resource provisioning, continuous delivery, continuous deployment, continuous monitoring, continuous feedback, continuous improvement, and continuous innovation to make application delivery faster, as per the demands of agile methodology. Evolving a culture is not an overnight journey. It takes a long time. However, there are also confusions regarding what DevOps is, hence, often only continuous integration or configuration management practices are considered as a DevOps practices implementation. It is a scenario similar to that of the elephant and five blind men, where every man touches a specific part of his body and assumes that to be an elephant.

However, it is not only the development and operations teams that are involved. The testing team, business analysts, build engineers, automation team, cloud team, and many other stakeholders are involved in this exercise of evolving the existing culture.

The DevOps culture is not much different than the organization culture, which has shared values and behavioral aspects. It needs adjustment in mindsets and processes to align with new technology and tools.

Challenges for the development and operations teams

There are some challenges, which is why this scenario has occurred and that is why DevOps is going in the upward direction and is the talk of the town in all information technology related discussions.

Challenges for the development team

Developers are enthusiastic and willing to adopt new technologies and approaches to solve problems. However, they face many challenges, including the following:

  • The competitive market creates pressure for on-time delivery
  • They have to take care of production-ready code management and new feature implementation
  • The release cycle is often long, hence, the development team has to make assumptions before the application deployment finally takes place. In such a scenario, it takes more time to fix the issues that occur during deployment in the staging or production environment

Challenges for the operations team

The operations team is always careful in changing resources or using any new technologies or new approaches, as they want stability. However, they face many challenges, including the following:

  • Resource contention: it's difficult to handle increasing resource demands
  • Redesigning or tweaking: this is needed to run the application in the production environment
  • Diagnosing and rectifying: they are supposed to diagnose and rectify issues after application deployment in isolation

Challenges for the IT team

The IT team provides resources to the respective teams to carry out the operations:

  • Infrastructure provisioning: to provide infrastructure and a runtime environment with proper package installation on resources
  • Configuration management: to upgrade the existing infrastructure or packages based on updates available in tools or technologies

Considering all the challenges faced by the development and operations teams, how should we improve existing processes, make use of automation tools to make processes more effective, and change people's mindset? Let's see in the next section on how to evolve the DevOps culture in an organization and improve efficiency and effectiveness.