Commit 30862e97 authored by Łukasz Nowak's avatar Łukasz Nowak

Include erp5 update and binary linking.

Also use directly parameters instead of json.

Json would require in-code parsing, which would lead to complex recipes.
parent 81113478
......@@ -25,7 +25,6 @@
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
import json
import pkg_resources
class Recipe(GenericBaseRecipe):
......@@ -36,8 +35,7 @@ class Recipe(GenericBaseRecipe):
backend = self.options['backend']
key = self.options['key-file']
certificate = self.options['cert-file']
access_control_string = json.loads(self.options['json'])[
'access-control-string']
access_control_string = self.options['access-control-string']
apache_conf = dict()
apache_conf['pid_file'] = self.options['pid-file']
apache_conf['lock_file'] = self.options['lock-file']
......
......@@ -6,34 +6,37 @@
[buildout]
extends = ${template-zope:output}
parts =
parts +=
request-mariadb
request-cloudooo
request-memcached
request-kumofs
basedirectory
certificate-authority
publish-apache-zope-backend-connection-string
zope-instance
apache-zope-backend-instance
ca-apache-zope-backend
logrotate
logrotate-entry-zope
cron
cron-entry-logrotate
erp5-update
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
# support those parameters
#config = json mysql-url memcached-url cloudooo-url kumofs-url
#config-json = $${slap-parameter:json}
#config-mysql-url = $${request-mariadb:connection-url}
#config-memcached-url = $${request-memcached:connection-url}
#config-cloudooo-url = $${request-cloudooo:connection-url}
#config-kumofs-url = $${request-kumofs:connection-url}
[erp5-update]
recipe = slapos.cookbook:erp5.update
# Configuration
url = http://$${zope-instance:user}:$${zope-instances:password}@$${zope-instances:ip}:$${zope-instances:port}/
mysql-url = $${request-mariadb:connection-url}
kumofs-url = $${request-kumofs:connection-url}
memcached-url = $${request-memcached:connection-url}
cloudooo-url = $${request-cloudooo:connection-url}
site-id = $${slap-parameter:site-id}
openssl-binary = ${openssl:location}/bin/openssl
cadir-path = $${erp5-certificate-authority:ca-dir}
# Paths
update-wrapper = $${basedirectory:services}/erp5-update
# Defaults
configurator-bt5-list = erp5_core_proxy_field_legacy erp5_full_text_myisam_catalog erp5_base erp5_workflow erp5_configurator erp5_configurator_standard erp5_configurator_maxma_demo erp5_configurator_ung
bt5-repository-list = $${zope-instance:bt5-repository-list}
[request-common]
recipe = slapos.cookbook:request
software-url = $${slap-connection:software-release-url}
......
......@@ -9,6 +9,7 @@ parts =
logrotate-entry-zope
cron
cron-entry-logrotate
binary-link
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -28,7 +29,7 @@ wrapper = $${rootdirectory:bin}/apache
key-file = $${directory:apache-conf}/apache.key
cert-file = $${directory:apache-conf}/apache.crt
configuration-file = $${directory:apache-conf}/apache.conf
json = $${slap-parameter:json}
access-control-string = $${slap-parameter:access-control-string}
pid-file = $${basedirectory:run}/apache.pid
lock-file = $${basedirectory:run}/apache.lock
error-log = $${basedirectory:log}/apache-error.log
......@@ -137,6 +138,30 @@ name = logrotate
frequency = 0 0 * * *
command = $${logrotate:wrapper}
[binary-link]
recipe = slapos.cookbook:symbolic.link
target-directory = $${rootdirectory:bin}
link-binary =
${coreutils:location}/bin/basename
${coreutils:location}/bin/cat
${coreutils:location}/bin/cp
${coreutils:location}/bin/ls
${coreutils:location}/bin/tr
${coreutils:location}/bin/uname
${git:location}/bin/git
${graphviz:location}/bin/dot
${grep:location}/bin/grep
${imagemagick:location}/bin/convert
${imagemagick:location}/bin/identify
${mariadb:location}/bin/mysql
${mariadb:location}/bin/mysqldump
${pdftk:location}/bin/pdftk
${sed:location}/bin/sed
${tesseract:location}/bin/tesseract
${w3m:location}/bin/w3m
${poppler:location}/bin/pdfinfo
${poppler:location}/bin/pdftotext
${poppler:location}/bin/pdftohtml
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl
......
......@@ -25,7 +25,7 @@ mode = 0644
[template-zope]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-zope.cfg
md5sum = 9cbd477e7f4fa12a43de6d109b477969
md5sum = a4ad2f86e25a9b4bbad81d4a3aa3a044
output = ${buildout:directory}/template-zope.cfg
mode = 0644
......@@ -60,7 +60,7 @@ mode = 0644
[template-erp5-development]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-erp5-development.cfg
md5sum = a393e0b5ad3623b280e159006a60f19f
md5sum = ca653d75d6c554558ad0d0af5e54455a
output = ${buildout:directory}/template-erp5-development.cfg
mode = 0644
......
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