Accelerating your time to market while delivering high-quality products is vital for any company of any size. This fast pacing and always evolving world relies on getting quicker and better in the production pipeline of the products. The whole DevOps and Lean methodologies help to achieve the speed and quality needed by continuously improving the process in a so-called feedback loop. The faster the cycle, the quicker is the ability to achieve the competitive advantage to outperform and beat the competition.
It is fundamental to have a scientific approach and put metrics in place to measure and monitor the progress of the different actors in the whole software lifecycle and delivery pipeline.
Gerrit DevOps Analytics (GDA) to the rescue
We need data to build metrics to design our continuous improvement lifecycle around it. We need to juice information from all the components we use, directly or indirectly, on a daily basis:
- SCM/VCS (Source and Configuration Management, Version Control System)
how many commits are going through the pipeline? - Code Review
what’s the lead time for a piece of code to get validated?
How are people interacting and cooperating around the code? - Issue tracker (e.g. Jira)
how long does it take the end-to-end lifecycle outside the development, from idea to production?
Getting logs from these sources and understanding what they are telling us is fundamental to anticipate delays in deliveries, evaluate the risk of a product release and make changes in the organization to accelerate the teams’ productivity. That is not an easy task.
Gerrit DevOps Analytics (aka GDA) is an OpenSource solution for collecting data, aggregating them based on different dimensions and expose meaningful metrics in a timely fashion.
GDA is part of the Gerrit Code Review ecosystem and has been presented during the last Gerrit User Summit 2018 at Cloudera HQ in Palo Alto. However, GDA is not limited to Gerrit and is aiming at integrating and processing any information coming from other version control and code-review systems, including GitLab, GitHub and BitBucket.
Case study: GDA applied to the Gerrit Code Review project
One of the golden rules of Lean and DevOps is continuous improvement: “eating your dog food” is the perfect way to measure the progress of the solution by using its outcome in our daily life of developing GDA.
As part of the Gerrit project, I have been working with GerritForge to create Open Source tools to develop the GDA dashboards. These are based on events coming from Gerrit and Git, but we also extract data coming from the CI system, the Issue tracker. These tools include the ETL, for the data extraction and the presentation of the data.
As you will see in the examples Gerrit is not just the code review tool itself, but also its plugins ecosystem, hence you might want to include them as well into any collection and processing of analytics data.
Wanna try GDA? You are just one click away.
We made the GDA more accessible to everybody, so more people can play with it and understand its potentials. We create the Gerrit Analytics Wizard plugin so you can have some insights in your data with just one click.
What you can do
With the Gerrit Analytics Wizard you can get started quickly and with only one click you can get:
- Initial setup with an Analytics playground with some defaults charts
- Populate the Dashboard with data coming from one or more projects of your choice
The full GDA experience
When using the full GDA experience, you have the full control of your data:
- Schedule recurring data imports. It is just meant to run a one-off import of the data
- Create a production ready environment. It is meant to build a playground to explore the potentials of GDA
What components are needed?
To run the Gerrit Analytics Wizard you need:
You can find here more detailed information about the installation.
One click to crunch loads of data
Once you have Gerrit and the GDA Analytics and Wizard plugins installed, chose the top menu item Analytics Wizard > Configure Dashboard.
You land on the Analytics Wizard and can configure the following parameters:
- Dashboard name (mandatory): name of the dashboard to create
- Projects prefix (optional): prefix of the projects to import, i.e.: “gerrit” will match all the projects that are starting with the prefix “gerrit”. NOTE: The prefix does not support wildcards or regular expressions.
- Date time-frame (optional): date and time interval of the data to import. If not specified the whole history will be imported without restrictions of date or time.
- Username/Password (optional): credentials for Gerrit API, if basic auth is needed to access the project’s data.
Sample dashboard analytics wizard page:
Once you are done with the configuration, press the “Create Dashboard” button and wait for the Dashboard, tailored to your data, to be created (beware this operation will take a while since it requires to download several Docker images and run an ETL job to collect and aggregate the data).
At the end of the data crunching you will be presented with a Dashboard with some initial Analytics graphs like the one below:
You can now navigate among the different charts from different dimensions, through time, projects, people and Teams, uncovering the potentials of your data thanks to GDA!
What has just happened behind the scenes?
When you press the “Create Dashboard” button, loads of magic happens behind the scenes. Several Docker images will be downloaded to run an ElasticSearch and Kibana instance locally, to set up the Dashboard and run the ETL job to import the data. Here a sequence workflow to illustrate the chain of events is happening:
Conclusion
Getting insights into your data is so important and has never been so simple. GDA is an OpenSource and SaaS (Software as a Service) solution designed, implemented and operated by GerritForge. GDA allows setting up the extraction flows and gives you the “out-of-the-box” solution for accelerating your company’s business right now.
Contact us if you need any help with setting up a Data Analytics pipeline or if you have any feedback about Gerrit DevOps Analytics.
Fabio Ponciroli – Gerrit Code Review Contributor – GerritForge Ltd.