Project

General

Profile

Revision 0f317fa6

ID0f317fa6b89f7bcd8ddf64f4d43bcc50bfe0933f
Parent e0593934
Child a6ff3867

Added by Aurelien BOMPARD about 14 years ago

Packaging

git-svn-id: https://vigilo-dev.si.c-s.fr/svn@2882 b22e2e97-25c9-44ff-b637-2e5ceca36478

View differences:

Makefile
1 1
NAME := vigigraph
2 2

  
3
all: build
3
all: qooxdoo build
4 4

  
5 5
qooxdoo:
6 6
	make -C javascript build
......
12 12
	$(RM) -r vigigraph/public/resource
13 13
	$(RM) -r javascript/build/
14 14

  
15
install: qooxdoo
16
	$(PYTHON) setup.py install --single-version-externally-managed --root=$(DESTDIR) --record=INSTALLED_FILES
17
	mkdir -p $(DESTDIR)$(HTTPD_DIR)
18
	ln -f -s $(SYSCONFDIR)/vigilo/$(NAME)/$(NAME).conf $(DESTDIR)$(HTTPD_DIR)/
19
	echo $(HTTPD_DIR)/$(NAME).conf >> INSTALLED_FILES
20

  
15 21
include buildenv/Makefile.common
16 22

  
17 23
MODULE := $(NAME)
deployment/settings.ini
1
#
2
# vigigraph - Pylons development environment configuration
3
#
4
# The %(here)s variable will be replaced with the parent directory of this file
5
#
6
# This file is for deployment specific config options -- other configuration
7
# that is always required for the app is done in the config directory, 
8
# and generally should not be modified by end users. 
9

  
10
[DEFAULT]
11
debug = false
12
# Uncomment and replace with the address which should receive any error reports
13
#email_to = you@yourdomain.com
14
smtp_server = localhost
15
error_email_from = paste@localhost
16

  
17
[server:main]
18
use = egg:Paste#http
19
host = 0.0.0.0 
20
port = 80
21

  
22
[app:main]
23
use = egg:vigigraph
24

  
25
db_basename=vigilo_
26
;db_basename=
27
password_hashing_function=md5
28
lang=fr
29
use_kerberos=False
30

  
31
; Emplacement des applications (rrdgraph, Nagios, ...)
32
; sur les serveurs distants.
33
app_path.rrdgraph = /vigilo/rrdgraph/
34
app_path.nagios = /nagios/
35

  
36
; Schéma ("protocol") à utiliser pour se connecter
37
; à l'application. En général : http ou https.
38
; Par défaut : http
39
app_scheme.rrdgraph = http
40
app_scheme.nagios = http
41

  
42
; Port de connexion au serveur distant hébergeant
43
; l'application.
44
; Par défaut : 80
45
app_port.rrdgraph = 80
46
app_port.nagios = 80
47

  
48
# Vigigraph - refresh for graphs (en millisecondes)
49
delay_refresh = 30000
50

  
51
full_stack = true
52
cache_dir = /tmp/vigilo/vigigraph/data
53
beaker.session.key = vigigraph
54
beaker.session.secret = vigilo
55
sa_auth.cookie_secret = vigilo
56

  
57
# If you'd like to fine-tune the individual locations of the cache data dirs
58
# for the Cache data, or the Session saves, un-comment the desired settings
59
# here:
60
#beaker.cache.data_dir = %(here)s/data/cache
61
#beaker.session.data_dir = %(here)s/data/sessions
62

  
63
# pick the form for your database
64
# %(here) may include a ':' character on Windows environments; this can
65
# invalidate the URI when specifying a SQLite db via path name
66
# sqlalchemy.url=postgres://username:password@hostname:port/databasename 
67
# sqlalchemy.url=mysql://username:password@hostname:port/databasename
68

  
69
sqlalchemy.url=postgres://vigilo:vigilo@localhost/vigilo
70

  
71
#echo shouldn't be used together with the logging module.
72
sqlalchemy.echo = false
73
sqlalchemy.echo_pool = false
74
sqlalchemy.pool_recycle = 3600
75

  
76
# if you are using Mako and want to be able to reload
77
# the mako template from disk during the development phase
78
# you should say 'true' here
79
# This option is only used for mako templating engine
80
# WARNING: if you want to deploy your application using a zipped egg
81
# (ie: if your application's setup.py defines zip-safe=True, then you
82
# MUST put "false" for the production environment because there will
83
# be no disk and real files to compare time with.
84
# On the contrary if your application defines zip-safe=False and is
85
# deployed in an unzipped manner, then you can leave this option to true
86
templating.mako.reloadfromdisk = true
87

  
88
# the compiled template dir is a directory that must be readable by your
89
# webserver. It will be used to store the resulting templates once compiled
90
# by the TemplateLookup system.
91
# During development you generally don't need this option since paste's HTTP
92
# server will have access to you development directories, but in production
93
# you'll most certainly want to have apache or nginx to write in a directory
94
# that does not contain any source code in any form for obvious security reasons.
95
#
96
#templating.mako.compiled_templates_dir = /some/dir/where/webserver/has/access
97

  
98
# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
99
# Debug mode will enable the interactive debugging tool, allowing ANYONE to
100
# execute malicious code after an exception is raised.
101
set debug = false
102

  
103
# Logging configuration
104
# Add additional loggers, handlers, formatters here
105
# Uses python's logging config file format
106
# http://docs.python.org/lib/logging-config-fileformat.html
107

  
108
[loggers]
109
keys = root, vigigraph, sqlalchemy, auth
110

  
111
[handlers]
112
keys = console,sql_log,root_log,vigigraph_log,auth_log
113

  
114
[formatters]
115
keys = generic
116

  
117
; If you create additional loggers, add them as a key to [loggers]
118
[logger_root]
119
level = DEBUG
120
handlers = root_log
121

  
122
[logger_vigigraph]
123
level = DEBUG
124
handlers = vigigraph_log
125
qualname = vigigraph
126

  
127
[logger_sqlalchemy]
128
level = DEBUG
129
handlers = sql_log
130
qualname = sqlalchemy.engine
131

  
132
; A logger for authentication, identification and authorization -- this is
133
; repoze.who and repoze.what:
134
[logger_auth]
135
level = DEBUG
136
handlers = auth_log
137
qualname = auth
138

  
139
; If you create additional handlers, add them as a key to [handlers]
140
[handler_console]
141
class = StreamHandler
142
args = (sys.stderr,)
143
level = NOTSET
144
formatter = generic
145

  
146
[handler_sql_log]
147
class = FileHandler
148
args = ('log/sql.log','a')
149
level = DEBUG
150
formatter = generic
151

  
152
[handler_root_log]
153
class = FileHandler
154
args = ('log/root.log','a')
155
level = DEBUG
156
formatter = generic
157

  
158
[handler_vigigraph_log]
159
class = FileHandler
160
args = ('log/vigigraph.log','a')
161
level = DEBUG
162
formatter = generic
163

  
164
[handler_auth_log]
165
class = FileHandler
166
args = ('log/auth.log','a')
167
level = DEBUG
168
formatter = generic
169

  
170
; If you create additional formatters, add them as a key to [formatters]
171
[formatter_generic]
172
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
173
datefmt = %H:%M:%S
174

  
deployment/vigigraph.conf
1
<IfModule mod_wsgi.c>
2

  
3
WSGIRestrictStdout off
4
WSGIPassAuthorization on
5
WSGIDaemonProcess vigigraph user=apache group=apache threads=2
6
WSGIScriptAlias /vigilo/vigigraph "/etc/vigilo/vigigraph/vigigraph.wsgi"
7

  
8
KeepAlive Off
9

  
10
<Directory "/etc/vigilo/vigigraph/">
11
    <Files "vigigraph.wsgi">
