Commit 33d9e196 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Merge branch 'erp5-component' into erp5

parents 2879a56c d9025faf
Changes
=======
0.73.1 (2012-02-19)
0.74.0 (2013-03-05)
-------------------
* Generate mysql password randomly in LAMP stack. [Alain Takoudjou]
* Add support for apache and haproxy to have more than one listening port. [Vincent Pelletier]
* Use a more consistent parameter naming in 6tunnel recipe. [Vincent Pelletier]
* Provide an SR-transparent way to (de)serialise master data. [Vincent Pelletier]
* Initial version of neoppod recipe. [Vincent Pelletier]
* Initial version of clusterized erp5 recipes. [Vincent Pelletier]
* General cleanup of the request recipe (simpler parsing, less calls to master). [Vincent Pelletier, Cedric de Saint Martin]
0.73.1 (2013-02-19)
-------------------
* softwaretype recipe: all falsy parameter values are now ignored. [Cedric de Saint Martin]
......
......@@ -22,8 +22,8 @@ extends =
recipe = hexagonit.recipe.cmmi
depends =
${mariadb:version}
url = http://fr2.php.net/distributions/php-5.3.13.tar.gz
md5sum = 179c67ce347680f468edbfc3c425476a
url = http://fr2.php.net/distributions/php-5.4.12.tar.bz2
md5sum = 5c7b614242ae12e9cacca21c8ab84818
configure-options =
--with-apxs2=${apache:location}/bin/apxs
--with-libxml-dir=${libxml2:location}
......@@ -65,6 +65,7 @@ environment =
PATH=${pkgconfig:location}/bin:${bzip2:location}/bin:${libxml2:location}/bin:%(PATH)s
LDFLAGS =-L${bzip2:location}/lib -Wl,-rpath -Wl,${bzip2:location}/lib -L${libtool:location}/lib -Wl,-rpath -Wl,${libtool:location}/lib -L${mariadb:location}/lib -Wl,-rpath -Wl,${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libmcrypt:location}/lib -Wl,-rpath -Wl,${libmcrypt:location}/libblkid
TMPDIR=${buildout:parts-directory}/${:_buildout_section_name_}
HOME=${apache:location}
......
......@@ -31,6 +31,7 @@ parts =
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
http://www.nexedi.org/static/packages/source/hexagonit.recipe.download/
versions = versions
......
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.73.2-dev'
version = '0.74.1-dev'
name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......
......@@ -35,6 +35,10 @@ class Recipe(GenericBaseRecipe):
kumo_server_listen_port = int(self.options['server-listen-port'])
kumo_gateway_port = int(self.options['gateway-port'])
path_list = []
if 'data-path' in self.options:
kumo_server_storage = self.options.get('data-path')
else:
kumo_server_storage = os.path.join(self.options['data-directory'], "kumodb.tch")
# XXX: kumo is not storing pid in file, unless it is not running as daemon
# but running daemons is incompatible with SlapOS, so there is currently
# no way to have Kumo's pid files to rotate logs and send signals to them
......@@ -48,7 +52,7 @@ class Recipe(GenericBaseRecipe):
kumo_server_binary=self.options['kumo-server-binary'],
kumo_server_ip=ip,
kumo_server_log=self.options['kumo-server-log'],
kumo_server_storage=os.path.join(self.options['data-directory'], "kumodb.tch"),
kumo_server_storage=kumo_server_storage,
kumo_manager_port=kumo_manager_port,
kumo_server_port=kumo_server_port,
kumo_server_listen_port=kumo_server_listen_port,
......
......@@ -34,9 +34,6 @@ from slapos.recipe.librecipe import filehash
class Recipe(GenericBaseRecipe):
def _options(self, options):
options['password'] = self.generatePassword()
def install(self):
path_list = []
......
......@@ -119,6 +119,7 @@ class Recipe(object):
self._raise_request_exception = None
self._raise_request_exception_formatted = None
self.instance = None
# Try to do the request and fetch parameter dict...
try:
self.instance = request(software_url, software_type,
name, partition_parameter_kw=partition_parameter_kw,
......@@ -126,24 +127,26 @@ class Recipe(object):
return_parameter_dict = self._getReturnParameterDict(self.instance,
return_parameters)
if not slave:
# XXX: convention: should be instance-guid
options['instance_guid'] = self.instance.getId()
try:
options['instance-guid'] = self.instance.getInstanceGuid()
# XXX: deprecated, to be removed
options['instance_guid'] = self.instance.getInstanceGuid()
except slapmodule.ResourceNotReady:
# Backward compatibility. Old SlapOS masters don't know this.
self.logger.warning("Impossible to fetch instance GUID.")
except (slapmodule.NotFoundError, slapmodule.ServerError, slapmodule.ResourceNotReady) as exc:
self._raise_request_exception = exc
self._raise_request_exception_formatted = traceback.format_exc()
return_parameter_dict = {}
# Then try to get all the parameters. In case of problem, put empty string.
for param in return_parameters:
options['connection-%s' % param] = ''
if not self.instance:
continue
try:
value = return_parameter_dict[param]
options['connection-%s' % param] = return_parameter_dict[param]
except KeyError:
value = ''
except (slapmodule.NotFoundError, slapmodule.ServerError, slapmodule.ResourceNotReady):
if self.failed is None:
self.failed = param
options['connection-%s' % param] = value
def _filterForStorage(self, partition_parameter_kw):
return partition_parameter_kw
......
......@@ -6,8 +6,18 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
run = $${:etc}/run
agentlog = $${buildout:directory}/var/log/agent
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
recipe = slapos.cookbook:agent
agent_binary = ${buildout:directory}/bin/agent
pidfile = $${directory:srv}/agent.pid
log = $${directory:agentlog}/agent.log
......@@ -21,11 +31,3 @@ default_max_install_duration = $${slap-parameter:default_max_install_duration}
default_max_uninstall_duration = $${slap-parameter:default_max_uninstall_duration}
default_max_request_duration = $${slap-parameter:default_max_request_duration}
default_max_destroy_duration = $${slap-parameter:default_max_destroy_duration}
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
run = $${:etc}/run
agentlog = $${buildout:directory}/var/log/agent
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
......@@ -12,52 +12,32 @@ parts =
template
template-agent
slapos.cookbook-repository
check-recipe
slapos.toolbox-repository
check-recipe-toolbox
instance-recipe-egg
check-recipe
slapos-cookbook
script
# Local development
[slapos.cookbook-repository]
recipe = plone.recipe.command
stop-on-error = true
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = agent
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone --branch ${:branch} --quiet http://git.erp5.org/repos/slapos.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
git-executable = ${git:location}/bin/git
[slapos.toolbox-repository]
recipe = plone.recipe.command
stop-on-error = true
branch = agent
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone --branch ${:branch} --quiet http://git.erp5.org/repos/slapos.toolbox.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.toolbox.git
branch = agent3
git-executable = ${git:location}/bin/git
[check-recipe-toolbox]
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
[instance-recipe]
# XXX-Cedric: it can use newest slapos.cfg to not have duplication
egg = slapos.cookbook
module = agent
[instance-recipe-egg]
# XXX-Cedric: it can use newest slapos.cfg to not have duplication
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
${instance-recipe:egg}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link;
grep parts ${buildout:develop-eggs-directory}/slapos.toolbox.egg-link
[template]
recipe = slapos.recipe.template
......@@ -70,7 +50,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-agent.cfg
output = ${buildout:directory}/template-agent.cfg
md5sum = fd9670d8473be402b10990398b553b00
md5sum = 7c5c43eb98d5a11961d72fce97a8e67b
mode = 0644
[script]
......
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
mysqld_binary = ${mariadb:location}/libexec/mysqld
\ No newline at end of file
This diff is collapsed.
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
downloadcache-workaround
extends =
../../stack/lamp.cfg
../../stack/shacache-client.cfg
../../stack/lamp/buildout.cfg
[application]
recipe = hexagonit.recipe.download
url = http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-2011-05-25a.tgz
md5sum = 6452eff54afa35e031e15fec9a737dd1
url = http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-2012-10-13.tgz
md5sum = a910ebb2fcca13c0337ed672304c4ad4
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = true
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/mysql.conf.php.in
md5sum = 11c6793aa8c5bf7151886d1670796a22
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs = ${instance-recipe:egg}
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True
\ No newline at end of file
[application-configuration]
location = conf/mysql.conf.php
\ No newline at end of file
?>
<h1 class="pageTitle"><span>Step <?php echo $current_step->getStepNumber() ?>:</span> System settings</h1>
<table class="formBlock">
<tr>
<th colspan="2">Database connection</th>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseType">Database type:</label></td>
<td>
<select name="config_form[database_type]" id="configFormDatabaseType">
<option value="mysql">MySQL</option>
<option value="pdo_mysql">PDO MySQL</option>
</select>
</td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseHost">Host name:</label></td>
<td><input type="text" name="config_form[database_host]" id="configFormDatabaseHost" value="%(mysql_ip)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseUser">Username:</label></td>
<td><input type="text" name="config_form[database_user]" id="configFormDatabaseUser" value="%(mysql_user)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabasePass">Password:</label></td>
<td><input type="password" name="config_form[database_pass]" id="configFormDatabasePass" value="%(mysql_password)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseName">Database name:</label></td>
<td><input type="text" name="config_form[database_name]" id="configFormDatabaseName" value="%(mysql_database)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabasePrefix">Table prefix:</label></td>
<td><input type="text" name="config_form[database_prefix]" id="configFormDatabasePrefix" value="<?php echo array_var($config_form_data, 'database_prefix', 'fo_') ?>" /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseEngine">Database engine:</label></td>
<td>
<select name="config_form[database_engine]" id="configFormDatabaseEngine">
<option value="InnoDB">InnoDB</option>
<option value="MyISAM">MyISAM</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<b>Note:</b> InnoDB engine is highly recommended. Use MyISAM only as a last resort, and at your own risk, if your database doesn't support InnoDB.<br /><br />
<b>Note:</b> If the database doesn't exist Feng Office will try to create it. However, if the database user you supply doesn't have permissions to create databases, you will have to manually create the database before you can continue.
</td>
</tr>
</table>
<table class="formBlock">
<tr>
<th colspan="2">Other settings</th>
</tr>
<tr>
<td class="optionLabel"><label for="configFormAbsoluteUrl">Absolute script URL:</label></td>
<td><input type="text" name="config_form[absolute_url]" id="configFormAbsoluteUrl" value="<?php echo array_var($config_form_data, 'absolute_url', $installation_url) ?>" /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormPlugins">Plugins to install:</label></td>
<td class="pluginOptions">
<?php include_once 'plugins.php' ;?>
</td>
</tr>
</table>
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = instance
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
mysqld_binary = ${mariadb:location}/libexec/mysqld
[buildout]
versions = versions
parts =
template
apache-php
mariadb
eggs
instance-recipe-egg
extends =
../../stack/lamp.cfg
../../stack/lamp/buildout.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://freefr.dl.sourceforge.net/project/opengoo/fengoffice/fengoffice_2.0.0/fengoffice_2.0.0.zip
md5sum = 2f673962ac377da7942ba8a09429ddbf
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple
url = http://freefr.dl.sourceforge.net/project/opengoo/fengoffice/fengoffice_2.2.3.1/fengoffice_2.2.3.1.zip
md5sum = f3b15616e1111f0114b084cdaa0dc3cd
strip-top-level-dir = false
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/config-form.php.in
md5sum = a32f1c8b14b8de2ecae40e71f710f384
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[instance-recipe-egg]
recipe = zc.recipe.egg
eggs =
${instance-recipe:egg}
\ No newline at end of file
[application-configuration]
location = public/install/installation/templates/system_config_form.php
\ No newline at end of file
<h1 class="pageTitle"><span>Step <?php echo $current_step->getStepNumber() ?>:</span> System settings</h1>
<table class="formBlock">
<tr>
<th colspan="2">Database connection</th>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseType">Database type:</label></td>
<td>
<select name="config_form[database_type]" id="configFormDatabaseType">
<option value="mysql">MySQL</option>
<option value="pdo_mysql">PDO MySQL</option>
</select>
</td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseHost">Host name:</label></td>
<td><input type="text" name="config_form[database_host]" id="configFormDatabaseHost" value="%(mysql_ip)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseUser">Username:</label></td>
<td><input type="text" name="config_form[database_user]" id="configFormDatabaseUser" value="%(mysql_user)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabasePass">Password:</label></td>
<td><input type="password" name="config_form[database_pass]" id="configFormDatabasePass" value="%(mysql_password)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseName">Database name:</label></td>
<td><input type="text" name="config_form[database_name]" id="configFormDatabaseName" value="%(mysql_database)s" readonly /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabasePrefix">Table prefix:</label></td>
<td><input type="text" name="config_form[database_prefix]" id="configFormDatabasePrefix" value="<?php echo array_var($config_form_data, 'database_prefix', 'og_') ?>" /></td>
</tr>
<tr>
<td class="optionLabel"><label for="configFormDatabaseEngine">Database engine:</label></td>
<td>
<select name="config_form[database_engine]" id="configFormDatabaseEngine">
<option value="InnoDB">InnoDB</option>
<option value="MyISAM">MyISAM</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<b>Note:</b> InnoDB engine is highly recommended. Use MyISAM only as a last resort, and at your own risk, if your database doesn't support InnoDB.<br /><br />
<b>Note:</b> If the database doesn't exist OpenGoo will try to create it. However, if the database user you supply doesn't have permissions to create databases, you will have to manually create the database before you can continue.
</td>
</tr>
</table>
<table class="formBlock">
<tr>
<th colspan="2">Other settings</th>
</tr>
<tr>
<td class="optionLabel"><label for="configFormAbsoluteUrl">Absolute script URL:</label></td>
<td><input type="text" name="config_form[absolute_url]" id="configFormAbsoluteUrl" value="<?php echo array_var($config_form_data, 'absolute_url', $installation_url) ?>" /></td>
</tr>
</table>
\ No newline at end of file
[buildout]
extends =
../../stack/lamp/buildout.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = http://heanet.dl.sourceforge.net/project/opengoo/opengoo/opengoo_1.6/opengoo_1.6.zip
md5sum = 79ddfc24f01bc843a8275463e63e96b0
strip-top-level-dir = true
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/config-form.php.in
md5sum = 5d6ee1a23e1a5e762412a4867095b9e1
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = public/install/installation/templates/system_config_form.php
\ No newline at end of file
......@@ -49,6 +49,7 @@ environment = environment
[environment]
CPPFLAGS = -I${python2.7:location}/include/python2.7 -I${libxml2:location}/include -I${libxslt:location}/include
LDFLAGS = -L${python2.7:location}/lib -L${libxml2:location}/lib -L${libxslt:location}/lib -L${libxslt:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${python2.7:location}/lib -Wl,-rpath=${libxml2:location}/lib -Wl,-rpath=${libxslt:location}/lib -Wl,-rpath=${zlib:location}/lib
LD_LIBRARY_PATH = ${python2.7:location}/lib:${libxml2:location}/lib:${libxslt:location}/lib:${libxslt:location}/lib:${zlib:location}/lib
PYTHONPATH = ${python-setuptools:location}
[sh-environment]
......
......@@ -61,7 +61,7 @@ branch = master
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 47f5a8cf4d134a35b7f36a7442e5798a
md5sum = 1dba62d737ef76dfac50febd61357041
output = ${buildout:directory}/template.cfg
mode = 640
......
......@@ -40,7 +40,6 @@ extends =
../../component/lxml-python/buildout.cfg
../../component/percona-toolkit/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/memcached/buildout.cfg
../../component/mysql-python/buildout.cfg
../../component/pil-python/buildout.cfg
../../component/pycrypto-python/buildout.cfg
......@@ -74,7 +73,6 @@ parts =
apache-antiloris
file
graphviz
memcached
haproxy
varnish-3.0
w3m
......@@ -203,7 +201,7 @@ mode = 640
[template-kumofs]
< = template-jinja2-base
filename = instance-kumofs.cfg
md5sum = 7e13d689de7163dcab64e8df4711cdd7
md5sum = 90a321be12ee977800d590bf941021ef
extra-context =
key dash_location dash:location
key dcron_location dcron:location
......@@ -291,10 +289,13 @@ extra-context =
[template-memcached]
< = template-jinja2-base
filename = instance-memcached.cfg
md5sum = 44c507e9eec1003beb99f9063b5e09be
md5sum = 2de1801236eb78651ecfd50ada46dd3b
extra-context =
key dash_location dash:location
key memcached_location memcached: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
......
......@@ -118,22 +118,25 @@ command = ${logrotate:wrapper}
# Deploy zope promises scripts
[promise-template]
recipe = slapos.cookbook:check_port_listening
path = ${basedirectory:promise}/kumofs
hostname = ${kumofs-instance:ip}
port = ${kumofs-instance:server-listen-port}
[promise-kumofs-server]
<= promise-template
path = ${basedirectory:promise}/kumofs-server
port = ${kumofs-instance:server-port}
[promise-kumofs-server-listen]
<= promise-template
path = ${basedirectory:promise}/kumofs-server-listen
port = ${kumofs-instance:server-listen-port}
[promise-kumofs-gateway]
<= promise-template
path = ${basedirectory:promise}/kumofs-gateway
port = ${kumofs-instance:gateway-port}
[promise-kumofs-manager]
<= promise-template
path = ${basedirectory:promise}/kumofs-manager
port = ${kumofs-instance:manager-port}
#############################
#
# Instanciate memcached
#
# No slapos parameter needed
#
#############################
# memcached-compatible volatile cache using kumofs
# that has no limitation for key length and data size
[buildout]
parts =
memcached-instance
publish-memcached-connection-information
promise
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 = 13101
server-port = 13201
server-listen-port = 13202
# 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}
backup = ${directory:logrotate-backup}
state-file = ${rootdirectory:srv}/logrotate.status
[basedirectory]
recipe = slapos.cookbook:mkdirectory
log = ${rootdirectory:var}/log
services = ${rootdirectory:etc}/run
promise = ${rootdirectory:etc}/promise
run = ${rootdirectory:var}/run
backup = ${rootdirectory:srv}/backup
[directory]
recipe = slapos.cookbook:mkdirectory
cron-entries = ${rootdirectory:etc}/cron.d
crontabs = ${rootdirectory:etc}/crontabs
cronstamps = ${rootdirectory:etc}/cronstamps
logrotate-backup = ${basedirectory:backup}/logrotate
logrotate-entries = ${rootdirectory:etc}/logrotate.d
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
var = ${buildout:directory}/var
srv = ${buildout:directory}/srv
bin = ${buildout:directory}/bin
service = ${:etc}/run
promise = ${:etc}/promise
[memcached-instance]
recipe = slapos.cookbook:generic.memcached
wrapper_path = ${directory:service}/memcached
binary_path = {{ memcached_location }}/bin/memcached
shell-path = {{ dash_location }}/bin/dash
ip = ${slap-network-information:local-ipv4}
port = 11000
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = {{ dcron_location }}/sbin/crond
cron-entries = ${directory:cron-entries}
crontabs = ${directory:crontabs}
cronstamps = ${directory:cronstamps}
catcher = ${cron-simplelogger:wrapper}
binary = ${basedirectory:services}/crond
[publish-memcached-connection-information]
recipe = slapos.cookbook:publishurl
url = memcached://${memcached-instance:ip}:${memcached-instance:port}/
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = ${rootdirectory:bin}/cron_simplelogger
log = ${basedirectory:log}/cron.log
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = ${logrotate:wrapper}
# Deploy zope promises scripts
[promise]
[promise-template]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promise}/memcache
hostname = ${memcached-instance:ip}
port = ${memcached-instance:port}
hostname = ${kumofs-instance:ip}
port = ${kumofs-instance:server-listen-port}
[promise-kumofs-server]
<= promise-template
path = ${basedirectory:promise}/kumofs-server
port = ${kumofs-instance:server-port}
[promise-kumofs-server-listen]
<= promise-template
path = ${basedirectory:promise}/kumofs-server-listen
port = ${kumofs-instance:server-listen-port}
[promise-kumofs-gateway]
<= promise-template
path = ${basedirectory:promise}/kumofs-gateway
port = ${kumofs-instance:gateway-port}
[promise-kumofs-manager]
<= promise-template
path = ${basedirectory:promise}/kumofs-manager
port = ${kumofs-instance:manager-port}
......@@ -23,9 +23,6 @@ parts +=
cron
cron-entry-logrotate
promise
slapmonitor
slapmonitor-xml
frontend-promise
content-promise
publish-connection-informations
......
......@@ -9,8 +9,6 @@ parts =
cron
cron-entry-logrotate
promise
slapmonitor
slapmonitor-xml
frontend-promise
content-promise
......@@ -121,7 +119,7 @@ stunnel-binary = ${stunnel:location}/bin/stunnel
remote-host = $${mariadb-urlparse:host}
remote-port = $${mariadb-urlparse:port}
local-host = $${slap-network-information:local-ipv4}
local-port = 33060
local-port = 3306
log-file = $${basedirectory:log}/stunnel.log
config-file = $${directory:stunnel-conf}/stunnel.conf
key-file = $${directory:stunnel-conf}/stunnel.key
......@@ -249,18 +247,18 @@ config-custom_domain = $${slap-parameter:domain}
#--
#-- Deploy slapmonitor.
[slapmonitor]
recipe = slapos.cookbook:slapmonitor
pid-file = $${basedirectory:run}/apache.pid
database-path = $${basedirectory:log}/slapmonitor.db
slapmonitor-path = ${buildout:bin-directory}/slapmonitor
path = $${basedirectory:services}/slapmonitor
[slapmonitor-xml]
recipe = slapos.cookbook:slapmonitor-xml
database-path = $${basedirectory:log}/slapmonitor.db
slapmonitor-xml-path = ${buildout:bin-directory}/slapmonitor-xml
path = $${directory:report}/slapmonitor-xml
#[slapmonitor]
#recipe = slapos.cookbook:slapmonitor
#pid-file = $${basedirectory:run}/apache.pid
#database-path = $${basedirectory:log}/slapmonitor.db
#slapmonitor-path = ${buildout:bin-directory}/slapmonitor
#path = $${basedirectory:services}/slapmonitor
#
#[slapmonitor-xml]
#recipe = slapos.cookbook:slapmonitor-xml
#database-path = $${basedirectory:log}/slapmonitor.db
#slapmonitor-xml-path = ${buildout:bin-directory}/slapmonitor-xml
#path = $${directory:report}/slapmonitor-xml
#----------------
......
......@@ -74,7 +74,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in
output = ${buildout:directory}/instance-apache-php.cfg
md5sum = 0538b05d27d8a64e89f898c09eb57716
md5sum = af0d52de4c10d5a3a64f7c92283ad959
mode = 0644
[instance-apache-import]
......@@ -95,7 +95,7 @@ context = key templateapache instance-apache-php:output
import-list = file parts template-parts:destination
file replicated template-replicated:destination
md5sum = 2dc6134621b8a12817d43a979b84089a
md5sum = 4704f2788f096c7494694db72a9f6193
mode = 0644
[instance-resilient]
......@@ -117,7 +117,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb.cfg.in
output = ${buildout:directory}/instance-mariadb.cfg
md5sum = b214f56ede1a9d10f243c245c804d3a5
md5sum = c328d11f76373f8c5928afedf2178afd
mode = 0644
[instance-mariadb-import]
......@@ -310,6 +310,8 @@ slapos.recipe.template = 2.4.2
slapos.toolbox = 0.33
smmap = 0.8.2
plone.recipe.command = 1.1
# Required by:
# slapos.core==0.35.1
# slapos.toolbox==0.33
......
......@@ -194,7 +194,8 @@ recipe = slapos.cookbook:mysql
# Options
recovering = false
user = user
port = 3306
password = $${mysql-password:passwd}
port = 33060
ip = $${slap-network-information:local-ipv4}
database = db
......@@ -216,6 +217,11 @@ mysql-install-binary = ${mariadb:location}/scripts/mysql_install_db
mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
mysqld-binary = ${mariadb:location}/bin/mysqld
[mysql-password]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:etc}/.passwd
bytes = 4
#----------------
#--
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment