DevOps Practices in a nutshell

Sep 06, 2021

Traditional IT sectors had separate teams for development and operations. The development team’s responsibilities include creating and delivering a working code. The operations team’s responsibilities comprised management and deployment of the same. However, conflicts arise between the two teams when the code/software developed defects in the later stages. This issue became the brainchild of the DevOps concept i.e., synchronization of the development and operation teams.

Many companies have adopted this culture to accelerate their delivery constructively and efficiently. DevOps is a service that empowers modern organizations with several automation practices which would be discussed further in this blog.

DevOps Phases and Tools

While adopting DevOps practices, there are a series of tools that are used in each practice. The tools help in streamlining and automating the Software Delivery Pipeline. The following are a few tools that are used at different DevOps stages.

  1. PLAN: In this phase, business requirements and values are defined. Tools like Git, Jira, Confluence, and Slack are used to plan and perform project management.
  2. CODE: In this phase, software coding and design are carried out with the help of tools like GitLab, Stash, GitHub, BitBucket, etc.
  3. BUILD: Assembly and management of the software are carried out in this phase. The automated tools help in the compilation and packaging of code for production. This can be carried out with the help of Docker, Gradle, Artifactory, Puppet, etc.
  4. TEST: Here, the software is tested for defects to ensure its quality and standards. The tools used in this phase are Selenium, Vagrant, Blazemeter, TestNG, Appium, etc.
  5. DEPLOY: In this phase, the software is managed, coordinated, scheduled, deployed, and automated for release. The tools supporting these functions are Docker, Kubernetes, Jenkins, OpenStack, Ansible, etc.
  6. OPERATE: This phase consists of monitoring and orchestration of live code. This phase is parallel to the monitoring phase. Some of the tools include Ansible, PowerShell, Chef, Salt, Puppet, etc.
  7. MONITOR: In this phase, the performance and states of the software are tracked and supervised to identify defects (if any). The tools which can be used in this phase are Splunk, Wireshark, Slack, Datadog, etc.

DEVOPS PRACTICES

DevOps practices are steps that focus on the automation of one or more development cycle phases. The following are some of the DevOps practices which are implemented in any organization:

  • CONTINUOUS TESTING

DevOps adopts early and automated testing as a strategy to find and resolve errors during the programming stage itself, instead of later stages. Using automated frameworks and tools reduces manual testing, thus speeding up the process. Automation testing facilitates defined test cases so that no time is lost in creating test cases manually. These test cases are efficient and help to evaluate many aspects of the code. Automated testing reduces the chances of human errors and increases reliability. It is extremely convenient when there is a need to execute multiple test cases.

As DevOps supports continuous development, automated testing helps to achieve the required speed and agility. Automated testing requires the coordination of the Development, Quality assessment, and Operations team.

Choosing the right tool for defining a mature testing framework is very important. There is a wide range of open-source and licensed tools available in the market. The tools are dependent on the languages used and there are separate tools for testers and developers. Choosing a tool that will yield proper test reports is very crucial to the whole Continuous Testing practice.

Even if automated testing is implemented, we cannot replace manual testing completely. A team of professionals who are skilled in automation and testing would be of great help. This would help the organization strike a balance between over-automation and under-automation.

  • CONFIGURATION MANAGEMENT

Configuration management is the act of automating, monitoring and designing otherwise manual configuration processes via a configuration platform. Configuration management orchestrates these processes to promote consistency and efficiency. It helps in defining the state of each system. Configuration management consists of the following set of activities:

  1. Configuration Identification: The configurations which are to be monitored are identified. via an automated discovery tool or through a manual process such as maintaining source codes on a common repository.
  2. Configuration Control: Once the configurations are identified, an effective mechanism to control the changes in the configuration management is to be applied.
  3. Configuration Audit: Despite applying various techniques to control and monitor configuration changes, there are chances of the mechanisms failing. So, configuration audits are implemented to supervise configuration compliance.

Configuration management in DevOps is governed by three primary components such as:

  1. Artefact Repository: It is a place to store machine files such as test data, libraries, binary files etc. These are often the by-products of continuous integration. When builds are pushed out, they generate artefact files, which are not accessed but require storage in the system.
  2. Source Code Repository: This repository contains the working codes, scripts and configuration files. It acts as a container for storing ‘Human-readable’ files. There are two kinds of source code repositories:
  • Centralized Version Control System: the code is stored in a centralized location.
  • Distributed Version Control System: the code is stored across multiple terminals.

Out of these two, the latter is mostly preferred by DevOps professionals as it is more reliable and faster.

  1. Configuration Management Data Architecture: CMBD is a relational database that spans multiple systems related to configuration management services, servers, applications and much more. CMDB is used to enhance change management and auditing.

Configuration management is often confused with the term change management. Change management is the process of reimagining and changing designs to fulfil new needs and dynamic conditions. Its main goal is to manage the changes which affect the system’s configuration. Configuration management on the other hand focuses on managing the configurable parts and states of the system.

Configuration management reduces the need to recruit more IT management staff as the processes are automated. Proper configuration management is the key to continuous testing and delivery.

  • CONTINUOUS INTEGRATION AND CONTINUOUS DELIVERY

Continuous integration and continuous delivery, also known as the CI/CD pipeline, enable frequent and reliable delivery of code changes. This practice goes hand in hand with continuous testing.

In continuous integration, the code is consistently refreshed in the repository by the developers. After this, the automated assemblies and tests are carried out. Continuous integration helps in the faster completion of various combinations. CI devices and tools help in the differentiation of existing and new codes and handle them accordingly. Implementation of Continuous Integration leads to identifying defects and quality issues on smaller codes instead of the larger ones leading to a shorter commit cycle.

Feature flags are a mechanism used in a CI process. It is a configuration mechanism used to turn the features and code on and off during run time. This helps in segregating the features that are still under development and enables testing or running the completed parts of the code. Another technique to enable feature management in CI is version control branching. This technique is used to create branches based on their development cycle duration. However, the former technique is more convenient as it facilitates hassle-free feature management in case of concurrent developments.

After continuous integration, continuous delivery is carried out. It is the automation of pushing applications to the production environments. The delivered components are then staged for review and tests. The steps involved in continuous delivery would include:

  1. Extracting code from version control and executing a build.
  2. Executing the required, automated infrastructure as code to modify cloud infrastructure.
  3. Moving the code to targeted environments and managing the configuration of the same.
  4. Executing steps needed for new code push.
  5. Executing rollback environments in cases where tests fail.
  6. Generating reports on the log data and alerts on the delivery status.
  7. Performing data synchronizations, application and library patching and archiving information resources.

CD tools provide dashboards with reporting functions so that any failure in the deliveries can be notified to the developers. Since they are integrated with version control tools, they can be used to track code changes and versions to ease error management. CI/CD pipelines can be implemented using containers like Docker. Orchestration systems like Kubernetes can also be implemented to optimize the automation process.

  • CONTINUOUS DEPLOYMENT

Continuous deployment is a special case of continuous delivery. Continuous deployment is the process where every change in the source code is automatically deployed to the production unit. The developer reviews a pull request from a teammate and merges it with the master branch. The continuous deployment process is automated in the staging environment. It helps in keeping the deployment- to production process manual with just a click. This helps in tracking who deployed which code and when they did it. This practice can be adopted when the enterprise plans to use the user as the actual tester. Continuous deployment results in faster releases.

  • APPLICATION MONITORING

Application monitoring is the overviewing of the entire development process starting from planning to deployment. It is a complete and real-time view of all the tasks carried out in the DevOps team and the state of the application, services and production infrastructure. It involves techniques like real-time streaming, historical replay, and visual representations. This practice involves the Ops (Operations) team more than the Dev (Development) team, however high coordination between the two is important to establish a successful monitoring infrastructure.

The following are core practices to be followed in application monitoring:

  1. Shift-Left Testing: It refers to testing performed at the early stages of the Software Development Lifecycle. This practice can be extended to monitoring pre-production environments. This ensures continuity throughout the production and preserves the quality of production. Early monitoring also enhances testing practices.
  2. Alert and Incident Management: While adopting cloud solutions, incidents such as hardware failure, network issues, misconfiguration, resource exhaustion, data inconsistencies, and software bugs may occur. Due to the dynamic nature of the cloud, these issues may be difficult to resolve. Hence, the implementation of high-quality alert systems which enable collaboration saves the day.

The systems must have minimized mean time to detect and isolate errors and alerts in the code. Systems with usable dashboards can be implemented so that the team members can be trained to use them.

Application monitoring is crucial for DevOps as it enhances the application execution irrespective of whether it is being sent to the cloud or local data centre. Application management measures performance, availability and user experience. This practice encourages presentation checks of the application by proactive observation. This is a tedious process due to the emergence of hybrid clouds and native cloud environments, owing to their dynamic nature. It requires high-level on-call availability and monitoring.

CONCLUSION

DevOps is an approach where one size does not fit all organizations. It involves the constant adaption of new technologies and tools for a seamless experience. The significant advancements in the tools used for DevOps implementation are a sign that DevOps will continue to evolve in future. For example, Kubernetes is now used along with Docker to improve automated deployment and management. DevOps has further branched out to services like DevSecOps, QAOps, SecDevOps, MLOps and much more.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.