learning about software development with kibana dashboards · learning about software development...

29
Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona [email protected] @jgbarah Bitergia / LibreSoft (URJC) Lightning Talks, FOSDEM Brussels (Belgium), January 31st 2016 Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 1 / 29

Upload: doancong

Post on 18-Aug-2019

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Learning about software development with Kibanadashboards

Jesus M. Gonzalez-Barahona

[email protected] @jgbarahBitergia / LibreSoft (URJC)

Lightning Talks, FOSDEMBrussels (Belgium), January 31st 2016

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 1 / 29

Page 2: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

c©2016 BitergiaSome rights reserved. This presentation is distributed under the

“Attribution-ShareAlike 3.0” license, by Creative Commons, available athttp://creativecommons.org/licenses/by-sa/3.0/

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 2 / 29

Page 3: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Structure of the presentation

1 A bit of context

2 From the team who built MetricsGrimoire...

3 Your very own dashboard for your pet GitHub repo

4 Enjoy

5 Some details

6 Bonus track

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 3 / 29

Page 4: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

A bit of context

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 4 / 29

Page 5: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Me and my circumstances

Uni Rey Juan Carlos:

LibreSoft research team

Understanding free, open source software development

Data analytics approach

Bitergia:

From research to the real world

Understanding free, open source software development

Data analytics approach

http://gsyc.es/~jgb

http://bitergia.com

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 5 / 29

Page 6: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

The company

The software development analytics company

dashboards

reports

consultancy

...

http://bitergia.comJesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 6 / 29

Page 7: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

From the team who builtMetricsGrimoire...

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 7 / 29

Page 8: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

MetricsGrimoire: the current state of affairs

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 8 / 29

Page 9: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

MetricsGrimoire: supported data sources

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 9 / 29

Page 10: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

GrimoireLab: the next big thing

Perceval: retrieving data

ElasticSearch: storing data

Python / Pandas scripts: enrich, analyze, customizethe data

Kibiter: Kibana fork to interact with the data

http://grimoirelab.github.io

http://blog.bitergia.com

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 10 / 29

Page 11: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Your very own dashboard foryour pet GitHub repo

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 11 / 29

Page 12: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

One of my pet repos: MetricsGrimoire/Bicho

https://github.com/MetricsGrimoire/Bicho

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 12 / 29

Page 13: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Set up the environment

Create and activate a new Python virtualenv:

$ virtualenv -p /usr/bin/python3 gitlab

$ gitlab/bin/activate

Install dependencies

(gitlab) $ pip install beautifulsoup4

(gitlab) $ pip install python-dateutil

(gitlab) $ pip install requests

(gitlab) $ pip install six

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 13 / 29

Page 14: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Install GrimoireLab tools

Install Perceval from its GrimoireLab git repo:

(gitlab) $ git clone \

https://github.com/grimoirelab/perceval.git

(gitlab) $ cd perceval

(gitlab) $ git checkout fosdem16

(gitlab) $ python3 setup.py install

(gitlab) $ cd ..

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 14 / 29

Page 15: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Install GrimoireLab tools

Clone GrimoireELK GrimoireLab git repo, checkoutbranch fosdem16

(gitlab) $ git clone \

https://github.com/grimoirelab/GrimoireELK.git

(gitlab) $ cd GrimoireELK

(gitlab) $ git checkout fosdem16

(gitlab) $ cd ..

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 15 / 29

Page 16: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Prepare the repository to analyze

We will use MetricsGrimoire/Bicho:

(gitlab) $ git clone \

https://github.com/MetricsGrimoire/Bicho

(gitlab) $ cd Bicho

(gitlab) $ git log --raw --numstat \

--pretty=fuller --decorate=full --parents \

-M -C -c --remotes=origin --all \

> /tmp/bicho-gitlog.log

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 16 / 29

Page 17: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Upload info to ElasticSearch

First, upload info in the git log:

(gitlab) $ cd ../GrimoireELK/util

(gitlab) $ python3 ./p2o.py -e http://localhost:9200 \

--no_inc --debug git /tmp/bicho-gitlog.log

(gitlab) $ python3 ./p2o.py -e http://localhost:9200 \

--no_inc --debug --enrich_only git /tmp/bicho-gitlog.log

...

2016-01-31 00:47:26,960 Deleted and created index

http://localhost:9200/git__tmp_bicho-gitlog.log_enrich

Index name:git__tmp_bicho-gitlog.log_enrich

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 17 / 29

Page 18: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Upload info to ElasticSearch

Second, upload info from GitHub issues & pull requests(may take a while & requires a GitHub token)

(gitlab) $ python3 ./p2o.py -e http://localhost:9200 \

--no_inc --debug github --owner metricsgrimoire \

--repository bicho --token XXXX

(gitlab) $ python3 ./p2o.py -e http://localhost:9200 \

--no_inc --debug --enrich_only github \

--owner metricsgrimoire --repository bicho --token XXXX

...

2016-01-31 00:45:37,269 Deleted and created index

http://localhost:9200/github_https:__github.com_metricsgrimoire_bicho_enrich

Index name:github_https:__github.com_metricsgrimoire_bicho_enrich

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 18 / 29

Page 19: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Produce a Kibana dashboard

We upload template dashboards to ElasticSearch,and build our dashboards with them(notice the index names)

(gitlab) $ python3 ./kidash.py -e http://localhost:9200 \

-g --import ../dashboards/git-activity.json

(gitlab) $ python3 ./kidash.py -e http://localhost:9200 \

-g --import ../dashboards/github-pr-bubbles-geoMap.json

(gitlab) $ python3 ./e2k.py -g -e http://localhost:9200 \

-d "Git-Activity" -i git__tmp_bicho-gitlog.log_enrich

(gitlab) $ python3 ./e2k.py -g -e http://localhost:9200 \

-d "PRBubblesGeoMap" -i \

github_https:__github.com_metricsgrimoire_bicho_enrich

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 19 / 29

Page 20: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Enjoy

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 20 / 29

Page 21: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

See the dashboards in your browser

http://localhost:5601

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 21 / 29

Page 22: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Select the produced dashboards

Template dashboards: Git Activity andPRBubblesGeoMap

Real dashboards: the other two

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 22 / 29

Page 23: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Watch the results of your work!

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 23 / 29

Page 24: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Watch the results of your work! Play with them!

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 24 / 29

Page 25: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Some details

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 25 / 29

Page 26: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Deploying ElasticSearch, Kibana

Download and uncompress ElasticSearch, from theirwebsite

$ cd elasticsearch-1.7.1/

# [Configure, if needed]

$ bin/elasticsearch

Download and uncompress Kibana, from their website

$ cd kibana-4.1.1-linux-x64

# [Configure, if needed]

$ bin/kibana

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 26 / 29

Page 27: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Get a GitHub token

Your photo — SettingsPersonal access tokensGenerate new token

Take note of it, or you won’t see it again!

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 27 / 29

Page 28: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Bonus track

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 28 / 29

Page 29: Learning about software development with Kibana dashboards · Learning about software development with Kibana dashboards Jesus M. Gonzalez-Barahona jgb@bitergia.com @jgbarah Bitergia

Preview: our new Kibana-based dashboards

http://s.bitergia.com/db-fosdem16

Jesus Gonzalez-Barahona (Bitergia) GrimoireLab: What’s Next? Jan 2016 29 / 29