Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
iv
slapos
Commits
dd1cfc1a
Commit
dd1cfc1a
authored
13 years ago
by
Rafael Monnerat
👻
Browse files
Options
Download
Email Patches
Plain Diff
Include installVarnishCache
parent
11bf959c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
slapos/recipe/apache/__init__.py
slapos/recipe/apache/__init__.py
+26
-0
No files found.
slapos/recipe/apache/__init__.py
View file @
dd1cfc1a
...
...
@@ -228,6 +228,32 @@ class Recipe(BaseSlapRecipe):
apache_conf
[
'pid_file'
]
+
' SIGUSR1'
)
return
apache_conf
def
installVarnishCache
(
self
,
name
,
ip
,
port
,
control_port
,
backend_host
,
backend_port
,
size
=
"1G"
):
"""
Install a varnish daemon for a certain address
"""
directory
=
self
.
createDataDirectory
(
name
)
varnish_config
=
dict
(
directory
=
directory
,
pid
=
"%s/varnish.pid"
%
directory
,
port
=
"%s:%s"
%
(
ip
,
port
),
control_port
=
"%s:%s"
%
(
ip
,
control_port
),
storage
=
"file,%s/storage.bin,%s"
%
(
directory
,
size
))
config_file
=
self
.
createConfigurationFile
(
"%s.conf"
%
name
,
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'varnish.vcl.in'
,
dict
(
backend_host
=
backend_host
,
backend_port
=
backend_port
))))
varnish_config
[
"configuration_file"
]
=
config_file
self
.
path_list
.
append
(
self
.
createRunningWrapper
(
'varnishd'
,
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'varnishd.in'
),
config
)))
return
varnish_config
def
installStunnel
(
self
,
service_dict
,
ca_certificate
,
key
,
ca_crl
,
ca_path
):
"""Installs stunnel
...
...
This diff is collapsed.
Click to expand it.
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