aboutsummaryrefslogtreecommitdiffstats
This is BKM for YOCTO PACKAGE REPORT SYSTEM set up process on Server.

I have test it on the Ubuntu 9.10 i386.
The below list is what we need before set up Package Report System: 
Packages	Version
sqlite3		>=3.6.16
python		>=2.6.4
python-webpy	>=0.32
mod_wsgi	>=3.3
Mutt		>=1.5.20
Apache2		>=2.2
python-matplotlib >=0.99.0
python-matplotlib-data >=0.99.0


1.Put the Yocto Package Report System source code under /var/www/webpy-app/
    This directory is for webpy applications, we can put various webpy applications under this directory. 

2.Download and install mod_wsgi from its website: http://code.google.com/p/modwsgi/. It will install a '.so' module in Apache module directory

3.Use auto-install tool like apt or yum to install python-matplotlib and python-matplotlib-data. It will supply API for generate a chart.

4.Configure Apache to load mod_wsgi module and this project in /etc/apache2/sites-available/default as below:
    Firstly, set the port 80 for Package Report System in sites-available/default like this <VirtualHost *:80>, and then add below config:

    WSGIScriptAlias / /var/www/webpy-app/yocto-web/newserver/webserver/index.py/
    Alias /images /var/www/webpy-app/yocto-web/newserver/webserver/images/
    AddType text/html .py
    <Directory /var/www/webpy-app/yocto-web/newserver/webserver/>
          Order deny,allow
          Allow from all
    </Directory>

    If the apache server can't find the module wsgi, you can add below config in /etc/apache2/sites-available/default:

    LoadModule wsgi_module /usr/local/apache2/modules/mod_wsgi.so

5.Configure Apache to listen port 80.
    Add the below config to /etc/apache2/ports.conf

    NameVirtualHost *:80
    Listen 80
 
    Restart apache server after change the config. 	
    Then you can check the result through http://localhost/

6. Set the account for Report System in Mutt.
    Open the /etc/Muttrc, add the account information at the bottom like this:
    set realname="Package Report System"
    set from="ReportSystem@intel.com"
    set use_from=yes

7. Use the service "cron" to run script daily. 
    Use the command "crontab -e" to edit the frequence, e.g. 

    00 04 * * * /var/www/webpy-app/yocto-web/getallpkginfo.bash dailycheck>/dev/null 2>&1
    This means the script getallpkginfo.bash will be executed at 4:00 everyday, and will only check the local version change.

    00 07 * * 1 /var/www/webpy-app/yocto-web/getallpkginfo.bash weeklycheck lei.mei@intel.com drawchart>/dev/null 2>&1
    This means the script getallpkginfo.bash will be executed at 7:00 every Monday morning, will check upstream version change and send the report to lei.mei@intel.com, and the drawchart function will be enable. 

    Remember to restart the cron after re-configure it.
    

That's all for Packages Report System set up process.
Any problem, please contact Mei Lei<lei.mei@intel.com>