Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SlapOS Develop
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
Eric Zheng
SlapOS Develop
Commits
bf3ace62
Commit
bf3ace62
authored
Nov 07, 2012
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add redis-server component, software and recipe
parent
5ed5b0c0
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
717 additions
and
0 deletions
+717
-0
component/redis/buildout.cfg
component/redis/buildout.cfg
+17
-0
setup.py
setup.py
+1
-0
slapos/recipe/redis/__init__.py
slapos/recipe/redis/__init__.py
+62
-0
slapos/recipe/redis/template/redis.conf.in
slapos/recipe/redis/template/redis.conf.in
+546
-0
software/redis-server/instance-redis.cfg
software/redis-server/instance-redis.cfg
+53
-0
software/redis-server/instance.cfg
software/redis-server/instance.cfg
+13
-0
software/redis-server/software.cfg
software/redis-server/software.cfg
+25
-0
No files found.
component/redis/buildout.cfg
0 → 100644
View file @
bf3ace62
[buildout]
parts =
redis
[redis]
recipe = hexagonit.recipe.cmmi
url = https://github.com/teh/redis/archive/unstable.tar.gz
md5sum = b056f48c301004c80c23579ab337494a
configure-command = true
prefix =
make-options =
PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
V=1
make-targets =
install
test
setup.py
View file @
bf3ace62
...
...
@@ -121,6 +121,7 @@ setup(name=name,
'publishurl = slapos.recipe.publishurl:Recipe'
,
'pwgen = slapos.recipe.pwgen:Recipe'
,
'pwgen.stable = slapos.recipe.pwgen:StablePasswordGeneratorRecipe'
,
'redis.server = slapos.recipe.redis:Recipe'
,
'requestoptional = slapos.recipe.request:RequestOptional'
,
'request = slapos.recipe.request:Recipe'
,
'seleniumrunner = slapos.recipe.seleniumrunner:Recipe'
,
...
...
slapos/recipe/redis/__init__.py
0 → 100644
View file @
bf3ace62
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import
os
from
slapos.recipe.librecipe
import
GenericBaseRecipe
class
Recipe
(
GenericBaseRecipe
):
def
install
(
self
):
path_list
=
[]
if
not
self
.
optionIsTrue
(
'use_passwd'
,
False
):
master_passwd
=
"# masterauth <master-password>"
else
:
master_passwd
=
"masterauth %s"
%
self
.
options
[
'passwd'
]
config_file
=
self
.
options
[
'config_file'
].
strip
()
configuration
=
dict
(
pid_file
=
self
.
options
[
'pid_file'
],
port
=
self
.
options
[
'port'
],
ipv6
=
self
.
options
[
'ipv6'
],
server_dir
=
self
.
options
[
'server_dir'
],
log_file
=
self
.
options
[
'log_file'
],
master_passwd
=
master_passwd
)
config
=
self
.
createFile
(
config_file
,
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'redis.conf.in'
),
configuration
))
path_list
.
append
(
config
)
redis
=
self
.
createPythonScript
(
self
.
options
[
'wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'server_bin'
],
config_file
]
)
path_list
.
append
(
redis
)
return
path_list
slapos/recipe/redis/template/redis.conf.in
0 → 100644
View file @
bf3ace62
This diff is collapsed.
Click to expand it.
software/redis-server/instance-redis.cfg
0 → 100644
View file @
bf3ace62
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
parts =
publish-connection-informations
redis
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
srv = $${buildout:directory}/srv/
var = $${buildout:directory}/var/
bin = $${buildout:directory}/bin/
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run/
run = $${rootdirectory:var}/run/
log = $${rootdirectory:var}/log/
[master-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:etc}/.passwd
bytes = 4
[redis]
recipe = slapos.cookbook:redis.server
server_bin = ${redis:location}/bin/redis-server
ipv6 = $${slap-network-information:global-ipv6}
port = 6379
use_passwd = $${slap-parameter:use_passwd}
pid_file = $${basedirectory:run}/redis.pid
server_dir = $${rootdirectory:srv}
passwd = $${master-passwd:passwd}
config_file = $${rootdirectory:etc}/redis.conf
log_file = $${basedirectory:log}/redis.log
wrapper = $${basedirectory:services}/redis_server
# Send informations to SlapOS Master
[publish-connection-informations]
recipe = slapos.cookbook:publish
server_url = $${redis:ipv6}
port = $${redis:port}
passwd = $${redis:passwd}
use_master_password = $${redis:use_passwd}
[slap-parameter]
use_passwd = false
\ No newline at end of file
software/redis-server/instance.cfg
0 → 100644
View file @
bf3ace62
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
parts =
switch-softwaretype
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${template-redis:output}
\ No newline at end of file
software/redis-server/software.cfg
0 → 100644
View file @
bf3ace62
[buildout]
parts =
slapos-cookbook
redis
template
template-redis
extends =
../../component/redis/buildout.cfg
../../stack/slapos.cfg
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
md5sum = 5d2008c96a569c3ce498ddc0933afea3
[template-redis]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-redis.cfg
output = ${buildout:directory}/template-redis.cfg
mode = 0644
md5sum = cadef83b41f95d28ffdfca8801cdc28d
\ No newline at end of file
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