Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
66ea78f0
Commit
66ea78f0
authored
May 01, 2012
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'erp5' into erp5-librsvg
parents
cb6b534c
3679ef5f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
11 deletions
+16
-11
component/git/buildout.cfg
component/git/buildout.cfg
+2
-2
slapos/recipe/README.generic_varnish.txt
slapos/recipe/README.generic_varnish.txt
+4
-0
slapos/recipe/apache_zope_backend/__init__.py
slapos/recipe/apache_zope_backend/__init__.py
+1
-1
slapos/recipe/generic_varnish/__init__.py
slapos/recipe/generic_varnish/__init__.py
+4
-5
slapos/recipe/generic_varnish/template/varnishlog.in
slapos/recipe/generic_varnish/template/varnishlog.in
+1
-2
slapos/recipe/web_checker/__init__.py
slapos/recipe/web_checker/__init__.py
+4
-1
No files found.
component/git/buildout.cfg
View file @
66ea78f0
...
@@ -13,8 +13,8 @@ parts =
...
@@ -13,8 +13,8 @@ parts =
[git]
[git]
recipe = hexagonit.recipe.cmmi
recipe = hexagonit.recipe.cmmi
url = http://git-core.googlecode.com/files/git-1.7.
8.4
.tar.gz
url = http://git-core.googlecode.com/files/git-1.7.
10
.tar.gz
md5sum =
e6c3319d76d52a830af395046fc56143
md5sum =
ab2716db51580037c7ebda4c8e9d56eb
configure-options =
configure-options =
--with-curl=${curl:location}
--with-curl=${curl:location}
--with-openssl=${openssl:location}
--with-openssl=${openssl:location}
...
...
slapos/recipe/README.generic_varnish.txt
View file @
66ea78f0
...
@@ -13,6 +13,7 @@ instance = request(
...
@@ -13,6 +13,7 @@ instance = request(
software_type='varnish',
software_type='varnish',
partition_parameter_kw={
partition_parameter_kw={
'tidstorage-url':'http://[your tidstrage address]:your tid strage port',
'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-mail-address':'web-checker-result@example.com',
'web-checker-smtp-host':'mail.example.com',
'web-checker-smtp-host':'mail.example.com',
}
}
...
@@ -21,6 +22,9 @@ instance = request(
...
@@ -21,6 +22,9 @@ instance = request(
tidstrage-url is the backend url that varnish will cache. It is expected that
tidstrage-url is the backend url that varnish will cache. It is expected that
the backend is created by tidstorage recipe.
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
web-checker-mail-address is the email address where web checker will send
the HTTP Cache cheking result.
the HTTP Cache cheking result.
...
...
slapos/recipe/apache_zope_backend/__init__.py
View file @
66ea78f0
...
@@ -70,7 +70,7 @@ class Recipe(GenericBaseRecipe):
...
@@ -70,7 +70,7 @@ class Recipe(GenericBaseRecipe):
apache_conf
[
'server_name'
]
=
'%s'
%
apache_conf
[
'ip'
]
apache_conf
[
'server_name'
]
=
'%s'
%
apache_conf
[
'ip'
]
apache_conf
[
'path'
]
=
'/'
apache_conf
[
'path'
]
=
'/'
apache_conf
[
'access_control_string'
]
=
access_control_string
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'
,
'/'
))
self
.
options
.
get
(
'backend-path'
,
'/'
))
apache_conf_string
=
pkg_resources
.
resource_string
(
__name__
,
apache_conf_string
=
pkg_resources
.
resource_string
(
__name__
,
'template/apache.zope.conf.in'
)
%
apache_conf
'template/apache.zope.conf.in'
)
%
apache_conf
...
...
slapos/recipe/generic_varnish/__init__.py
View file @
66ea78f0
...
@@ -38,7 +38,7 @@ class Recipe(GenericSlapRecipe):
...
@@ -38,7 +38,7 @@ class Recipe(GenericSlapRecipe):
def
_install
(
self
):
def
_install
(
self
):
ip
=
self
.
options
[
'ip'
]
ip
=
self
.
options
[
'ip'
]
backend_url
=
self
.
parameter_dict
[
'tidstorage-url'
]
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_manager_port
=
int
(
self
.
options
[
'manager-port'
])
varnishd_server_port
=
int
(
self
.
options
[
'server-port'
])
varnishd_server_port
=
int
(
self
.
options
[
'server-port'
])
path_list
=
[]
path_list
=
[]
...
@@ -53,9 +53,8 @@ class Recipe(GenericSlapRecipe):
...
@@ -53,9 +53,8 @@ class Recipe(GenericSlapRecipe):
varnish_data
=
self
.
options
[
'varnish-data'
],
varnish_data
=
self
.
options
[
'varnish-data'
],
shell_path
=
self
.
options
[
'shell-path'
],
shell_path
=
self
.
options
[
'shell-path'
],
vcl_file
=
self
.
options
[
'vcl-file'
],
vcl_file
=
self
.
options
[
'vcl-file'
],
backend_ip
=
backend_ip
,
backend_port
=
backend_port
,
backend_port
=
backend_port
,
backend_server
=
backend_server
,
backend_server
=
"[%s]"
%
backend_ip
,
)
)
path_list
.
append
(
self
.
createExecutable
(
self
.
options
[
'varnishd-wrapper'
],
path_list
.
append
(
self
.
createExecutable
(
self
.
options
[
'varnishd-wrapper'
],
...
@@ -70,7 +69,7 @@ class Recipe(GenericSlapRecipe):
...
@@ -70,7 +69,7 @@ class Recipe(GenericSlapRecipe):
return
path_list
return
path_list
def
_getBackendServer
(
self
,
url
):
def
_getBackendServer
(
self
,
url
):
r
=
re
.
compile
(
'
\
/
\
/
\
[(.*)
\
]
:(
\
d*)
'
)
r
=
re
.
compile
(
'
\
/
\
/
(
\
[.+
\
]|[
\
d.]+)
:(
\
d*)'
)
result
=
r
.
search
(
url
)
result
=
r
.
search
(
url
)
ip
=
result
.
groups
()[
0
]
ip
=
result
.
groups
()[
0
]
port
=
result
.
groups
()[
1
]
port
=
result
.
groups
()[
1
]
...
...
slapos/recipe/generic_varnish/template/varnishlog.in
View file @
66ea78f0
#!%(shell_path)s
#!%(shell_path)s
DAEMON_OPTS="-a %(varnish_ip)s:%(varnishd_server_port)s \
DAEMON_OPTS="-a -n %(varnish_instance_name)s"
-n %(varnish_instance_name)s"
exec %(varnishlog_binary)s ${DAEMON_OPTS} "$@"
exec %(varnishlog_binary)s ${DAEMON_OPTS} "$@"
slapos/recipe/web_checker/__init__.py
View file @
66ea78f0
...
@@ -36,13 +36,16 @@ class Recipe(GenericSlapRecipe):
...
@@ -36,13 +36,16 @@ class Recipe(GenericSlapRecipe):
path_list
=
[]
path_list
=
[]
web_checker_mail_address
=
self
.
parameter_dict
[
'web-checker-mail-address'
]
web_checker_mail_address
=
self
.
parameter_dict
[
'web-checker-mail-address'
]
web_checker_smtp_host
=
self
.
parameter_dict
[
'web-checker-smtp-host'
]
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
=
\
web_checker_working_directory
=
\
self
.
options
[
'web-checker-working-directory'
]
self
.
options
[
'web-checker-working-directory'
]
config
=
dict
(
config
=
dict
(
web_checker_mail_address
=
web_checker_mail_address
,
web_checker_mail_address
=
web_checker_mail_address
,
web_checker_smtp_host
=
web_checker_smtp_host
,
web_checker_smtp_host
=
web_checker_smtp_host
,
web_checker_working_directory
=
web_checker_working_directory
,
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'
],
wget_binary_path
=
self
.
options
[
'wget-binary-path'
],
varnishlog_binary_path
=
self
.
options
[
'varnishlog-binary-path'
],
varnishlog_binary_path
=
self
.
options
[
'varnishlog-binary-path'
],
web_checker_log
=
self
.
options
[
'web-checker-log'
],
web_checker_log
=
self
.
options
[
'web-checker-log'
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment