Commit 82c1b54f authored by Łukasz Nowak's avatar Łukasz Nowak

- stabilise mysql instance profile

development.cfg:
 - define mysql_datadir for development profile
official.cfg:
 - globally define used mysql software component in official profile
mysql-tritonn-5.0-instance/buildout.cfg:
 - fix copy and paste issue with mysql_install_db
 - use profile configuration to access files produced by software component
 - made options less verbose

mysql-tritonn-5.0-instance/templates/mysqladmin.in:
mysql-tritonn-5.0-instance/templates/mysql.in:
 - use profile configuration to choose software component


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31902 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ef799508
[buildout] [buildout]
extends = official.cfg extends = official.cfg
mysql_datadir = ${buildout:directory}/var/mysql
parts += parts +=
mysql-instance mysql-instance
......
...@@ -33,15 +33,15 @@ output = ${buildout:directory}/bin/mysql ...@@ -33,15 +33,15 @@ output = ${buildout:directory}/bin/mysql
[mysql-admin] [mysql-admin]
recipe = collective.recipe.template recipe = collective.recipe.template
input = ${buildout:directory}/mysql-tritonn-5.0-instance/templates/mysqladmin.in input = ${buildout:directory}/mysql-tritonn-5.0-instance/templates/mysqladmin.in
output = ${buildout:directory}/bin/mysqladmin[mysql_install_db] output = ${buildout:directory}/bin/mysqladmin
[mysql_install_db] [mysql_install_db]
recipe = plone.recipe.command recipe = plone.recipe.command
command = command =
${mysql-tritonn-5.0:location}/parts/bin/mysql_install_db --datadir=${mycnf:datadir} ${buildout:mysql_software}/bin/mysql_install_db --datadir=${mycnf:datadir}
echo echo
echo After starting supervisord, you may want to run: echo After starting supervisord, you may want to run:
echo ${buildout:directory}/parts/mysql/bin/mysqladmin -u root password 'new-password' echo ${buildout:directory}/bin/mysqladmin -u root password 'new-password'
echo echo
update-command = ${mysql_install_db:command} update-command = ${mysql_install_db:command}
...@@ -49,14 +49,15 @@ update-command = ${mysql_install_db:command} ...@@ -49,14 +49,15 @@ update-command = ${mysql_install_db:command}
recipe = plone.recipe.command recipe = plone.recipe.command
command = command =
echo echo
echo These options are passed to mysqld_safe: ${mycnf:opt} echo These options are passed to mysqld_safe: ${:opt}
echo echo
basedir=${mysql-tritonn-5.0:location} basedir=${buildout:mysql_software}
datadir=${buildout:directory}/var datadir=${buildout:mysql_datadir}
pid=${mycnf:datadir}/mysql.pid # files shall be in better places
err = ${mycnf:datadir}/log/mysql.err pid=${:datadir}/mysql.pid
sock = ${mycnf:datadir}/mysql.sock err = ${buildout:directory}/mysql.err.log
opt = --port=${ports:mysql} --pid-file=${mycnf:pid} --log-error=${mycnf:err} --basedir=${mycnf:basedir} --datadir=${mycnf:datadir} --socket=${mycnf:sock} sock = ${:datadir}/mysql.sock
opt = --port=${ports:mysql} --pid-file=${:pid} --log-error=${:err} --basedir=${:basedir} --datadir=${:datadir} --socket=${:sock}
[pidproxy] [pidproxy]
# this should've been provided by collective.recipe.supervisor itself # this should've been provided by collective.recipe.supervisor itself
...@@ -70,5 +71,5 @@ port = ${ports:supervisor} ...@@ -70,5 +71,5 @@ port = ${ports:supervisor}
serverurl = http://127.0.0.1:${ports:supervisor} serverurl = http://127.0.0.1:${ports:supervisor}
pp = ${buildout:directory}/eggs/supervisor-3.0a7-py2.5.egg/supervisor/pidproxy.py pp = ${buildout:directory}/eggs/supervisor-3.0a7-py2.5.egg/supervisor/pidproxy.py
programs = programs =
10 mysql ${buildout:bin-directory}/pidproxy [ ${mycnf:pid} ${mysql-tritonn-5.0:location}/bin/mysqld_safe ${mycnf:opt} ] 10 mysql ${buildout:bin-directory}/pidproxy [ ${mycnf:pid} ${buildout:mysql_software}/bin/mysqld_safe ${mycnf:opt} ]
#!/bin/sh #!/bin/sh
${mysql-tritonn-5.0:location}/bin/mysql -P ${ports:mysql} -S ${mycnf:sock} -u root -p $* ${buildout:mysql_software}/bin/mysql -P ${ports:mysql} -S ${mycnf:sock} -u root -p $*
#!/bin/sh #!/bin/sh
${mysql-tritonn-5.0:location}/bin/mysqladmin -P ${ports:mysql} -S ${mycnf:sock} -u root -p $* ${buildout:mysql_software}/bin/mysqladmin -P ${ports:mysql} -S ${mycnf:sock} -u root -p $*
...@@ -27,3 +27,6 @@ parts = ...@@ -27,3 +27,6 @@ parts =
openoffice openoffice
erp5-bt5 erp5-bt5
erp5-products erp5-products
# XXX: shall be moved to mysql software buildout
mysql_software = ${mysql-tritonn-5.0:location}
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