DEV Community

Cover image for Datree: a simple yet powerful tool
Rupesh
Rupesh

Posted on

Datree: a simple yet powerful tool

Introduction

We are in a phase where Kubernetes containers have become essential for most companies. By Developing these technologies, apps were deployed seamlessly. But managing the development speed, code quality and security is a big challenge. This makes it hard to work and make sure all we need to go through in time and under the correct standards; minor errors can make chaos.
This is where Datree helps the developers educate with their errors in their manifest and prevent those misconfigurations from ever reaching the production. The best way to deal with this chaos was to bring some order at the Git level. It aligns all your organization's repositories under one centralized policy considering the organizations best practices.
Datree, a Saas company, was co-founded by Shimon Tolts; "shift left" their main aim is to detect mistakes as early in the development process as possible, which prevents developers from making errors in their configurations.

What is Datree?

Datree is an Open Source tool with a user-friendly UI that is a git-based policy engine on top of GitHub repositories for developing best practices, coding standards, security and compliance policies that Prevent Kubernetes misconfigurations from ever reaching production. By running the appropriate rules packages to ensure developers follow the policy checks at the Git level itself. Which increases the organization's coding standards and keeps the codebase clean. Datree integrates with the user Github account and ensures that the developers follow policy checks for every code commit.
Screenshot 2021-09-26 at 12.18.15 AM

Usually, we use CI/CD to automate checks, and only when the reviews are passed will they be merged to the main branch. So as a part of checks, we can use Datree for making sure that the Kubernetes manifests are following best practices and then proceed with CI/CD pipelines.
20z7va20rl4huwo2mdlu

Why Datree?

  • Datree works in almost every operating system directly in git workflow as it is 90% Git-based(so adding more source controls is relatively easy).
  • Datree ensures appropriate policy checks at the git level, such as enforcing security policies and best practices at the pull request level. And optionally block merging any PRs that do not pass the check with user-friendly error messages, making the code reviews more efficient.
  • It prevents pulling containers for sources that are not verified and prevent secrets from committing into the source control.
  • It has 30 built-in codings and security best practices policies, requiring specific versions of packages. Hence enforcing organizations with excellent coding standards. Furthermore, you can also customize the policies based on the needs of your organization.
  • Datree need not be connected not the production cluster to perform checks. It can also run offline.

How to install?

Datree can be installed through the terminal using this command.
Screenshot 2021-09-30 at 12.38.26 AM

After installing Datree, you can test your Kubernetes manifests or try the demo file(automatically installed) by using this command. Which actually runs the policies checks even without connecting to the production cluster.
Screenshot 2021-09-30 at 12.44.57 AM

So after running the test command, you can see the output, which shows the Policy checks were not following provided and also with a link you can sign-in to Datree's website through your Github Account. After signing in you can clearly see the policies that are being followed and also customise the policies.

Screenshot 2021-09-30 at 12.52.18 AM

In my Opinion, datree is a simple yet excellent tool helping solve real-world problems. There are many alternatives and competition for Datree. But the actual competition is with developers who create similar tools within their companies to maintain their company coding standards and security.

Resources:

Check out datree.io to learn more about it.
If you are a beginner just like me and curious to learn more about Kubernetes, check out this amazing repository created by the CNCF community.
Also checkout this playlist to learn more about Open Source projects

Top comments (0)