Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Thomas Gambier
slapos
Commits
761bed51
Commit
761bed51
authored
Sep 29, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ERP5 SR able to deploy an ERP5 cluster.
parent
e8a8b237
Changes
21
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1862 additions
and
1081 deletions
+1862
-1081
buildout.cfg
component/findutils/buildout.cfg
+8
-0
mysql.py
slapos/recipe/generic_mysql/mysql.py
+4
-2
README.txt
software/erp5/README.txt
+402
-6
buildout.cfg
stack/erp5/buildout.cfg
+79
-69
instance-balancer.cfg.in
stack/erp5/instance-balancer.cfg.in
+159
-0
instance-cloudoo.cfg.in
stack/erp5/instance-cloudoo.cfg.in
+30
-5
instance-cluster-zope.cfg.in
stack/erp5/instance-cluster-zope.cfg.in
+294
-0
instance-erp5-cluster.cfg.in
stack/erp5/instance-erp5-cluster.cfg.in
+162
-83
instance-erp5-single.cfg.in
stack/erp5/instance-erp5-single.cfg.in
+10
-3
instance-kumofs.cfg.in
stack/erp5/instance-kumofs.cfg.in
+35
-18
instance-logrotate-base.cfg.in
stack/erp5/instance-logrotate-base.cfg.in
+50
-0
instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+180
-141
instance-memcached.cfg.in
stack/erp5/instance-memcached.cfg.in
+0
-147
instance-tidstorage.cfg.in
stack/erp5/instance-tidstorage.cfg.in
+0
-538
instance-varnish.cfg.in
stack/erp5/instance-varnish.cfg.in
+1
-1
instance-zeo.cfg.in
stack/erp5/instance-zeo.cfg.in
+220
-0
instance-zope.cfg.in
stack/erp5/instance-zope.cfg.in
+3
-3
instance.cfg.in
stack/erp5/instance.cfg.in
+128
-63
mariadb_initial_setup.sql.in
stack/erp5/mariadb_initial_setup.sql.in
+16
-0
my.cnf.in
stack/erp5/my.cnf.in
+79
-0
zope.conf.in
stack/erp5/zope.conf.in
+2
-2
No files found.
component/findutils/buildout.cfg
0 → 100644
View file @
761bed51
[buildout]
parts =
findutils
[findutils]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/findutils/findutils-4.4.2.tar.gz
md5sum = 351cc4adb07d54877fa15f75fb77d39f
slapos/recipe/generic_mysql/mysql.py
View file @
761bed51
...
...
@@ -66,8 +66,9 @@ def updateMysql(args):
with
open
(
script_filename
)
as
script_file
:
conf
[
'mysql_script'
]
=
script_file
.
read
()
while
True
:
mysql_upgrade_list
=
[
conf
[
'mysql_upgrade_binary'
],
'--
no-defaults'
,
'--
user=root'
]
mysql_upgrade_list
=
[
conf
[
'mysql_upgrade_binary'
],
'--user=root'
]
if
'socket'
in
conf
:
mysql_upgrade_list
.
insert
(
1
,
'--no-defaults'
)
mysql_upgrade_list
.
append
(
'--socket='
+
conf
[
'socket'
])
mysql_upgrade
=
subprocess
.
Popen
(
mysql_upgrade_list
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
result
=
mysql_upgrade
.
communicate
()[
0
]
...
...
@@ -80,8 +81,9 @@ def updateMysql(args):
print
"MySQL database upgraded with result:
\n
%
s"
%
result
else
:
print
"No need to upgrade MySQL database"
mysql_list
=
[
conf
[
'mysql_binary'
]
.
strip
(),
'-
-no-defaults'
,
'-
B'
,
'--user=root'
]
mysql_list
=
[
conf
[
'mysql_binary'
]
.
strip
(),
'-B'
,
'--user=root'
]
if
'socket'
in
conf
:
mysql_list
.
insert
(
1
,
'--no-defaults'
)
mysql_list
.
append
(
'--socket='
+
conf
[
'socket'
])
mysql
=
subprocess
.
Popen
(
mysql_list
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
...
...
software/erp5/README.txt
View file @
761bed51
This diff is collapsed.
Click to expand it.
stack/erp5/buildout.cfg
View file @
761bed51
...
...
@@ -55,7 +55,6 @@ extends =
../../component/w3m/buildout.cfg
../../component/xorg/buildout.cfg
../../component/poppler/buildout.cfg
../../component/xtrabackup/buildout.cfg
../../component/zabbix/buildout.cfg
../../component/sed/buildout.cfg
../../component/coreutils/buildout.cfg
...
...
@@ -65,6 +64,8 @@ extends =
../../component/aspell/buildout.cfg
../../component/cloudooo/buildout.cfg
../../component/jsl/buildout.cfg
../../component/6tunnel/buildout.cfg
../../component/findutils/buildout.cfg
parts =
rdiff-backup
...
...
@@ -73,6 +74,7 @@ parts =
apache
apache-antiloris
file
findutils
graphviz
haproxy
jsl
...
...
@@ -137,6 +139,11 @@ parts =
# Create instance template
template
[download-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
mode = 644
# Local development
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
...
...
@@ -164,63 +171,46 @@ context =
${:extra-context}
[template-mariadb]
< = template-jinja2-base
filename = instance-mariadb.cfg
md5sum = 49ae6f1bf97d3755978fe08b8e29fb5a
extra-context =
key coreutils_location coreutils:location
key dcron_location dcron:location
key gettext_location gettext:location
key grep_location grep:location
key gzip_location gzip:location
key logrotate_location logrotate:location
key mariadb_location mariadb:location
key perl_location perl:location
key perl_siteprefix perl:siteprefix
key sed_location sed:location
key xtrabackup_location xtrabackup:location
< = download-base
filename = instance-mariadb.cfg.in
md5sum = defc8f21dd651dab65102f889740a4e5
[template-zope]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-zope.cfg.in
md5sum = 69556ddc9773fb95896b7762e998bb9b
mode = 640
< = download-base
filename = instance-zope.cfg.in
md5sum = 2b68521ebde309d6453336f1a2e46381
[template-kumofs]
< = template-jinja2-base
filename = instance-kumofs.cfg
md5sum = 90a321be12ee977800d590bf941021ef
extra-context =
key dash_location dash:location
key dcron_location dcron:location
key gzip_location gzip:location
key kumo_location kumo:location
key logrotate_location logrotate:location
[template-tidstorage]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-tidstorage.cfg.in
md5sum = 5572d10b343bd2de90deeaf55dd0fdc7
mode = 640
< = download-base
filename = instance-kumofs.cfg.in
md5sum = 0dd51fb85ced7e77d4a8544115f90f8e
[template-cloudooo]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
md5sum = 53492e520be57f4c6a9eacd107c8d446
mode = 640
< = download-base
filename = instance-cloudoo.cfg.in
md5sum = 6660382993d14e1d538e737e881219ba
[template-zope-conf]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/zope.conf.in
md5sum = bc2154161a1d5baddc4ed4dfaaf94fbe
mode = 640
< = download-base
filename = zope.conf.in
md5sum = c4c42d06c63d33de703fc03415e34d84
[template-my-cnf]
< = download-base
filename = my.cnf.in
md5sum = 1339485f80e049fd22d0270ebf044aa6
[template-mariadb-initial-setup]
< = download-base
filename = mariadb_initial_setup.sql.in
md5sum = 564006953b7d7a12d40a14b6648b32f0
[template]
< = template-jinja2-base
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum =
a1a5a9983207e4a8128bab331cbd3cd5
md5sum =
d4b6e9bdaea4c11827dcb7a30c2d20c9
extra-context =
key apache_location apache:location
key aspell_location aspell:location
...
...
@@ -232,9 +222,11 @@ extra-context =
key dmtx_utils_location dmtx-utils:location
key erp5_location erp5:location
key file_location file:location
key findutils_location findutils:location
key fontconfig_location fontconfig:location
key fonts_location fonts:location
key freetype_location freetype:location
key gettext_location gettext:location
key git_location git:location
key graphviz_location graphviz:location
key grep_location grep:location
...
...
@@ -242,6 +234,7 @@ extra-context =
key haproxy_location haproxy:location
key imagemagick_location imagemagick:location
key jsl_location jsl:location
key kumo_location kumo:location
key libICE_location libICE:location
key libSM_location libSM:location
key libX11_location libX11:location
...
...
@@ -257,17 +250,24 @@ extra-context =
key logrotate_location logrotate:location
key mariadb_location mariadb:location
key openssl_location openssl:location
key perl_location perl:location
key perl_siteprefix perl:siteprefix
key poppler_location poppler:location
key sed_location sed:location
key sixtunnel_location 6tunnel:location
key stunnel_location stunnel:location
key template_balancer template-balancer:target
key template_cloudooo template-cloudooo:target
key template_cluster_zope template-cluster-zope:target
key template_erp5_single template-erp5-single:target
key template_erp5_cluster template-erp5-cluster:target
key template_kumofs template-kumofs:rendered
key template_mariadb template-mariadb:rendered
key template_memcached template-memcached:rendered
key template_tidstorage template-tidstorage:target
key template_kumofs template-kumofs:target
key template_logrotate_base template-logrotate-base:rendered
key template_mariadb template-mariadb:target
key template_mariadb_initial_setup template-mariadb-initial-setup:target
key template_my_cnf template-my-cnf:target
key template_varnish template-varnish:target
key template_zeo template-zeo:target
key template_zope template-zope:target
key template_zope_conf template-zope-conf:target
key tesseract_location tesseract:location
...
...
@@ -276,34 +276,44 @@ extra-context =
key wget_location wget:location
key zlib_location zlib:location
[template-memcached]
[template-erp5-single]
< = download-base
filename = instance-erp5-single.cfg.in
md5sum = 77ec4f095a22b5bd7dfea9dff63bade5
[template-erp5-cluster]
< = download-base
filename = instance-erp5-cluster.cfg.in
md5sum = c745d794b28cae64feba527f894d7340
[template-zeo]
< = download-base
filename = instance-zeo.cfg.in
md5sum = 6d0bdee21ac4837f07852b98b6fcea36
[template-cluster-zope]
< = download-base
filename = instance-cluster-zope.cfg.in
md5sum = 019f306860857e8536f26aba32101b30
[template-balancer]
< = download-base
filename = instance-balancer.cfg.in
md5sum = 9c9741c4db7e46f3cd13c0b2f392fd5d
[template-logrotate-base]
< = template-jinja2-base
filename = instance-
memcached
.cfg
md5sum =
346c864c1f119360eddb5e163f16d4f3
filename = instance-
logrotate-base
.cfg
md5sum =
af19ff0c7817df85987c69738fb083f2
extra-context =
key dash_location dash:location
key dcron_location dcron:location
key gzip_location gzip:location
key kumo_location kumo:location
key logrotate_location logrotate:location
[template-erp5-single]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-erp5-single.cfg.in
md5sum = 2a4312202a3160f874c4fa3ee9155a1d
mode = 640
[template-erp5-cluster]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-erp5-cluster.cfg.in
md5sum = eecde68b9a266d8883042540ac077839
mode = 640
[template-varnish]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-varnish.cfg.in
md5sum = ae0465591c22c0cb316c1706965c6b18
mode = 640
< = download-base
filename = instance-varnish.cfg.in
md5sum = b3020e1da069d43ece0de99b106cfb45
[bt5-repository]
# Format:
...
...
stack/erp5/instance-balancer.cfg.in
0 → 100644
View file @
761bed51
{% if software_type == slap_software_type -%}
{% set part_list = [] -%}
{% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
{#
XXX: This template only supports exactly one IPv4 and (if ipv6 is used) one IPv6
per partition. No more (undefined result), no less (IndexError).
-#}
# TODO: insert varnish between apache & haproxy.
# And think of a way to specify which urls goe through varnish, which go
# directly to haproxy. (maybe just passing literal configuration file chunk)
{% set ipv4 = (ipv4_set | list)[0] -%}
{% if use_ipv6 -%}
{% set ipv6 = (ipv6_set | list)[0] -%}
[zope-tunnel-base]
recipe = slapos.cookbook:ipv4toipv6
runner-path = ${directory:services}/${:base-name}
6tunnel-path = {{ parameter_dict['6tunnel'] }}/bin/6tunnel
shell-path = {{ parameter_dict['dash'] }}/bin/dash
ipv4 = {{ ipv4 }}
{% endif -%}
{% set haproxy_dict = {} -%}
{% set apache_dict = {} -%}
{% set next_port = slapparameter_dict['tcpv4-port'] -%}
{% for family_name, parameter_id_list in slapparameter_dict['zope-family-dict'].items() -%}
{% set zope_family_address_list = [] -%}
{% for parameter_id in parameter_id_list -%}
{% set zope_address_list = slapparameter_dict[parameter_id] -%}
{% for zope_address in zope_address_list -%}
{% if use_ipv6 -%}
[{{ section('zope-tunnel-' ~ next_port) }}]
< = zope-tunnel-base
base-name = {{ 'zeo-tunnel-' ~ next_port }}
ipv4-port = {{ next_port }}
ipv6-port = {{ zope_address.split(']:')[1] }}
ipv6 = {{ zope_address.split(']:')[0][1:] }}
{% set zope_effective_address = ipv4 ~ ":" ~ next_port -%}
{% set next_port = next_port + 1 -%}
{% else -%}
{% set zope_effective_address = zope_address -%}
{% endif -%}
{% do zope_family_address_list.append(zope_effective_address) -%}
{% endfor -%}
{% endfor -%}
{% set haproxy_port = next_port -%}
{% set next_port = next_port + 1 -%}
{% do haproxy_dict.__setitem__(family_name, (haproxy_port, zope_family_address_list)) -%}
{% do apache_dict.__setitem__(family_name, (next_port, 'http://' ~ ipv4 ~ ':' ~ haproxy_port)) -%}
{% set next_port = next_port + 1 -%}
{% endfor -%}
[haproxy]
recipe = slapos.cookbook:haproxy
conf-path = ${directory:etc}/haproxy.cfg
ip = {{ ipv4 }}
maxconn = {{ slapparameter_dict['haproxy-maxconn'] }}
server-check-path = {{ slapparameter_dict['haproxy-server-check-path'] }}
wrapper-path = ${directory:services}/haproxy
ctl-path = ${directory:bin}/haproxy-ctl
socket-path = ${directory:run}/haproxy.sock
binary-path = {{ parameter_dict['haproxy'] }}/sbin/haproxy
backend-dict = {{ dumps(haproxy_dict) }}
[apache]
recipe = slapos.cookbook:apache.zope.backend
backend-list = {{ dumps(apache_dict.values()) }}
ip = {% if use_ipv6 %}{{ ipv6 }}{% else %}{{ ipv4 }}{% endif %}
wrapper = ${directory:bin}/apache
scheme = https
key-file = ${directory:apache-conf}/apache.key
cert-file = ${directory:apache-conf}/apache.crt
configuration-file = ${directory:apache-conf}/apache.conf
access-control-string = {{ slapparameter_dict['apache-access-control-string'] }}
pid-file = ${directory:run}/apache.pid
lock-file = ${directory:run}/apache.lock
ssl-session-cache = $${directory:log}/apache-ssl-session-cache
error-log = ${directory:log}/apache-error.log
access-log = ${directory:log}/apache-access.log
apache-binary = {{ parameter_dict['apache'] }}/bin/httpd
ssl-authentication = {{ slapparameter_dict['apache-ssl-authentication'] }}
backend-path = {{ slapparameter_dict['apache-backend-path'] }}
# Note: Without certificate-authority main certificate have to be hardcoded
ssl-authentication-certificate = ${certificate-authority:ca-dir}/cacert.pem
ssl-authentication-crl = ${certificate-authority:ca-crl}
[publish]
recipe = slapos.cookbook:publish.serialised
{% for family_name, (apache_port, _) in apache_dict.items() -%}
{% if use_ipv6 -%}
{{ family_name }} = ${apache:scheme}://[${apache:ip}]:{{ apache_port }}
{% else -%}
{{ family_name }} = ${apache:scheme}://${apache:ip}:{{ apache_port }}
{% endif -%}
{% endfor -%}
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = {{ parameter_dict['openssl'] }}/bin/openssl
ca-dir = ${directory:ca-dir}
requests-directory = ${directory:requests}
wrapper = ${directory:services}/ca
ca-private = ${directory:private}
ca-certs = ${directory:certs}
ca-newcerts = ${directory:newcerts}
ca-crl = ${directory:crl}
{% set ca = slapparameter_dict['ca'] -%}
country-code = {{ ca.get('country-code', 'ZZ') }}
email = {{ ca.get('email', 'nobody@example.com') }}
state = {{ ca.get('state', 'Dummy State') }}
city = {{ ca.get('city', 'Dummy City') }}
company = {{ ca.get('company', 'Dummy Company') }}
[ca-apache]
< = certificate-authority
recipe = slapos.cookbook:certificate_authority.request
key-file = ${apache:key-file}
cert-file = ${apache:cert-file}
executable = ${apache:wrapper}
wrapper = ${directory:services}/apache
[logrotate-apache]
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
name = apache
log = ${apache:error-log} ${apache:access-log}
post = {{ parameter_dict['bin-directory'] }}/killpidfromfile ${apache:pid-file} SIGUSR1
[directory]
recipe = slapos.cookbook:mkdirectory
apache-conf = ${:etc}/apache
bin = ${buildout:directory}/bin
etc = ${buildout:directory}/etc
services = ${:etc}/run
var = ${buildout:directory}/var
run = ${:var}/run
log = ${:var}/log
ca-dir = ${buildout:directory}/srv/ssl
requests = ${:ca-dir}/requests
private = ${:ca-dir}/private
certs = ${:ca-dir}/certs
newcerts = ${:ca-dir}/newcerts
crl = ${:ca-dir}/crl
[buildout]
extends = {{ parameter_dict['instance-logrotate-cfg'] }}
parts +=
publish
logrotate-apache
haproxy
ca-apache
{{ part_list | join('\n ') }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% endif %}
stack/erp5/instance-cloudoo.cfg.in
View file @
761bed51
{% if software_type == slap_software_type -%}
{% set json = json_module.loads(parameter_dict.get('cloudooo-json', '{}')) -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
[buildout]
parts =
publish-cloudooo-connection-information
cloudooo-instance
promise
promise-openoffice
{% if use_ipv6 %}promise-tunnel{% endif %}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-cloudooo-connection-information]
recipe = slapos.cookbook:publishurl
recipe = slapos.cookbook:publish.serialised
{% if use_ipv6 -%}
url = cloudooo://[${ipv6toipv4:ipv6}]:${ipv6toipv4:ipv6-port}/
{% else -%}
url = cloudooo://${cloudooo-instance:ip}:${cloudooo-instance:port}/
{% endif -%}
[cloudooo-instance]
recipe = slapos.cookbook:generic.cloudooo
# Network options
ip = ${slap-network-information:local-ipv4}
port = 23000
openoffice-port = 23060
{% set tcpv4_port = slapparameter_dict['tcpv4-port'] -%}
port = {{ tcpv4_port }}
openoffice-port = {{ tcpv4_port + 1 }}
# Paths
configuration-file = ${directory:etc}/cloudooo.cfg
...
...
@@ -45,7 +51,7 @@ recipe = slapos.cookbook:fontconfig
conf-path = ${directory:etc}/font.conf
font-system-folder = {{ parameter_dict['fonts'] }}
font-folder = ${directory:font}
url-list = {{
json.get('font_url_
list', []) | join(' ') }}
url-list = {{
slapparameter_dict.get('font-url-
list', []) | join(' ') }}
service-folder = ${directory:service}
onetimedownload_path = {{ bin_directory }}/onetimedownload
...
...
@@ -61,6 +67,25 @@ path = ${directory:promise}/openoffice
hostname = ${cloudooo-instance:ip}
port = ${cloudooo-instance:openoffice-port}
{% if use_ipv6 -%}
[promise-tunnel]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promise}/tunnel
hostname = ${ipv6toipv4:ipv6}
port = ${ipv6toipv4:ipv6-port}
[ipv6toipv4]
recipe = slapos.cookbook:ipv6toipv4
runner-path = ${directory:service}/${:base-name}
6tunnel-path = {{ parameter_dict['6tunnel'] }}/bin/6tunnel
shell-path = {{ parameter_dict['dash'] }}/bin/dash
ipv4 = ${cloudooo-instance:ip}
ipv6 = {{ (ipv6_set | list)[0] }}
ipv6-port = ${cloudooo-instance:port}
ipv4-port = ${cloudooo-instance:port}
base-name = cloudooo-tunnel
{% endif -%}
# rest of parts are candidates for some generic stuff
[directory]
recipe = slapos.cookbook:mkdirectory
...
...
stack/erp5/instance-cluster-zope.cfg.in
0 → 100644
View file @
761bed51
This diff is collapsed.
Click to expand it.
stack/erp5/instance-erp5-cluster.cfg.in
View file @
761bed51
This diff is collapsed.
Click to expand it.
stack/erp5/instance-erp5-single.cfg.in
View file @
761bed51
...
...
@@ -87,7 +87,7 @@ bt5 = ${slap-parameter:bt5}
bt5-repository-url = ${slap-parameter:bt5-repository-url}
[request-common]
recipe = slapos.cookbook:request
recipe = slapos.cookbook:request
.serialised
software-url = ${slap-connection:software-release-url}
sla = computer_guid
sla-computer_guid = ${slap-connection:computer-id}
...
...
@@ -102,6 +102,11 @@ partition-id = ${slap-connection:partition-id}
<=request-common
name = MariaDB DataBase
software-type = mariadb
{% set mariadb_dict = slapparameter_dict.get('mariadb-dict', {}) -%}
{% for option, value in mariadb_dict.items() -%}
config-{{ option }} = {{ dumps(value) }}
{% endfor -%}
config = {{ ' '.join(mariadb_dict) }}
[request-cloudooo]
<=request-common
...
...
@@ -112,8 +117,10 @@ software-type = cloudooo
[request-memcached]
<=request-common
name = Memcached
software-type = memcached
name = KumoFS-ram
software-type = kumofs
config = ram-storage-size
config-ram-storage-size = 64m
[request-kumofs]
<=request-common
...
...
stack/erp5/instance-kumofs.cfg.in
View file @
761bed51
{% if software_type == slap_software_type -%}
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
[buildout]
parts =
publish-kumofs-connection-information
...
...
@@ -16,53 +18,67 @@ develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-kumofs-connection-information]
recipe = slapos.cookbook:publishurl
recipe = slapos.cookbook:publish.serialised
{% if use_ipv6 -%}
url = memcached://[${kumofs-instance:ip}]:${kumofs-instance:gateway-port}/
{% else -%}
url = memcached://${kumofs-instance:ip}:${kumofs-instance:gateway-port}/
{% endif -%}
[kumofs-instance]
recipe = slapos.cookbook:generic.kumofs
# Network options
{% if use_ipv6 -%}
ip = ${slap-network-information:global-ipv6}
address-family = inet6
{% else -%}
ip = ${slap-network-information:local-ipv4}
manager-port = 13101
server-port = 13201
server-listen-port = 13202
gateway-port = 13301
address-family = inet4
{% endif -%}
{% set tcpv4_port = slapparameter_dict['tcpv4-port'] -%}
manager-port = {{ tcpv4_port }}
server-port = {{ tcpv4_port + 1 }}
server-listen-port = {{ tcpv4_port + 2 }}
gateway-port = {{ tcpv4_port + 3 }}
# Paths: Data
{% set ram_storage_size = slapparameter_dict.get('ram-storage-size') -%}
{% if ram_storage_size -%}
data-path = *#capsiz={{ ram_storage_size }}m
{% else -%}
data-directory = ${directory:kumofs-data}
{% endif -%}
# Paths: Running wrappers
gateway-wrapper = ${basedirectory:services}/kumofs_gateway
manager-wrapper = ${basedirectory:services}/kumofs_manager
server-wrapper = ${basedirectory:services}/kumofs_server
# Paths: Data
data-directory = ${directory:kumofs-data}
# Paths: Logs
kumo-gateway-log = ${basedirectory:log}/kumo-gateway.log
kumo-manager-log = ${basedirectory:log}/kumo-manager.log
kumo-server-log = ${basedirectory:log}/kumo-server.log
# Binary information
kumo-gateway-binary = {{
kumo_location
}}/bin/kumo-gateway
kumo-manager-binary = {{
kumo_location
}}/bin/kumo-manager
kumo-server-binary = {{
kumo_location
}}/bin/kumo-server
shell-path = {{
dash_location
}}/bin/dash
kumo-gateway-binary = {{
parameter_dict['kumo-location']
}}/bin/kumo-gateway
kumo-manager-binary = {{
parameter_dict['kumo-location']
}}/bin/kumo-manager
kumo-server-binary = {{
parameter_dict['kumo-location']
}}/bin/kumo-server
shell-path = {{
parameter_dict['dash-location']
}}/bin/dash
[logrotate-entry-kumofs]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = kumofs
log = ${kumofs-instance:kumo-gateway-log} ${kumofs-instance:kumo-manager-log}
${kumofs-instance:kumo-server-log}
log = ${kumofs-instance:kumo-gateway-log} ${kumofs-instance:kumo-manager-log} ${kumofs-instance:kumo-server-log}
# rest of parts are candidates for some generic stuff
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = {{
logrotate_location
}}/usr/sbin/logrotate
gzip-binary = {{
gzip_location
}}/bin/gzip
gunzip-binary = {{
gzip_location
}}/bin/gunzip
logrotate-binary = {{
parameter_dict['logrotate-location']
}}/usr/sbin/logrotate
gzip-binary = {{
parameter_dict['gzip-location']
}}/bin/gzip
gunzip-binary = {{
parameter_dict['gzip-location']
}}/bin/gunzip
# Directories
wrapper = ${rootdirectory:bin}/logrotate
conf = ${rootdirectory:etc}/logrotate.conf
...
...
@@ -96,7 +112,7 @@ bin = ${buildout:directory}/bin
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = {{
dcron_location
}}/sbin/crond
dcrond-binary = {{
parameter_dict['dcron-location']
}}/sbin/crond
cron-entries = ${directory:cron-entries}
crontabs = ${directory:crontabs}
cronstamps = ${directory:cronstamps}
...
...
@@ -140,3 +156,4 @@ port = ${kumofs-instance:gateway-port}
<= promise-template
path = ${basedirectory:promise}/kumofs-manager
port = ${kumofs-instance:manager-port}
{% endif %}
stack/erp5/instance-logrotate-base.cfg.in
0 → 100644
View file @
761bed51
[buildout]
parts =
cron-entry-logrotate
[cron]
recipe = slapos.cookbook:cron
cron-entries = ${logrotate-directory:cron-entries}
dcrond-binary = {{ dcron_location }}/sbin/crond
crontabs = ${logrotate-directory:crontabs}
cronstamps = ${logrotate-directory:cronstamps}
catcher = ${cron-simplelogger:wrapper}
binary = ${logrotate-directory:services}/crond
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = ${logrotate-directory:bin}/cron_simplelogger
log = ${logrotate-directory:log}/cron.log
[logrotate]
recipe = slapos.cookbook:logrotate
logrotate-entries = ${logrotate-directory:logrotate-entries}
backup = ${logrotate-directory:logrotate-backup}
logrotate-binary = {{ logrotate_location }}/usr/sbin/logrotate
gzip-binary = {{ gzip_location }}/bin/gzip
gunzip-binary = {{ gzip_location }}/bin/gunzip
wrapper = ${logrotate-directory:bin}/logrotate
conf = ${logrotate-directory:etc}/logrotate.conf
state-file = ${logrotate-directory:srv}/logrotate.status
[cron-entry-logrotate]
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = logrotate
frequency = 0 0 * * *
command = ${logrotate:wrapper}
[logrotate-directory]
recipe = slapos.cookbook:mkdirectory
cron-entries = ${:etc}/cron.d
cronstamps = ${:etc}/cronstamps
crontabs = ${:etc}/crontabs
logrotate-backup = ${:backup}/logrotate
logrotate-entries = ${:etc}/logrotate.d
bin = ${buildout:directory}/bin
srv = ${buildout:directory}/srv
backup = ${:srv}/backup
etc = ${buildout:directory}/etc
services = ${:etc}/run
log = ${buildout:directory}/var/log
stack/erp5/instance-mariadb.cfg.in
View file @
761bed51
This diff is collapsed.
Click to expand it.
stack/erp5/instance-memcached.cfg.in
deleted
100644 → 0
View file @
e8a8b237
# memcached-compatible volatile cache using kumofs
# that has no limitation for key length and data size
[buildout]
parts =
publish-kumofs-connection-information
kumofs-instance
logrotate
logrotate-entry-kumofs
cron
cron-entry-logrotate
promise-kumofs-server
promise-kumofs-server-listen
promise-kumofs-gateway
promise-kumofs-manager
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-kumofs-connection-information]
recipe = slapos.cookbook:publishurl
url = memcached://${kumofs-instance:ip}:${kumofs-instance:gateway-port}/
[kumofs-instance]
recipe = slapos.cookbook:generic.kumofs
# Network options
ip = ${slap-network-information:local-ipv4}
manager-port = 13401
server-port = 13501
server-listen-port = 13502
# previous memcached configuration
gateway-port = 11000
# previous memcached configuration
storage-size = 64m
# Paths: Running wrappers
gateway-wrapper = ${basedirectory:services}/volatile_kumofs_gateway
manager-wrapper = ${basedirectory:services}/volatile_kumofs_manager
server-wrapper = ${basedirectory:services}/volatile_kumofs_server
# Paths: Data
data-path = *#capsiz=${:storage-size}
# Paths: Logs
kumo-gateway-log = ${basedirectory:log}/kumo-gateway.log
kumo-manager-log = ${basedirectory:log}/kumo-manager.log
kumo-server-log = ${basedirectory:log}/kumo-server.log
# Binary information
kumo-gateway-binary = {{ kumo_location }}/bin/kumo-gateway
kumo-manager-binary = {{ kumo_location }}/bin/kumo-manager
kumo-server-binary = {{ kumo_location }}/bin/kumo-server
shell-path = {{ dash_location }}/bin/dash
[logrotate-entry-kumofs]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = kumofs
log = ${kumofs-instance:kumo-gateway-log} ${kumofs-instance:kumo-manager-log}
${kumofs-instance:kumo-server-log}
# rest of parts are candidates for some generic stuff
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = {{ logrotate_location }}/usr/sbin/logrotate
gzip-binary = {{ gzip_location }}/bin/gzip
gunzip-binary = {{ gzip_location }}/bin/gunzip
# Directories
wrapper = ${rootdirectory:bin}/logrotate
conf = ${rootdirectory:etc}/logrotate.conf
logrotate-entries = ${directory:logrotate-entries}