blob: 7bd3c52035d2f1144cdb60ce1d8a76366c2cc7cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
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>
|