12
        WSGIProcessGroup vigigraph
13
        WSGIApplicationGroup %{GLOBAL}
14

  
15
        Order deny,allow
16
        Allow from all
17
    </Files>
18
</Directory>
19

  
20
</IfModule>
21

  
deployment/vigigraph.wsgi
1
# -*- coding: utf-8 -*-
2
# vim: set fileencoding=utf-8 sw=4 ts=4 et ft=python :
3

  
4
#import os, sys
5
#from pkg_resources import get_distribution
6

  
7
#egg_file = get_distribution('vigiboard').egg_info
8

  
9
#os.environ['PYTHON_EGG_CACHE'] = '/tmp/vigiboard/python-eggs'
10

  
11
#from paste.script.util.logging_config import fileConfig
12
#fileConfig(basedir + ini_file)
13

  
14
import os.path
15
ini_file = '/etc/vigilo/vigigraph/settings.ini'
16
ini_file = os.path.join('/', *ini_file.split('/'))
17

  
18
from paste.deploy import loadapp
19
application = loadapp('config:%s' % ini_file)
20

  
pkg/vigigraph.mdv.spec
31 31

  
32 32
%prep
33 33
%setup -q -n %{module}
34
cd javascript
35
wget http://downloads.sourceforge.net/project/qooxdoo/qooxdoo-legacy/0.7.3/qooxdoo-0.7.3-sdk.tar.gz
36
tar -xzf qooxdoo-0.7.3-sdk.tar.gz
37
cd ..
38
patch -p0 < patches/001_qooxdoo_getBoxObjectFor.diff
34 39

  
35 40
%build
36 41
make PYTHON=%{_bindir}/python SYSCONFDIR=%{_sysconfdir}
setup.py
7 7
    use_setuptools()
8 8
    from setuptools import setup, find_packages
9 9

  
10
sysconfdir = os.getenv("SYSCONFDIR", "/etc")
11

  
10 12
tests_require = [
11 13
    'WebTest',
12 14
    'BeautifulSoup',
......
66 68
    [console_scripts]
67 69
    vigigraph-init-db = vigigraph.websetup:init_db
68 70
    """,
71
    data_files=[
72
        (os.path.join(sysconfdir, 'vigilo/vigimap/'), [
73
            'deployment/vigimap.conf',
74
            'deployment/vigimap.wsgi',
75
            'deployment/settings.ini',
76
        ]),
77
    ],
69 78
)

Also available in: Unified diff