DevOps for Small Applications

2021 08 02 head

DevOps is the combination of cultural philosophies, practices and tools that increase an organization’s ability to deliver at high velocity.

It evolves and improves products at a faster pace than organizations using traditional software development and infrastructure management processes.

This speed enables organizations to better serve their customers [1, 2].

A surprising side effect of this speed-up is a documented improvement of the delivered quality.

How It Works

Under a DevOps model, development and operations teams are no longer siloed. Sometimes, these two teams are merged into a single team where the engineers work across the entire application lifecycle. The work is from development through test, deployment to operations. The range of skills is not limited to a single function.

In some DevOps models, quality assurance and security teams may also become more tightly integrated with development and operations. When security is the focus of everyone on a DevOps team, this is sometimes referred to as DevSecOps.

2021 08 02 devops cycle

These teams practice automating processes that historically have been manual and slow. They use a technology stack and tooling, which helps them operate and evolve applications quickly and reliably. These tools also help engineers independently carry out tasks that normally would have required help from other teams. This increases a team’s velocity.

You will automate every workflow in the long term to achieve speed and reliability.

You will merge your Scrum software development teams, quality assurance groups, operations teams and testing groups into single product teams.

You will define cross-functional teams as documented in the Scrum.

Benefits

Speed

Move at high velocity, so you can innovate for customers faster, adapt to changing markets better, and grow more efficient at driving business results. The DevOps model enables your developers and operations teams to achieve these results. For example, microservices and continuous delivery let teams take ownership of services and then release updates to them quicker.

Rapid Delivery

Increase the frequency and pace of releases, so you can innovate and improve your product faster. The quicker you can release new features and fix bugs, the faster you can respond to your customers’ needs and build a competitive advantage. Continuous integration and continuous delivery are practices that automate the software release process, from build to deploy.

Reliability

Ensure the quality of application updates and infrastructure changes, so you can reliably deliver at a more rapid pace while maintaining a positive experience. Use practices like continuous integration and continuous delivery to test that each change is functional and safe. Monitoring and logging practices help you stay informed of performance in real-time.

Scale

Operate and manage your infrastructure and development processes at scale. Automation and consistency help you manage complex or changing systems efficiently and with reduced risk. For example, infrastructure as code helps you manage your development, testing and production environments in a repeatable and more efficient manner.

Improved Collaboration

Build more effective teams under a DevOps cultural model, which emphasizes values such as ownership and accountability. Developers and operations teams collaborate closely, share many responsibilities, and combine their workflows. This reduces handover inefficiencies and diminishes cycle-time. It reduces, for example, handover periods between developers and operations, writing code that takes into account the environment in which it is run.

Security

Move quickly while retaining control and preserving compliance. You can adopt a DevOps model without sacrificing security by using automated compliance policies. For example, using infrastructure as code and policy as code, you can define and then track compliance at scale.

DevOps Adoption

Transitioning to DevOps requires a change in culture and mindset. At its simplest, DevOps is about removing the barriers between two traditionally siloed teams, development and operations. In some organizations, there may not even be separate development and operations teams; engineers may do both.

With DevOps, the two teams work together to optimize both the productivity of developers and the reliability of operations. They strive to communicate frequently, increase efficiencies, and improve the quality of services they provide to customers. They take full ownership of their services, often beyond where their stated roles or titles have traditionally been scoped.

Quality assurance and security teams may also become tightly integrated with these teams. Organizations using a DevOps model have teams that view the entire development and infrastructure lifecycle as part of their responsibilities.

DevOps Practices

Continuous Integration

Continuous integration is a software development practice where developers regularly merge their code changes into a central repository. Automated builds and tests are run upon changes in the repository. The key goals of continuous integration are to find and address bugs quicker, improve software quality, and reduce the time it takes to validate software updates.

Continuous Delivery

Continuous delivery is a software development practice where code changes are automatically built, tested, and prepared for a release to production. It expands upon continuous integration by deploying all code changes to a testing environment or a production environment after the build stage. When continuous delivery is implemented properly, developers will always have a deployment-ready build artifact.

Modular Systems and Microservices

The microservice’s architecture is a design approach to build a single application as a set of small services. Each service runs in its own process and communicates with other services through a well-defined interface using a lightweight mechanism. Microservices are built around business capabilities; each service is scoped to a single purpose. You can use different frameworks or programming languages to write microservices and deploy them independently, as a single service, or as a group of services.

Infrastructure as Code

Infrastructure as code is a practice in which infrastructure is provisioned and managed to use code and software development techniques. Examples are version control and continuous integration. The cloud’s API-driven model enables developers and system administrators to interact with infrastructure programmatically. They do need to interact manually set up and configure resources. Engineers can interface with infrastructure using code-based tools and treat infrastructure in a manner similar to how they treat application code. Because they are defined by code, infrastructure and servers can quickly be deployed using standardized patterns, updated with the latest patches and versions.

Monitoring and Logging

Organizations monitor metrics and logs to see how application and infrastructure performance impacts the experience of their product’s end user. By capturing, categorizing, and then analyzing data and logs generated by applications and infrastructure, organizations understand how changes or updates impact users, shedding insights into the root causes of problems or unexpected changes. Active monitoring becomes increasingly important as services must be available 24/7 and as application and infrastructure update frequency increases. Creating alerts or performing real-time analysis of these data also helps organizations more proactively monitor their services.

Communication and Collaboration

Increased communication and collaboration in an organization is one of the key cultural aspects of DevOps. The use of DevOps tooling and automation for the software delivery process establishes collaboration. They physically bring together the workflows and responsibilities of development and operations. Building on top of that, these teams set strong cultural norms around information sharing and facilitating communication through the use of chat applications, issue or project tracking systems, and wikis. This helps speed up communication across developers, operations, and even other teams like marketing or sales, allowing all parts of the organization to align more closely on goals and projects.

DevOps Tools

A DevOps toolchain is a set or combination of tools that aid in the delivery, development, and management of software applications throughout the system development life cycle, as coordinated by an organisation that uses DevOps practices.

2021 08 02 ci cd pipeline

Generally, DevOps tools fit into one or more activities, which support specific DevOps initiatives: Plan, Create, Verify, Package, Release, Configure, Monitor, and Version Control.

What is Java DevOps?

Java DevOps is simply applying DevOps practices and philosophies to Java app development. That means that compartmentalized teams are no longer needed when creating Java applications.

You should understand these principles:

Continuous integration

This practice requires developers to periodically merge the code that they have written into a central repository. After the merge, tests and automated builds are executed. This allows a team to find issues and quickly quash out bugs, improve the application’s quality and then cut the time needed to validate your apps. Often the step of Continuous Delivery is added to the pipeline.
Use a platform such as gitLab, gitHub, BitBucket, or Azure DevOps. Use Gradle as your build tool.

Continuous delivery

This practice requires your team to release into production all code changes after it is written and then automatically built, and tested. If continuous integration puts your code changes onto a testing environment, continuous delivery puts it into a production environment. What does this mean? You will always have a production-ready Java application!
Use Gradle to create your application. Use Docker, Ansible to deploy.

Microservices

DevOps makes use of microservices. Instead of having one big monolithic Java application, your application is made up of smaller and independent applications.
Use domain driven design DDD as your architecture method. Prefer standalone applications embedding your application server.

Infrastructure as a code

This practice means that infrastructure is allocated and then managed by using code and development techniques. Cloud services can help your development and operations teams interact with infrastructure at a scale they are comfortable with. With infrastructure as a code, servers and infrastructure are deployed fast, automatically patched and can easily be duplicated.
Use Docker and Ansible to automate your deployment.

Lessons Learnt

The motivations for what has become modern DevOps and several standard DevOps practices, such as automated build and test, continuous integration, and continuous delivery originated in the Agile world, which dates to the 1990s. Agile development teams using methods such as eXtreme Programming could not satisfy the customer through early and continuous delivery of valuable software unless they subsumed the operation responsibilities associated with their applications, many of which they automated.

Because Scrum emerged as the dominant Agile framework in the early 2000s, and it omitted the engineering practices that were part of many Agile teams, the movement to automate operations functions splintered from Agile and expanded into what has become modern DevOps cite[accelerate]. Today, DevOps focuses on the deployment of developed software, whether it is developed via Agile or other methodologies.

To practice DevOps effectively, software applications have to meet a set of architecturally significant requirements such as: deployability, modifiability, testability, and monitorability. You must continuously monitor your infrastructure, network and application.

You need a cultural change to successfully implement DevOps workflows.

Bigger companies often have trouble with the changes. Command and control cultures always fail. It boils down if your culture trusts your collaborators - often called Theory X and Theory Y beliefs.

Interestingly, the DevOps transformation is similar to an agile transformation. The approaches, recipes and failures are similar.

Smaller organizations are often more affine with trust.

Although it is possible to practice DevOps with any architectural style, the microservices architectural style is becoming the standard for building continuously deployed systems. Small size service allows the architecture of an individual service to emerge through continuous refactoring [3, 4, 5] hence reducing the need for a big upfront design, allows for releasing the software early[citation needed] and continuously.

References

[1] T. Owens, The lean enterprise how corporations can innovate like startups. 2014 [Online]. Available: https://www.amazon.com/dp/1118852176

[2] G. Kim, The Phoenix Project a novel about IT, DevOps, and helping your business win. IT Revolution Press [Online]. Available: https://www.amazon.com/dp/0988262592

[3] J. Humble and D. Farley, Continuous Delivery. Addison-Wesley Professional, 2010 [Online]. Available: https://www.amazon.com/dp/0321601912

[4] D. Farley, Continuous Delivery Pipelines. 2021 [Online]. Available: https://www.amazon.com/dp/B096YGZVZ9

[5] G. Kim and N. Forsgren, DevOps Handbook, Second. IT Revolution Press, 2021 [Online]. Available: https://www.amazon.com//dp/B09G2GS39R