Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aurel
slapos
Commits
f6cba2aa
Commit
f6cba2aa
authored
Jun 12, 2014
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abilian: moved redis to ipv4
parent
de4541a6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
17 deletions
+42
-17
slapos/recipe/redis/__init__.py
slapos/recipe/redis/__init__.py
+32
-10
slapos/recipe/redis/template/redis.conf.in
slapos/recipe/redis/template/redis.conf.in
+4
-3
software/abilian/extranet_spr/instance-redis.cfg.in
software/abilian/extranet_spr/instance-redis.cfg.in
+2
-0
software/abilian/extranet_spr/instance.cfg.in
software/abilian/extranet_spr/instance.cfg.in
+2
-2
software/abilian/extranet_spr/software.cfg
software/abilian/extranet_spr/software.cfg
+2
-2
No files found.
slapos/recipe/redis/__init__.py
View file @
f6cba2aa
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
##############################################################################
##############################################################################
import
os
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
slapos.recipe.librecipe
import
GenericBaseRecipe
...
@@ -49,15 +48,38 @@ class Recipe(GenericBaseRecipe):
...
@@ -49,15 +48,38 @@ class Recipe(GenericBaseRecipe):
else
:
else
:
requirepass
=
"# requirepass foobared"
requirepass
=
"# requirepass foobared"
if
self
.
options
.
get
(
'ipv6'
):
bind6
=
"bind6 %s"
%
self
.
options
[
'ipv6'
]
else
:
bind6
=
"# bind6 <address>"
if
self
.
options
.
get
(
'ipv4'
):
bind
=
"bind %s"
%
self
.
options
[
'ipv4'
]
else
:
bind
=
"# bind <address>"
if
self
.
options
.
get
(
'port6'
):
port6
=
"port6 %s"
%
self
.
options
[
'port6'
]
else
:
port6
=
"# port6 6379"
if
self
.
options
.
get
(
'port'
):
port
=
"port %s"
%
self
.
options
[
'port'
]
else
:
port
=
"# port 6379"
config_file
=
self
.
options
[
'config_file'
].
strip
()
config_file
=
self
.
options
[
'config_file'
].
strip
()
configuration
=
dict
(
pid_file
=
self
.
options
[
'pid_file'
],
configuration
=
{
port
=
self
.
options
[
'port'
],
'pid_file'
:
self
.
options
[
'pid_file'
],
ipv6
=
self
.
options
[
'ipv6'
],
'bind6'
:
bind6
,
server_dir
=
self
.
options
[
'server_dir'
],
'bind'
:
bind
,
log_file
=
self
.
options
[
'log_file'
],
'port6'
:
port6
,
masterauth
=
masterauth
,
'port'
:
port
,
requirepass
=
requirepass
'server_dir'
:
self
.
options
[
'server_dir'
],
)
'log_file'
:
self
.
options
[
'log_file'
],
'masterauth'
:
masterauth
,
'requirepass'
:
requirepass
}
config
=
self
.
createFile
(
config_file
,
config
=
self
.
createFile
(
config_file
,
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'redis.conf.in'
),
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'redis.conf.in'
),
...
@@ -78,7 +100,7 @@ class Recipe(GenericBaseRecipe):
...
@@ -78,7 +100,7 @@ class Recipe(GenericBaseRecipe):
'%s.promise.main'
%
__name__
,
'%s.promise.main'
%
__name__
,
{
{
'host'
:
self
.
options
[
'ipv6'
],
'host'
:
self
.
options
[
'ipv6'
],
'port'
:
self
.
options
[
'port'
],
'port'
:
self
.
options
[
'port
6
'
],
'requirepass_file'
:
self
.
options
.
get
(
'promise_requirepass_file'
)
'requirepass_file'
:
self
.
options
.
get
(
'promise_requirepass_file'
)
}
}
)
)
...
...
slapos/recipe/redis/template/redis.conf.in
View file @
f6cba2aa
...
@@ -22,15 +22,16 @@ pidfile %(pid_file)s
...
@@ -22,15 +22,16 @@ pidfile %(pid_file)s
# Accept connections on the specified port, default is 6379.
# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
# If port 0 is specified Redis will not listen on a TCP socket.
port6 %(port
)s
%(port6
)s
port 0
%(port)s
# If you want you can bind a single interface, if the bind option is not
# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for incoming connections.
# specified all the interfaces will listen for incoming connections.
# Bind can also be an IPv6 address
# Bind can also be an IPv6 address
# bind 127.0.0.1
# bind 127.0.0.1
# bind ::1
# bind ::1
bind6 %(ipv6)s
%(bind6)s
%(bind)s
# Specify the path for the unix socket that will be used to listen for
# Specify the path for the unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# incoming connections. There is no default, so Redis will not listen
...
...
software/abilian/extranet_spr/instance-redis.cfg.in
View file @
f6cba2aa
...
@@ -15,6 +15,8 @@ bytes = 16
...
@@ -15,6 +15,8 @@ bytes = 16
recipe = slapos.cookbook:redis.server
recipe = slapos.cookbook:redis.server
server_bin = ${redis:location}/bin/redis-server
server_bin = ${redis:location}/bin/redis-server
ipv6 = $${instance-parameters:ipv6-random}
ipv6 = $${instance-parameters:ipv6-random}
port6 = 6379
ipv4 = $${instance-parameters:ipv4-random}
port = 6379
port = 6379
pid_file = $${directories:run}/redis.pid
pid_file = $${directories:run}/redis.pid
server_dir = $${directories:srv}
server_dir = $${directories:srv}
...
...
software/abilian/extranet_spr/instance.cfg.in
View file @
f6cba2aa
...
@@ -45,8 +45,8 @@ cert = $${slap-connection:cert-file}
...
@@ -45,8 +45,8 @@ cert = $${slap-connection:cert-file}
recipe = slapos.cookbook:jsondump
recipe = slapos.cookbook:jsondump
json-output = $${buildout:directory}/abilian-config-extra.json
json-output = $${buildout:directory}/abilian-config-extra.json
UNOCONV_LOCATION = ${unoconv-repository:location}/unoconv
UNOCONV_LOCATION = ${unoconv-repository:location}/unoconv
BROKER_URL = redis://:$${redis-requirepass:passwd}@[$${redis:ipv
6
}]:$${redis:port}/2
BROKER_URL = redis://:$${redis-requirepass:passwd}@[$${redis:ipv
4
}]:$${redis:port}/2
CELERY_RESULT_BACKEND = redis://:$${redis-requirepass:passwd}@[$${redis:ipv
6
}]:$${redis:port}/2
CELERY_RESULT_BACKEND = redis://:$${redis-requirepass:passwd}@[$${redis:ipv
4
}]:$${redis:port}/2
SECRET_KEY = $${csrf-secret-key:passwd}
SECRET_KEY = $${csrf-secret-key:passwd}
INSTANCE_HOST = $${instance-parameters:ipv6-random}
INSTANCE_HOST = $${instance-parameters:ipv6-random}
...
...
software/abilian/extranet_spr/software.cfg
View file @
f6cba2aa
...
@@ -229,7 +229,7 @@ configure-command =
...
@@ -229,7 +229,7 @@ configure-command =
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
output = ${buildout:directory}/instance.cfg
md5sum =
23167d761e13d9eb41e381beecfc7664
md5sum =
3b6105aa9335141c2d73871bdde80e9d
mode = 0644
mode = 0644
[instance-postgres]
[instance-postgres]
...
@@ -243,7 +243,7 @@ mode = 0644
...
@@ -243,7 +243,7 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-redis.cfg.in
url = ${:_profile_base_location_}/instance-redis.cfg.in
output = ${buildout:directory}/instance-redis.cfg
output = ${buildout:directory}/instance-redis.cfg
md5sum =
e0f32e25d059ec67dfccd132cbb6095e
md5sum =
a322af67bcfd73f1782494c147499071
mode = 0644
mode = 0644
[instance-extranet]
[instance-extranet]
...
...
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