DevOps Concepts and Practices
In the previous posts:
I gave an introduction to the culture of DevOps and why it’s so awesome. If your infrastructure lives on the cloud you should be using the full power of the various DevOps tools that exist today — within reason, of course. Please don’t start using kubernetes for a 3 page wordpress blog with light traffic, just because kube is the cool kid on the block.
Keep reading to find out about some concepts of DevOps that are core to the philosophy and practice of DevOps. I have intentionally left out mentions of specific tools, that is for the next post.
Build Automation
Automating the process of prepping code in a deployable state so that it can be easily pushed to a live environment.
The code may need to be compiled, linted, transformed, auto-tested, minified, etc.
Build automation means doing the above in a automated as well as consitent way using a script or tool. The tools used will differ based upon the underlying language and framework. Usually, build automation uses configuration files which are treated as part of the source code (and commited to source control).
Build automation should be independent of an IDE. Good build automation is consistent across the configuration of the machine it is run on.
Benefits of build automation:
- It is fast
- It is consistent (more importantly)
- It does not/should not depend on machine configuration
Build automation falls more into the territory of dev than ops.
Continuos Integration
The practice of frequently merging code developed by the dev team, as opposed to large merges after a long sprints.
CI means merging multiple times per day instead of waiting weeks.
CI should be automated as much as possible. It is usually done with the help of a CI server. Whenever CI server sees a change in the code, it automatically performs a build and executes automated tests. If there is a problem with the build, the CI server notifies the dev team.
Continuous Delivery and Continuous Deployment
Continuous Delivery — The practice of maintaining code in a deployable state
Continous Deployment — The practice of frequently deploying small code changes to production.
With Continuous Deployment, deployments to prod are routine and commonplace, not big and scary events.
The process should necessarily be automated. Rollbacks in case of failures must also be automated.
CD is an important step in ensuring faster time-to-market. Continuous Deployement is also less risky than merging a lot of code together and also facilitates easier rollback.
Infrastructure as Code
Manage and provision infrastructure using code and automation.
IaC provides consistency in creation and management of resources. It also provides easy and effortless reusability. It is scalable as opposed to manual provisioning. IaC may also act as a source controlled documentation of the infrastructure.
Orchestration
Orchestration is automation that supports processes and workflows, such as provisioning resources.
It enables the infrastructure to have self-healing environments that are capable of handling large changes in load.
One popular example of an orchestration tool is kubernetes.
Monitoring
The collection of data about the performance and stability of services and infrastructure.
Monitoring tools collect data about things like:
- usage of memory
- cpu
- disk i/o
- network traffic
- etc.
These were some of the most basic concepts of DevOps for which awesome and mind-blowing tools have been made. But the tools are for the next post.
Thanks for reading!