Commit 2cc2b283 authored by Saurabh's avatar Saurabh Committed by Julien Muchembled

NEO: make it possible to choose TokuDB engine

parent 61929809
......@@ -76,11 +76,15 @@ class Storage(NeoBaseRecipe):
_binding_port_mandatory = False
def _getOptionList(self):
return [
r = [
'-d', self.options['database-parameters'],
'-a', self.options['database-adapter'],
'-w', self.options['wait-database'],
]
engine = self.options.get('engine')
if engine: # old versions of NEO don't support -e
r += '-e', engine
return r
class Admin(NeoBaseRecipe):
def _getOptionList(self):
......
......@@ -47,3 +47,5 @@ One can specify following parameters in each of the dictionary.
* 'mysql': Dictionary containing configuration options for MySQL.
* 'engine': Configures storage engine,
currently only InnoDB and TokuDB are supported.
......@@ -59,6 +59,7 @@ cluster = {{ dumps(slapparameter_dict['cluster']) }}
masters = ${publish:masters}
database-adapter = MySQL
wait-database = 60
engine = {{ slapparameter_dict.get('engine', '') }}
[logrotate-storage]
recipe = slapos.cookbook:logrotate.d
......
......@@ -14,6 +14,9 @@ init_file = {{ parameter_dict['init-file'] }}
log_warnings = 1
disable-log-bin
### Enables TokuDB
plugin-load = ha_tokudb
## The following settings come from ERP5 configuration.
max_allowed_packet = 128M
......
......@@ -55,12 +55,12 @@ md5sum = 9563ce56676bf9ae5e77fe12e9020289
[instance-neo-storage-mysql]
< = cluster
md5sum = 5f671be9b78c71718a964120a6494c7c
md5sum = 6ad04cea50d2de97079cbbf2c73cd5d1
[template-my-cnf]
< = cluster
url = ${:_profile_base_location_}/my.cnf.in
md5sum = b8d0c0a6f7a7fe46c8c2f916ee6edced
md5sum = febd3ed58043ce1367b86cf6e4e69700
[template]
recipe = slapos.recipe.template:jinja2
......
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