Commit 66ea78f0 authored by Rafael Monnerat's avatar Rafael Monnerat

Merge branch 'erp5' into erp5-librsvg

parents cb6b534c 3679ef5f
......@@ -13,8 +13,8 @@ parts =
[git]
recipe = hexagonit.recipe.cmmi
url = http://git-core.googlecode.com/files/git-1.7.8.4.tar.gz
md5sum = e6c3319d76d52a830af395046fc56143
url = http://git-core.googlecode.com/files/git-1.7.10.tar.gz
md5sum = ab2716db51580037c7ebda4c8e9d56eb
configure-options =
--with-curl=${curl:location}
--with-openssl=${openssl:location}
......
......@@ -13,6 +13,7 @@ instance = request(
software_type='varnish',
partition_parameter_kw={
'tidstorage-url':'http://[your tidstrage address]:your tid strage port',
'web-checker-frontend-url':'http://www.example.com',
'web-checker-mail-address':'web-checker-result@example.com',
'web-checker-smtp-host':'mail.example.com',
}
......@@ -21,6 +22,9 @@ instance = request(
tidstrage-url is the backend url that varnish will cache. It is expected that
the backend is created by tidstorage recipe.
web-checker-frontend-url is the entry-point-url that web checker will check
the HTTP headers of all the pages in the web site.
web-checker-mail-address is the email address where web checker will send
the HTTP Cache cheking result.
......
......@@ -70,7 +70,7 @@ class Recipe(GenericBaseRecipe):
apache_conf['server_name'] = '%s' % apache_conf['ip']
apache_conf['path'] = '/'
apache_conf['access_control_string'] = access_control_string
apache_conf['rewrite_rule'] = "RewriteRule (.*) %s%s [L,P]" % (backend,
apache_conf['rewrite_rule'] = "RewriteRule (.*) %s%s$1 [L,P]" % (backend,
self.options.get('backend-path', '/'))
apache_conf_string = pkg_resources.resource_string(__name__,
'template/apache.zope.conf.in') % apache_conf
......
......@@ -38,7 +38,7 @@ class Recipe(GenericSlapRecipe):
def _install(self):
ip = self.options['ip']
backend_url = self.parameter_dict['tidstorage-url']
backend_ip, backend_port = self._getBackendServer(backend_url)
backend_server, backend_port = self._getBackendServer(backend_url)
varnishd_manager_port = int(self.options['manager-port'])
varnishd_server_port = int(self.options['server-port'])
path_list = []
......@@ -53,9 +53,8 @@ class Recipe(GenericSlapRecipe):
varnish_data=self.options['varnish-data'],
shell_path=self.options['shell-path'],
vcl_file=self.options['vcl-file'],
backend_ip = backend_ip,
backend_port = backend_port,
backend_server = "[%s]" % backend_ip,
backend_port=backend_port,
backend_server=backend_server,
)
path_list.append(self.createExecutable(self.options['varnishd-wrapper'],
......@@ -70,7 +69,7 @@ class Recipe(GenericSlapRecipe):
return path_list
def _getBackendServer(self, url):
r = re.compile('\/\/\[(.*)\]:(\d*)')
r = re.compile('\/\/(\[.+\]|[\d.]+):(\d*)')
result = r.search(url)
ip = result.groups()[0]
port = result.groups()[1]
......
#!%(shell_path)s
DAEMON_OPTS="-a %(varnish_ip)s:%(varnishd_server_port)s \
-n %(varnish_instance_name)s"
DAEMON_OPTS="-a -n %(varnish_instance_name)s"
exec %(varnishlog_binary)s ${DAEMON_OPTS} "$@"
......@@ -36,13 +36,16 @@ class Recipe(GenericSlapRecipe):
path_list = []
web_checker_mail_address = self.parameter_dict['web-checker-mail-address']
web_checker_smtp_host = self.parameter_dict['web-checker-smtp-host']
web_checker_frontend_url = self.parameter_dict.get(
'web-checker-frontend-url',
self.options['frontend-url'])
web_checker_working_directory = \
self.options['web-checker-working-directory']
config = dict(
web_checker_mail_address = web_checker_mail_address,
web_checker_smtp_host = web_checker_smtp_host,
web_checker_working_directory = web_checker_working_directory,
frontend_url = self.options['frontend-url'],
frontend_url = web_checker_frontend_url,
wget_binary_path = self.options['wget-binary-path'],
varnishlog_binary_path = self.options['varnishlog-binary-path'],
web_checker_log = self.options['web-checker-log'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment