software-common.cfg 4 KB
Newer Older
1 2 3 4 5 6 7 8
# Note on LXML/END LXML: they delimit areas where lxml magic is needed. lxml is
# a slapos.cookbook dependency, so it should be fetched automatically. But when
# automatically fetched, it gets built against system headers/libs, which is
# forbidden in slapos. So we need to fetch lxml explicitly so it is properly
# built.

[buildout]
extends =
9
    buildout.hash.cfg
10
    ../../stack/slapos.cfg
11
    ../../stack/logrotate/buildout.cfg
12
    ../../stack/monitor/buildout.cfg
13
    ../../component/cython-zstd/buildout.cfg
14 15 16
#LXML
    ../../component/lxml-python/buildout.cfg
#END LXML
17
    ../../component/msgpack-python/buildout.cfg
18
    ../../component/python-mysqlclient/buildout.cfg
19
    ../../component/python-cryptography/buildout.cfg
20
    ../../component/pycurl/buildout.cfg
Julien Muchembled's avatar
Julien Muchembled committed
21
    ../../component/yappi/buildout.cfg
22
    ../../component/ZODB/buildout.cfg
23
    ../../component/ZEO/buildout.cfg
24
    ../../component/zodbtools/buildout.cfg
25 26

parts =
27
# keep neoppod first so that ZODB is built correctly,
28
# before any other section that would depend on it
29
    neoppod-develop
30
    neoppod
31 32
    slapos-cookbook

33 34
[neoppod-repository]
recipe = slapos.recipe.build:gitclone
35
repository = https://lab.nexedi.com/nexedi/neoppod.git
36 37
git-executable = ${git:location}/bin/git

38 39 40
[neoppod-setup-env]
PATH = ${git:location}/bin:%(PATH)s

41 42 43
[neoppod-develop]
recipe = zc.recipe.egg:develop
setup = ${neoppod-repository:location}
44
environment = neoppod-setup-env
45 46 47

[neoppod]
recipe = zc.recipe.egg
48
eggs = neoppod[admin, ctl, master]
49
  ${cython-zstd:egg}
50
  ${msgpack-python:egg}
51
  ${:adapter-egg}
Julien Muchembled's avatar
Julien Muchembled committed
52
  ${yappi:egg}
53 54
  ${ZODB:egg}
  ${zodbtools:egg}
55 56
  psutil
  zope.testing
57
  coverage
58
  setproctitle
59
  mock
60
  Pympler
61 62 63
adapter-egg =
  ${python-mysqlclient:egg}
  PyMySQL
64

65 66
[download-base-neo]
recipe = slapos.recipe.build:download
67
url = ${:_profile_base_location_}/${:filename}
68 69 70 71

# XXX: must be rendered, not just dled
[instance-common]
recipe = slapos.recipe.template:jinja2
72 73
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:_buildout_section_name_}.cfg
74 75 76 77 78 79
context =
    key bin_directory buildout:bin-directory
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    key neo_admin instance-neo-admin:target
    key neo_master instance-neo-master:target
80
    key neo instance-neo:target
81 82
    key template_logrotate_base template-logrotate-base:output
    key template_monitor monitor2-template:output
83
    key sqlite3_location sqlite3:location
84 85 86
    ${:adapter-context}
adapter-context =
    key mariadb_location mariadb:location
87
    key template_mysqld_wrapper template-mysqld-wrapper:output
88 89 90 91 92 93 94 95 96 97 98
    key template_neo_my_cnf template-neo-my-cnf:target

[root-common]
<= download-base-neo

[instance-neo-admin]
<= download-base-neo

[instance-neo-master]
<= download-base-neo

99
[instance-neo]
100 101 102 103 104
<= download-base-neo

[template-neo-my-cnf]
<= download-base-neo

105
[template-mysqld-wrapper]
106 107 108 109
recipe = slapos.recipe.template
output = ${buildout:parts-directory}/${:_buildout_section_name_}/mysqld.in
inline =
  #!/bin/sh -e
110
  basedir='${mariadb:location}'
111
  datadir='{{datadir}}'
112 113 114 115
  marker=$datadir/.slapos_initializing
  [ -d "$datadir/mysql" ] && [ ! -f "$marker" ] || {
    find "$datadir/" -mindepth 1 ! -path $marker -delete || mkdir "$datadir"
    touch "$marker"
116
    "$basedir/scripts/mysql_install_db" \
117 118
      --defaults-file='{{defaults_file}}' \
      --skip-name-resolve \
119
      --auth-root-authentication-method=normal \
120
      --basedir="$basedir" --plugin_dir="$basedir/lib/plugin" \
121
      --datadir="$datadir"
122 123 124
  {%- if initialisation is defined and initialisation %}
    {{ initialisation | indent(2) }}
  {%- endif %}
125
    rm "$marker"
126
  }
127 128 129 130 131
  {%- if environ is defined %}
  {%-   for variable in environ.splitlines() %}
  {{ variable }} \
  {%-   endfor %}
  {%- endif %}
132
  exec "$basedir/bin/mysqld" --defaults-file='{{defaults_file}}' "$@"
133

134
[versions]
135
coverage = 7.5.1
136
ecdsa = 0.13
137
mysqlclient = 2.0.1
138
PyMySQL = 0.10.1
Rafael Monnerat's avatar
Rafael Monnerat committed
139
cython-zstd = 0.2
140
funcsigs = 1.0.2
141
Pympler = 1.0.1
142 143 144 145 146

[versions:python2]
coverage = 5.5
mysqlclient = 1.3.12
pycrypto = 2.6.1
147
Pympler = 0.9