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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaohe Cao
slapos
Commits
4d6144f4
Commit
4d6144f4
authored
Oct 19, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instantiate tidstorage.
parent
bfda7f33
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
7 deletions
+81
-7
setup.py
setup.py
+1
-0
slapos/recipe/generate_erp5_tidstorage.py
slapos/recipe/generate_erp5_tidstorage.py
+0
-1
slapos/recipe/tidstorage/__init__.py
slapos/recipe/tidstorage/__init__.py
+41
-0
slapos/recipe/tidstorage/template/tidstorage.py.in
slapos/recipe/tidstorage/template/tidstorage.py.in
+15
-0
software/erp5/instance.cfg
software/erp5/instance.cfg
+0
-2
software/erp5/snippet-master.cfg
software/erp5/snippet-master.cfg
+22
-2
software/erp5/software.cfg
software/erp5/software.cfg
+2
-2
No files found.
setup.py
View file @
4d6144f4
...
...
@@ -89,5 +89,6 @@ setup(name=name,
'generic.zope.zeo.client = slapos.recipe.generic_zope_zeo_client:Recipe'
,
'generate.erp5.tidstorage = slapos.recipe.generate_erp5_tidstorage:Recipe'
,
'zeo = slapos.recipe.zeo:Recipe'
,
'tidstorage = slapos.recipe.tidstorage:Recipe'
]},
)
slapos/recipe/generate_erp5_tidstorage.py
View file @
4d6144f4
...
...
@@ -147,7 +147,6 @@ class Recipe(GenericSlapRecipe):
prepend
=
open
(
self
.
options
[
'snippet-master'
]).
read
()
%
dict
(
part_list
=
'
\
n
'
.
join
([
' '
+
q
for
q
in
part_list
]),
known_tid_storage_identifier_dict
=
known_tid_storage_identifier_dict
,
site_id
=
site_id
,
haproxy_section
=
"haproxy-%s"
%
backend_name
,
)
output
=
prepend
+
output
...
...
slapos/recipe/tidstorage/__init__.py
0 → 100644
View file @
4d6144f4
##############################################################################
#
# Copyright (c) 2011 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
=
[]
a
=
path_list
.
append
configuration_file
=
self
.
createFile
(
self
.
options
[
'configuration-path'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'tidstorage.py.in'
),
self
.
options
))
a
(
configuration_file
)
tidstorage_wrapper
=
self
.
createPythonScript
(
self
.
options
[
'tidstorage-wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'tidstoraged-binary'
],
'--nofork'
,
'--config'
,
configuration_file
])
a
(
tidstorage_wrapper
)
repozo_wrapper
=
self
.
createPythonScript
(
self
.
options
[
'repozo-wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'tidstorage-repozo-binary'
],
'--config'
,
configuration_file
,
'--repozo'
,
self
.
options
[
'repozo-binary'
],
'-z'
])
a
(
repozo_wrapper
)
return
path_list
slapos/recipe/tidstorage/template/tidstorage.py.in
0 → 100644
View file @
4d6144f4
known_tid_storage_identifier_dict = %(known-tid-storage-identifier-dict)s
base_url = '%(base-url)s'
address = '%(ip)s'
port = %(port)s
#fork = False
#setuid = None
#setgid = None
burst_period = 30
full_dump_period = 300
timestamp_file_path = '%(timestamp-file-path)s'
logfile_name = '%(logfile-name)s'
pidfile_name = '%(pidfile-name)s'
status_file = '%(status-file)s'
software/erp5/instance.cfg
View file @
4d6144f4
...
...
@@ -19,8 +19,6 @@ runTestSuite_binary = ${buildout:bin-directory}/runTestSuite
runUnitTest_binary = ${buildout:bin-directory}/runUnitTest
runzope_binary = ${buildout:bin-directory}/runzope
sphinx_searchd_binary = ${sphinx:location}/bin/searchd
tidstorage_repozo_binary = ${buildout:bin-directory}/tidstorage_repozo
tidstoraged_binary = ${buildout:bin-directory}/tidstoraged
zabbix_agentd_binary = ${zabbix-agent:location}/sbin/zabbix_agentd
link_binary_list =
...
...
software/erp5/snippet-master.cfg
View file @
4d6144f4
...
...
@@ -17,6 +17,8 @@ parts =
cron-entry-logrotate
certificate-authority
tidstorage
cron-entry-tidstorage-backup
logrotate-entry-tidstorage
%(part_list)s
eggs-directory = ${buildout:eggs-directory}
...
...
@@ -26,8 +28,7 @@ offline = true
[tidstorage]
recipe = slapos.cookbook:tidstorage
known-tid-storage-identifier-dict = %(known_tid_storage_identifier_dict)s
site-id = %(site_id)s
base_url = 'http://$${%(haproxy_section)s:ip}:$${%(haproxy_section)s:port}/$${:site-id}/serialize'
base-url = http://$${%(haproxy_section)s:ip}:$${%(haproxy_section)s:port}/%%s/serialize
configuration-path = $${rootdirectory:etc}/tidstorage.py
ip = $${slap-network-information:local-ipv4}
port = 6001
...
...
@@ -35,6 +36,25 @@ timestamp-file-path = $${directory:tidstorage}/repozo_tidstorage_timestamp.log
logfile-name = $${basedirectory:log}/tidstorage.log
pidfile-name = $${basedirectory:run}/tidstorage.pid
status-file = $${directory:tidstorage}/tidstorage.tid
tidstorage-repozo-binary = ${buildout:bin-directory}/tidstorage_repozo
tidstoraged-binary = ${buildout:bin-directory}/tidstoraged
repozo-binary = ${buildout:bin-directory}/repozo
tidstorage-wrapper = $${basedirectory:services}/tidstoraged
repozo-wrapper = $${buildout:bin-directory}/tidstorage-repozo
[cron-entry-tidstorage-backup]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = $${tidstorage:repozo-wrapper}
[logrotate-entry-tidstorage]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = tidstorage
log = $${tidstorage:logfile-name}
post = ${buildout:bin-directory}/killpidfromfile $${tidstorage:pidfile-name} SIGHUP
[directory]
recipe = slapos.cookbook:mkdirectory
...
...
software/erp5/software.cfg
View file @
4d6144f4
...
...
@@ -60,7 +60,7 @@ configurator_bt5_list = erp5_core_proxy_field_legacy erp5_full_text_myisam_catal
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum =
52f3c27de3e9e5f9223084829c3ed2f6
md5sum =
c83acb5533187359b8730072d95ecf92
output = ${buildout:directory}/template.cfg
mode = 0644
...
...
@@ -88,7 +88,7 @@ mode = 0644
[template-snippet-master]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/snippet-master.cfg
md5sum =
d510b8ebbb3325ed7a6a9b6005f78e37
md5sum =
fa1ac57e290cc6823e60fba068bb6a3c
output = ${buildout:directory}/template-snippet-master.cfg
mode = 0644
...
...
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