public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Corentin Chary <corentin.chary@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] euscan proof of concept (like debian's uscan)
Date: Mon, 19 Sep 2011 10:39:11 +0200	[thread overview]
Message-ID: <CAHR064h_B6WB9o7aCtZwObq5AwW1YUbY-MH8eb8W9WsbWi1eKA@mail.gmail.com> (raw)
In-Reply-To: <CAKmKYaAknQL34-sa1qPeaHDv_cbGYPsOEp7JamKin+LH_Dv8PA@mail.gmail.com>

On Mon, Sep 19, 2011 at 9:35 AM, Dirkjan Ochtman <djc@gentoo.org> wrote:
> On Mon, Sep 19, 2011 at 00:27, "Paweł Hajdan, Jr."
> <phajdan.jr@gentoo.org> wrote:
>> Okay, I think this is pretty cool and we should find it a new home in
>> the Gentoo infrastructure.
>>
>> I was thinking about http://qa-reports.gentoo.org/ with the repo at
>> http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=summary
>>
>> I can act as a proxy committer and reviewer for that code. Could you
>> break it up into some smaller parts (preferably backend first) and send
>> to me for review (if you're interested)?
>>
>> How long does it take to generate the reports?
>
> +1 I think it would be good to run this on Gentoo infra, and I
> wouldn't mind helping out.
>
> Bikeshedding: not sure "reports" is the best name for this, as reports
> implies something more static?

Here is how it works, each week I launch this script on lt server.
I've got ~30 trees installed with layman. The server is an AMD X2
4600+ with 4GB of RAM and two 80GB HD in raid1 using ext4. My network
bandwidth is 20Mbps down 1Mbps up.

#!/bin/sh

## Setup some vars to use local portage tree
export PATH=${HOME}/euscan/bin:${PATH}
export PYTHONPATH=${HOME}/euscan/pym:${PYTHONPATH}
export PORTAGE_CONFIGROOT=${HOME}/local
export ROOT=${HOME}/local
export EIX_CACHEFILE=${HOME}/local/var/cache/eix

## Go to euscanwww dir
cd ${HOME}/euscan/euscanwww/

## Update local trees
## Bottleneck: disk and network bandwidth
## Time: less than 30mn
emerge --sync --root=${ROOT} --config-root=${PORTAGE_CONFIGROOT}
ROOT="/" layman -S --config=${ROOT}/etc/layman/layman.cfg

## Also update eix database, because we use eix internaly
## Bottleneck: disk and cpu
##Time: 30mn ~ 1h
eix-update

## Scan portage (packages, versions)
## Bottleneck: disk and cpu
## Time: < 15mn
## Note: this script uses eix to get a list of packages and versions
python manage.py scan-portage --all --purge-versions --purge-packages

## Scan metadata (herds, maintainers, homepages, ...)
## Bottleneck: disk
## Time: 1h ~ 1h30
## Note: this script uses gentoolkit to fetch metadata
python manage.py scan-metadata --all --progress

## Scan uptsream packages
## Bottleneck: disk, network bandwidth and latency, cpu
## Time: up to 6h
## Note: euscan is called on each package. euscan has a slow startup
caused by gentoolkit/portage.
##          gparallel is used here to limit the load caused by euscan,
and to launch up to 16 euscan instances at a time on this machine
##          this part is the longest, but scale very well
eix --only-names -x | gparallel --load 4 --jobs 800% euscan >>
${HOME}/logs/euscan-upstream.log
python manage.py scan-upstream --feed --purge-versions <
${HOME}/logs/euscan-upstream.log

## Update counters (6)
## Time: some minutes
## Bottleneck: cpu
## Note: this script could probably be implemented faster using raw SQL queries
python manage.py update-counters


> Also not sure how much it has to do
> with QA.
> How much of it constitutes the backend, in your opinion? It seems
> there are two parts, right now:
>
> 1. euscan script, to find new versions for a single package
> 2. the django www app, including storage for the version data

Yes, exactly. Here is how the tree is structured currently:

euscan script

bin/ -- contains the euscan python "binary"
pym/ -- contains most of the code used by the euscan script
pym/euscan/handlers -- contains specific site handlers (rubygems,
pypi, pecl, pear, ..)

euscanwww django app

euscanwww/ -- contains all the stuff for the django application, all
the django application needs is a working portage tree and euscan
available in the $PATH

> IMO it would be nice to have a somewhat generic REST-style service
> exposing the data, and build a simple UI on top of that. In
> particular, I have different ideas about what the UI should look like,
> so it would be nice if different people could experiment (and/or
> integrate in other services like znurt.org).

I already added some very dummy json formating (note that it also
exposes internal key id, which is bad, but I just wanted to
experiment).
All you need is to append "/json" to an url. For example:

- http://euscan.iksaif.net/maintainers/4/json
- http://euscan.iksaif.net/package/app-accessibility/brltty/json

This could be a lot better, we just need to define an API and the
implementation will be easy.


A first step would be to make an ebuild for euscan, and another for
euscanwww so that anyone can easilly install it and play with it.
Feel free to ping me on irc, I'm on #gentoo-sunrise, my nickname is "iksaif".

-- 
Corentin Chary
http://xf.iksaif.net



  reply	other threads:[~2011-09-19  8:40 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTi=LEe+FziC=ong=wym3qi4v9pxxdpEK5wTEz6Dd@mail.gmail.com>
2011-03-21  8:24 ` [gentoo-dev] euscan proof of concept (like debian's uscan) Corentin Chary
2011-03-26 16:35   ` [gentoo-dev] " Christian Faulhammer
2011-03-26 16:41     ` Corentin Chary
2011-09-18 22:27   ` [gentoo-dev] " "Paweł Hajdan, Jr."
2011-09-19  7:35     ` Dirkjan Ochtman
2011-09-19  8:39       ` Corentin Chary [this message]
2011-09-19  8:53         ` Michał Górny
2011-09-19 12:51           ` Corentin Chary
2011-09-23  9:55           ` Corentin Chary
2011-04-03 17:20 ` [gentoo-dev] " Corentin Chary
2011-04-10  8:43   ` Hans de Graaff
2011-04-13  6:47     ` Corentin Chary
2011-04-13 16:23       ` Matthew Summers
2011-04-13 16:58         ` Corentin Chary
2011-04-14  6:49           ` Corentin Chary
2011-04-16  6:29             ` Corentin Chary
2011-04-18  8:26               ` Marijn
2011-04-18  9:05                 ` Corentin Chary
2011-04-18 17:22                   ` Daniel Pielmeier
2011-04-18 19:14                     ` Corentin Chary
2011-04-18 13:32               ` Donnie Berkholz
2011-04-18 13:48                 ` Corentin Chary
2011-04-18 19:02                   ` Corentin Chary
2011-04-18 19:41                   ` Donnie Berkholz
2011-04-18 19:45                   ` Donnie Berkholz
2011-04-19  6:19                     ` Corentin Chary
2011-04-18 21:08               ` Jorge Manuel B. S. Vicetto
2011-04-19  6:53                 ` Corentin Chary
2011-04-19 19:52               ` Tomáš Chvátal
2011-04-20 15:20                 ` Corentin Chary
2011-04-27  8:04                   ` Corentin Chary
2011-04-27 18:02                     ` Tomáš Chvátal
2011-04-28 12:34                       ` Corentin Chary
2011-05-02  7:23                         ` Corentin Chary
2011-05-05 15:54                           ` Corentin Chary
2011-05-06  2:13                             ` Patrick Nagel
2011-08-31 13:41                             ` Corentin Chary
2011-08-31 16:26                               ` Alec Warner
2011-09-01  7:23                               ` Alex Legler
2011-09-01  7:44                                 ` Corentin Chary
2011-09-01  7:49                                   ` Tomáš Chvátal
2011-09-01  7:55                                     ` Corentin Chary
2011-09-01  8:05                                       ` Tomáš Chvátal
2011-09-01 11:47                                         ` Corentin Chary
2011-09-01  8:31                               ` Michał Górny
2011-09-01  9:09                                 ` Corentin Chary
2011-09-01 14:25                               ` Corentin Chary
2011-09-19 19:23                               ` Hans de Graaff
2011-09-20  8:00                                 ` Corentin Chary
2011-09-20 19:04                                   ` Donnie Berkholz
2011-09-21  8:57                                     ` Corentin Chary
2011-09-21 10:58                                       ` Markos Chandras
2011-09-21 12:05                                         ` Corentin Chary
2011-09-25 18:54                                           ` Corentin Chary
2011-09-26 18:42                                   ` Hans de Graaff
2011-09-28  5:41                                     ` Corentin Chary
2011-11-17 13:49                                       ` Corentin Chary
2011-04-19  7:29       ` Dirkjan Ochtman
2011-04-19  9:33         ` Corentin Chary
2011-09-06 18:20   ` Matt Turner
2011-09-07  7:32     ` Corentin Chary
2011-09-07  7:44       ` Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHR064h_B6WB9o7aCtZwObq5AwW1YUbY-MH8eb8W9WsbWi1eKA@mail.gmail.com \
    --to=corentin.chary@gmail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox