diff --git a/slapos/recipe/neoppod.py b/slapos/recipe/neoppod.py index 429be89ea81ac3a40238c768adf1df85e6e36341..f7c8a9d787539e0135a631a32386b0980a123eff 100644 --- a/slapos/recipe/neoppod.py +++ b/slapos/recipe/neoppod.py @@ -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): diff --git a/software/neoppod/README.txt b/software/neoppod/README.txt index c537cade166bc5c2d30cdf4f8bb6c216e51cdaa1..dc1cee675351083cbd5096ba7ab79aa62eb937cd 100644 --- a/software/neoppod/README.txt +++ b/software/neoppod/README.txt @@ -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. diff --git a/software/neoppod/instance-neo-storage-mysql.cfg.in b/software/neoppod/instance-neo-storage-mysql.cfg.in index 3d6ddc281c8dfdc3b13bdc1a8a77a188b1f47239..3e3a67a6d211f62403aa658891566a79f5508fc5 100644 --- a/software/neoppod/instance-neo-storage-mysql.cfg.in +++ b/software/neoppod/instance-neo-storage-mysql.cfg.in @@ -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 diff --git a/software/neoppod/my.cnf.in b/software/neoppod/my.cnf.in index 0a434660cb6c2a59d3fbc87b54225c9670cb49fd..858e52bbd8cda2a7625d1c39a4ef8c336b619a32 100644 --- a/software/neoppod/my.cnf.in +++ b/software/neoppod/my.cnf.in @@ -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 diff --git a/software/neoppod/software.cfg b/software/neoppod/software.cfg index d5be2166507dcdf7db5037f0f9a9a7c7d239d118..f98a73b30618969842ff92f01b41d66a77437b14 100644 --- a/software/neoppod/software.cfg +++ b/software/neoppod/software.cfg @@ -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