-
Notifications
You must be signed in to change notification settings - Fork 0
Weekly Report for GSoC 2020 FOSSology Fossdash
Darshan Kansagara edited this page Aug 29, 2020
·
1 revision
- Clone fossology repo and set up to run it locally
- Understand the terminology used by the fossology project by going through the documentation. Read wiki page about the fossology
- Understanding more on Prometheus and influxdb real-time data source and Grafana.
- Created two demo architecture for dashboard
- Using Prometheus as a data source ( Pull based architecture )
- Using influxdb as a data source ( Push based architecture )
- Created dashboard for each to showcase as POC of our idea.
- Created document for basic terminology of Prometheus and grafana for the beginners Link .
- Link to commit: https://github.com/darshank15/GSoC_2020_FOSSOlogy/commit/121695cc6569b9f0a042d6b88f8bd8fc287633a7
- Discuss with mentor about project and its goals and understand it more clearly.
- Understanding bash script as it was used much more in many scripts in fossology.
- Look into some docker command and learn docker-compose
- Take look into fossology branch for fossdash
dev/fossdash-exporter
- Run it locally to see data generated by the python script file “fossdash-publish.py”
- Solve issue by modifying the above python file
- Link to Issue: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/1
Initially python script generatting data in below formate :
agents_count.copyright,instance=c7fe15ee-5c9c-4687-91d8-b1ba840e6b00 value=1 1591286501000000000
agents_count.ecc,instance=c7fe15ee-5c9c-4687-91d8-b1ba840e6b00 value=1 1591286501000000000
We want to modify python script to get data as below to get new tag_set for type of agent_count
agents_count,instance=c7fe15ee-5c9c-4687-91d8-b1ba840e6b00,type=copyright value=1 1591246503000000000
agents_count,instance=c7fe15ee-5c9c-4687-91d8-b1ba840e6b00,type=ecc value=1 1591246503000000000
So we can do groupby based on INSTANCE as well as based on TYPE.
- Made a simple dashboard for the above newly generated data for the showcase.
- Look into an issue for configuring fossdash to work on both Docker containers as well as in source code.
- the issue is here: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/2
- Look into Makefile for configuration
- Changed the code in
common-sysconfig.php
to get an input box in UI to configure FossDash URL and store it into the database table sysconfig. - Wrote script
run_me.py
which will trigger to read updated data from the database and modify fossdash.conf file. - I also started working on code to include VERSION info into the influx DB.
- The issue is here: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/3
- Currently fetched all versions and build info from the VERSION file. But later on, we can get this data from the database table.
- Continue on the Configuration of fossdash.
- Continue on including VERSION and build info into influxDB.
- Created charts Panel for it into the grafana.
- Link to new commits: https://github.com/darshank15/fossology/commit/9d741682df78aa728e704a91af2a1a772eeac1f7
- New Dashboard Looks like as: https://github.com/darshank15/GSoC_2020_FOSSOlogy/blob/master/dashboard-images/2_dashboard_images_18_June_2020.png
- Started wiki page Link to Wiki for work done till now.
- Included introduction, architecture, and codebase details of fossdash.
- Included weekly report details.
- Currently, we have two scripts are
fossdash-publish.py
(Python script) andfossdash-publish.run
(bash script), alsofossdash.conf
file. - We can merge these two scripts into a single script, Which is easy to maintain and execute for fossdash.
- converted and rewritten the bash script code of fossdash-publish.run into python file - fossdash-publish.py
- segregated the VERSION content into three different parts: version, total commit since the last release, latest commit.
- Link to Issue: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/5
- Link to commit: https://github.com/Orange-OpenSource/fossology/pull/1/commits/7226d27becd544d083d1a5d1feeaa0f3a088ae92
- New Dashboard looks as follows.https://github.com/darshank15/GSoC_2020_FOSSOlogy/blob/master/dashboard-images/3_dashboard_images_26_June_2020.png
- Rename UUID on a Fossology instance
- Link to Issue: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/6
- Done with the first GSoC evalution.
- Task-1 Cleaning old fossdash reported files.
- As of now we generating all reported files posts send the data to the influxDB. As the fossdash script may be running every day, the Amount of all reported files in local space will be larger and more disk consumption over the period of time.
- Implemented this functionality using
find
command (ctime, maxDepth) to get and delete older reported file to save the disk space.
- Task-2 Cron job configuration to schedule an interval for the fossdash script file.
- From configuration, the user can change the corn job schedule interval for fossdash.
- Done using
crontab
command to update cronjob interval.
- Task-3 Implemented Enable/Disable button to control the functionality of the fossdash.
- Link to Issue: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/7
- Fixed the issue: Wrong permissions for fossdash folder
- Fixed the issue: Enabling Fossdash overrides existing CRON Setting
- Fixed the issue: Change metrics data filename to include a timestamp
- As of now, When we changed Instance_name then scripts will fetch only old reported files and replaces the old name with a new name. Now I have included the code to fetches all unreported files as well and replace fossology instance name into them.
- Removed static path to run fossdash script from PHP code. Using GLOBALS variable : $GLOBALS['SysConf']['DIRECTORIES']['LIBEXECDIR'];
- On DISABLE the fossdash, we are doing grep to get fossdash cron entry and remove that single entry rather than doing
crontab -r
- Added influxDB authentication by admin username and password.
- Link to Issue: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/12
- part1: Enable authentication in InfluxDB. ==> Commit : Orange-OpenSource/fossdash@beff4fc
- part2: In the publisher script, Added authentication header to authenticate the sending data request. ==> Commit : Orange-OpenSource/fossology@3b28e4a
- Create generic Instance-oriented dashboard
- Link to Issue: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/14
- Added an INSTANCE type in every metric field. So that we can perform filtering based on Instance ID.
- Created Instance specific Dashboard.
- Added token-based authentication in an influxDB.
- Token(JWT token) generated using shared secrete key + username + expiration time.
- Link to Commit: https://github.com/Orange-OpenSource/fossology/commit/0f81a157edcab002c99f5e0206fd8d4496ed8784
- We can't overwrite same user with a different password. An added feature when the only password changed and username remain same.
- Created instance-specific dashboard , We can get a dropdown menu to select the particular instance.
- Added an INSTANCE type in every metric field. So that we can perform filtering based on Instance ID.
- Created Instance specific Dashboard.
- See the image here: https://github.com/darshank15/GSoC_2020_FOSSOlogy/blob/master/dashboard-images/4_instance_specific_dashboard_images_21_July_2020.png
- Adding error msg when Entering wrong input value.
- Link to Issue: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/15
- Added drop-down for Two different kinds of authentication on InfluxDB, Show/Hide below Auth fields accordingly.
- Link to Issue: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/20
- Earlier Some cron configuration is ignored. Corrected the Cron Validation.
- Updated Wiki page about how to get started with fossdash.
- refactor code to convert fossdash script from python2 to python3.
- fixed a small bug, on page-reload, showHide is not working.
- Rebase and resolve merge conflict to get the latest changes from the master branch.
- Wrote script for local installation of grafana and influxdb.
- Link to Issue: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/18
- Refactoring the fossdash_publisher script, to remove query metrics from code and put it into the configuration way.
- Created a new UI Menu page for fossdash.
src/lib/php/fossdash-config.php
src/www/ui/admin-fossdash-config.php
- Link to commit: https://github.com/fossology/fossology/pull/1769/commits/941ebbca601b7d906f24028bd319fdef462e58ab
- Created fossdash dependency installation script.
- Fossdash metric configuration: If you don't provide any custom metric config, used default metric config file store in the fossology config folder.
/usr/local/etc/fossology/fossdash_metrics.yml
- Link to commit: https://github.com/fossology/fossology/pull/1769/commits/8584eac78d063aa54de531b1a38211ac09924c38
- Update find command in for reported file cleaning fossdash publisher script.
- When entering the cleaning interval=0, Then delete all the reported file, No archive.
- Link to Issue: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/21
- fix(dashboard): removed version info from the generic dashboard
- Removed version and build related information from the generic dashboard.
- Bugfix(Showing version data into all the field) of Instance specific dashboard.
- Link to PR: https://github.com/Orange-OpenSource/fossdash/pull/3
- Changed License information for the file created by me.
- Fossdash Config Page
- Made IMP words of description highlighted using italic and bold HTML.
- Link to commit: https://github.com/fossology/fossology/pull/1769/commits/0e37b7e92328ea3a399d775183dcf43e7f9949fb
- Removed(bootstrap file): removed bootstrap min js and it's related references.
- So you guys can do testing easily.
- All bootstrap classes are remains as it is in PHP file. Hence when you add a bootstrap file in the future, our Page again got better UI.
- Link to commit: https://github.com/fossology/fossology/pull/1769/commits/75fa9f1c40ef31ec10edad044535645051a8a04f
- feat(log counter): Maintain and push log counter into influxDB
- Link to Issue: https://github.com/fossology/fossology/issues/1786
- Include code to maintain a counter for ERROR, FATAL, and WARNING of fossology.
- Fetch these data from our fossdash publisher script and push it into influxDB.
- Creates these counter Stats charts on the grafana dashboard.
- CRON health check can be improved
- Link to Issue: https://github.com/darshank15/GSoC_2020_FOSSOlogy/issues/22
- Update source installation script for Grafana and influxDB.
- Writing setup and user documentation for fossdash