Commit 1dac21bd authored by Marco Mariani's avatar Marco Mariani

abilian: add and test production conf template

parent 950194ca
...@@ -12,7 +12,7 @@ PGUSER=postgres ...@@ -12,7 +12,7 @@ PGUSER=postgres
ABILIAN_CONFIG=${abilian-config:location}/${abilian-config:filename} ABILIAN_CONFIG=${abilian-config:location}/${abilian-config:filename}
EXTRANET_INSTANCE_PATH=$${directories:extranet_spr-instance} EXTRANET_INSTANCE_PATH=$${directories:extranet_spr-instance}
EXTRANET_INSTANCE_HOST=$${instance-parameters:ipv6-random} EXTRANET_INSTANCE_HOST=$${instance-parameters:ipv6-random}
ABILIAN_CONFIG_EXTRA_PYTHON=$${config-staging-py:rendered} ABILIAN_CONFIG_EXTRA_PYTHON=$${config-production-py:rendered}
ABILIAN_CONFIG_EXTRA_JSON=$${json-extra-configuration:json-output}:$${buildout:directory}/partition-parameters.json ABILIAN_CONFIG_EXTRA_JSON=$${json-extra-configuration:json-output}:$${buildout:directory}/partition-parameters.json
LD_LIBRARY_PATH=${cairo:location}/lib:${glib:location}/lib:${pango:location}/lib:${cups:location}/lib:${dbus:location}/lib:${dbus-glib:location}/lib:${fontconfig:location}/lib LD_LIBRARY_PATH=${cairo:location}/lib:${glib:location}/lib:${pango:location}/lib:${cups:location}/lib:${dbus:location}/lib:${dbus-glib:location}/lib:${fontconfig:location}/lib
# abilian/services/conversion.py does not like it, if PATH does not exist # abilian/services/conversion.py does not like it, if PATH does not exist
......
...@@ -5,6 +5,7 @@ parts = ...@@ -5,6 +5,7 @@ parts =
extranet-service extranet-service
extranet-promise extranet-promise
config-staging-py config-staging-py
config-production-py
csrf-secret-key csrf-secret-key
...@@ -32,6 +33,10 @@ template = inline: ...@@ -32,6 +33,10 @@ template = inline:
echo "Configuration file $${config-staging-py:rendered} does not exist (yet?)" >&2 echo "Configuration file $${config-staging-py:rendered} does not exist (yet?)" >&2
exit 30 exit 30
} }
[ -f "$${config-production-py:rendered}" ] || {
echo "Configuration file $${config-production-py:rendered} does not exist (yet?)" >&2
exit 40
}
exec {{abilian}} run exec {{abilian}} run
rendered = $${directories:services}/abilian-start rendered = $${directories:services}/abilian-start
mode = 700 mode = 700
...@@ -40,7 +45,6 @@ context = ...@@ -40,7 +45,6 @@ context =
raw abilian ${buildout:directory}/bin/abilian raw abilian ${buildout:directory}/bin/abilian
[extranet-promise] [extranet-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
path = $${directories:promises}/extranet path = $${directories:promises}/extranet
...@@ -57,6 +61,14 @@ mode = 600 ...@@ -57,6 +61,14 @@ mode = 600
# section config config-staging # section config config-staging
[config-production-py]
recipe = slapos.recipe.template:jinja2
template = ${config-production-py-template:location}/${config-production-py-template:filename}
rendered = $${buildout:directory}/etc/production.py
mode = 600
[csrf-secret-key] [csrf-secret-key]
recipe = slapos.cookbook:generate.password recipe = slapos.cookbook:generate.password
#no need to write other than in the json parameter file #no need to write other than in the json parameter file
......
...@@ -63,6 +63,7 @@ parts = ...@@ -63,6 +63,7 @@ parts =
instance-postgres instance-postgres
instance-redis instance-redis
config-staging-py-template config-staging-py-template
config-production-py-template
abilian-config abilian-config
...@@ -249,14 +250,14 @@ mode = 0644 ...@@ -249,14 +250,14 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-extranet.cfg.in url = ${:_profile_base_location_}/instance-extranet.cfg.in
output = ${buildout:directory}/instance-extranet.cfg output = ${buildout:directory}/instance-extranet.cfg
md5sum = c4e4727a36c5552631e50f98c4079344 md5sum = d39a2a7348866130ef4c63857e0f2945
mode = 0644 mode = 0644
[instance-environment] [instance-environment]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-environment.cfg.in url = ${:_profile_base_location_}/instance-environment.cfg.in
output = ${buildout:directory}/instance-environment.cfg output = ${buildout:directory}/instance-environment.cfg
md5sum = 25ba374fe46091e25d1bc8197feb8f53 md5sum = a595fecd06cd4d4f806fddb7f686e8db
mode = 0644 mode = 0644
...@@ -281,8 +282,14 @@ download-only = true ...@@ -281,8 +282,14 @@ download-only = true
mode = 0644 mode = 0644
[config-production-py-template]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
md5sum = 3fe482f39895fe1beb6a4dbf0abb6ad4
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = production.py.in
download-only = true
mode = 0644
[versions] [versions]
......
# coding=utf-8
"""
"""
from __future__ import absolute_import
SERVER_NAME = 'extranet2.systematic-paris-region.org'
PRODUCTION = True
DEBUG = False
TESTING = False
CSRF_ENABLED = True
LOGGING_CONFIG_FILE = 'logging-production.yml'
SQL_QUERIES_COUNT_ALERT = 150
#SQLALCHEMY_DATABASE_URI =
SQLALCHEMY_ECHO = False
#API_KEY =
#SECRET_KEY =
#SALT =
WHOOSH_BASE = 'data/whoosh'
SITE_NAME = u'SPR'
#SENTRY_DSN =
MAIL_SENDER = u'extranet-admin@systematic-paris-region.org'
BULK_MAIL_SENDER = u'noreply@systematic-paris-region.org'
MAIL_FAIL_SILENTLY = False
PREFERRED_URL_SCHEME = 'https'
#UNOCONV_LOCATION =
# celery settings
#BROKER_URL =
#CELERY_RESULT_BACKEND =
CELERYD_CONCURRENCY = 2
CELERYD_PREFETCH_MULTIPLIER = 1
# in particular periodic tasks should be listed here
CELERY_IMPORTS = [
'extranet_spr.apps.notifications.views',
]
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