buildout.cfg 2.16 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
# This is data only part of buildout for mysql with senna
# made by Leonardo Rochael Almeida <leorochael@gmail.com> (thanks!)
# Original place: https://svn.erp5.org/repos/public/experimental/mysqlsenna.buildout/

[buildout]
parts =
    ports
    env
    mysql-bin
    mysql-admin
    mysql_install_db
    mycnf
    supervisor
    pidproxy

[ports]
recipe = plone.recipe.command
command = 
    echo The following configuration items are active for this buildout
    echo Supervisor: ${:supervisor}
    echo MySQL: ${:mysql}
supervisor = 10000
mysql = 10002

[env]
recipe = gocept.recipe.env

[mysql-bin]
recipe = collective.recipe.template
input = ${buildout:directory}/mysql-tritonn-5.0-instance/templates/mysql.in
output = ${buildout:directory}/bin/mysql

[mysql-admin]
recipe = collective.recipe.template
input = ${buildout:directory}/mysql-tritonn-5.0-instance/templates/mysqladmin.in
36
output = ${buildout:directory}/bin/mysqladmin
37 38 39 40

[mysql_install_db]
recipe = plone.recipe.command
command = 
41
    ${buildout:mysql_software}/bin/mysql_install_db --datadir=${mycnf:datadir}
42 43
    echo 
    echo After starting supervisord, you may want to run:
44
    echo ${buildout:directory}/bin/mysqladmin -u root password 'new-password'
45 46 47 48 49 50 51
    echo
update-command = ${mysql_install_db:command}

[mycnf]
recipe = plone.recipe.command
command =
    echo
52
    echo These options are passed to mysqld_safe: ${:opt}
53
    echo
54 55 56 57 58 59 60
basedir=${buildout:mysql_software}
datadir=${buildout:mysql_datadir}
# files shall be in better places
pid=${:datadir}/mysql.pid
err = ${buildout:directory}/mysql.err.log
sock = ${:datadir}/mysql.sock
opt = --port=${ports:mysql} --pid-file=${:pid} --log-error=${:err} --basedir=${:basedir} --datadir=${:datadir} --socket=${:sock}
61 62 63 64 65 66 67 68 69 70 71 72 73

[pidproxy]
# this should've been provided by collective.recipe.supervisor itself
recipe = zc.recipe.egg
eggs = supervisor
scripts = pidproxy

[supervisor]
recipe = collective.recipe.supervisor
port = ${ports:supervisor}
serverurl = http://127.0.0.1:${ports:supervisor}
pp = ${buildout:directory}/eggs/supervisor-3.0a7-py2.5.egg/supervisor/pidproxy.py
programs =
74
    10 mysql ${buildout:bin-directory}/pidproxy [ ${mycnf:pid} ${buildout:mysql_software}/bin/mysqld_safe ${mycnf:opt} ]
75