Commit c9ee9f37 authored by Tom Niget's avatar Tom Niget

wip

parent 86774cf6
......@@ -23,7 +23,8 @@ patches =
${:_profile_base_location_}/linux-6.patch#08967a35249243eb06e46b1868e2dae2
configure-command = make
configure-options = makefiles CCARGS=${:configure-options-CCARGS} AUXLIBS=${:configure-options-AUXLIBS}
configure-options-CCARGS = '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DUSE_TLS -DHAS_PCRE -DHAS_DB -I${libdb:location}/include -I${pcre:location}/include -I${openssl:location}/include -I${cyrus-sasl:location}/include/sasl -I${libnsl:location}/include'
configure-options-CCARGS = ${:default-configure-options-CCARGS}
default-configure-options-CCARGS = '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DUSE_TLS -DHAS_PCRE -DHAS_DB -I${libdb:location}/include -I${pcre:location}/include -I${openssl:location}/include -I${cyrus-sasl:location}/include/sasl -I${libnsl:location}/include'
configure-options-AUXLIBS = '-L${openssl:location}/lib -L${pcre:location}/lib -L${libdb:location}/lib -L${cyrus-sasl:location}/lib -L${libtirpc:location}/lib -L${libnsl:location}/lib -lnsl -lssl -lpcre -ldb -lcrypto -lsasl2 -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${libdb:location}/lib -Wl,-rpath=${cyrus-sasl:location}/lib -Wl,-rpath=${libnsl:location}/lib'
make-targets = non-interactive-package install_root=${:location}
environment =
......
<VirtualHost *:{{ parameter_dict['port'] }}>
ServerAdmin admin@example.com
DocumentRoot {{ parameter_dict['document-root'] }}
SetEnvIf Origin "^http(s)?://(.+\.)?(app\.officejs\.com)$" ORIGIN_DOMAIN=$0
Header always set Access-Control-Allow-Origin "%{ORIGIN_DOMAIN}e" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Credentials "true" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Methods "PROPFIND, PROPPATCH, COPY, MOVE, DELETE, MKCOL, LOCK, UNLOCK, PUT, GETLIB, VERSION-CONTROL, CHECKIN, CHECKOUT, UNCHECKOUT, REPORT, UPDATE, CANCELUPLOAD, HEAD, OPTIONS, GET, POST" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Headers "Overwrite, Destination, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Authorization" env=ORIGIN_DOMAIN
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
<Directory {{ parameter_dict['document-root'] }}>
Options +FollowSymlinks
AllowOverride All
Require all granted
SetEnv HOME {{ parameter_dict['document-root'] }}
SetEnv HTTP_HOME {{ parameter_dict['document-root'] }}
Dav off
</Directory>
ErrorLog "{{ parameter_dict['log-dir'] }}/lamp-error.log"
CustomLog "{{ parameter_dict['log-dir'] }}/lamp-access.log" combined
</VirtualHost>
# Apache static configuration
# Automatically generated
# Basic server configuration
PidFile "{{ parameter_dict['pid-file'] }}"
Listen {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
PHPINIDir {{ parameter_dict['php-ini-dir'] }}
ServerAdmin someone@email
DefaultType text/plain
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php .phtml .php5 .php4
AddType application/x-httpd-php-source .phps
# Log configuration
ErrorLog "{{ parameter_dict['error-log'] }}"
LogLevel warn
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog "{{ parameter_dict['access-log'] }}" common
# SSL Configuration
SSLCertificateFile {{ parameter_dict.get('cert-file') }}
SSLCertificateKeyFile {{ parameter_dict.get('key-file') }}
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLRandomSeed startup /dev/urandom 256
SSLRandomSeed connect builtin
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:HIGH:!aNULL:!MD5
SSLHonorCipherOrder on
SSLEngine On
<FilesMatch ".+\.ph(ar|p|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to the files
# only in specific virtual host or directory
Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(ar|p|ps|tml)$">
Require all denied
</FilesMatch>
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
DirectoryIndex index.html index.php
Include {{ parameter_dict['apache-config-dir'] }}/*.conf
# List of modules
LoadModule unixd_module modules/mod_unixd.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule filter_module modules/mod_filter.so
LoadModule php_module modules/libphp.so
......@@ -13,13 +13,13 @@
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template-mail-server-instance]
filename = mail-server-instance.cfg.in
md5sum = 2362f94a0301714dd0fbb97743d7a88a
[template]
filename = instance.cfg.in
md5sum = ec2cac2499cb1748402da9cb73e81a1e
[template-default]
_update_hash_filename_ = mail-server-instance-default.cfg.in
md5sum = 1c968ab9d9bedfeff15f13bcdb8858f8
_update_hash_filename_ = instance-default.cfg.in
md5sum = 10ff0aaefca7ad7f2746fbfa0b3abc0e
[dovecot.jinja2.conf]
_update_hash_filename_ = dovecot.jinja2.conf
......@@ -30,11 +30,25 @@ md5sum = 060107ee6ad0eb9092529bc2bd1ee52f
[postfix_main.jinja2.cf]
_update_hash_filename_ = postfix_main.jinja2.cf
md5sum = 9310f98c10b0264d70e80e641e8922cb
md5sum = 83a7729f9911b21d0a01bcb3217b4d33
[postfix_master.jinja2.cf]
_update_hash_filename_ = postfix_master.jinja2.cf
md5sum = 7752a8b4af5c18dc404e0a862af89272
[postfix_mysql_mailbox.jinja2.cf]
_update_hash_filename_ = postfix_mysql_mailbox.jinja2.cf
md5sum = c1917289b0039059948a3fa96fa5f686
[postfix_mysql_aliases.jinja2.cf]
_update_hash_filename_ = postfix_mysql_aliases.jinja2.cf
md5sum = 0627b00d6112f01eaf9284c84291546e
[template-apache.conf]
filename = apache.conf.in
md5sum = e49410f0a4bf28993a56bb28aff0a6f0
[template-php.ini]
filename = php.ini.in
md5sum = 677e1185a99d337cd1be778c548a6d30
[template-apache-httpd]
filename = apache-httpd.conf.in
md5sum = 4ad906791f0d6fd3a4aef8f5a8018b45
......@@ -28,6 +28,7 @@ var-lib-postfix = ${:var-lib}/postfix
var-spool = ${:var}/spool
var-spool-postfix = ${:var-spool}/postfix
vhosts = ${:home}/vhosts
srv = ${buildout:directory}/srv
# Not used at buildout level, presence needed by postfix.
var-spool-postfix-active = ${:var-spool-postfix}/active
var-spool-postfix-bounce = ${:var-spool-postfix}/bounce
......@@ -43,6 +44,12 @@ var-spool-postfix-private = ${:var-spool-postfix}/private
var-spool-postfix-public = ${:var-spool-postfix}/public
var-spool-postfix-saved = ${:var-spool-postfix}/saved
var-spool-postfix-trace = ${:var-spool-postfix}/trace
httpd-log = ${:log}/apache
php-ini-dir = ${:etc}/php
tmp-php = ${:tmp}/php
upload-tmp = ${:tmp}/upload
www = ${:srv}/www/
apache.d = ${:etc}/apache.d
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
......@@ -52,6 +59,10 @@ url = {{ slap_connection['server-url'] }}
key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}
[apache-network-configuration]
listening-ip = ${slap-configuration:ipv6-random}
listening-port = 9988
[config-base]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
......@@ -190,6 +201,48 @@ hash-files =
${postfix-conf-main:output}
${postfix-wrapper:output}
[apache-php-service]
recipe = slapos.cookbook:wrapper
command-line = ${ca-apache-php:wrapper}
wrapper-path = ${directory:service}/apache-php
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
depends =
${copy-application:recipe}
${apache-graceful:recipe}
[apache-graceful]
recipe = collective.recipe.template
output = ${directory:script}/apache-httpd-graceful
mode = 700
input = inline:
#!/bin/sh
kill -USR1 "$(cat '${apache-php-configuration:pid-file}')"
[copy-application]
recipe = plone.recipe.command
command = if [ -z "$(ls -A ${directory:www})" ]; then
rm -rf ${directory:www};
cp -ax {{ apache_parameter_dict['application-location'] }}/ ${directory:www};
fi
update-command = ${:command}
stop-on-error = true
[apache-php-configuration]
document-root = ${directory:www}
pid-file = ${directory:run}/apache.pid
lock-file = ${directory:run}/apache.lock
ip = ${apache-network-configuration:listening-ip}
port = ${apache-network-configuration:listening-port}
url = https://[${:ip}]:${:port}/
error-log = ${directory:httpd-log}/error.log
access-log = ${directory:httpd-log}/access.log
log-dir = ${directory:httpd-log}
php-ini-dir = ${directory:php-ini-dir}
cert-file = ${ca-directory:certs}/httpd.crt
key-file = ${ca-directory:certs}/httpd.key
apache-config-dir = ${directory:apache.d}
[publish-connection-information]
<= monitor-publish
recipe = slapos.cookbook:publish
......@@ -197,6 +250,28 @@ imap-port = 10143
smtp-port = 10025
imap-smtp-ipv6 = ${slap-configuration:ipv6-random}
domain = ${request-dns-entry:connection-domain}
backend-url = ${apache-php-configuration:url}
{% if apache_parameter_dict['publish-frontend'] -%}
#url = ${lamp-frontend-promise:url}
{% endif -%}
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Instance Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
shared = true
config-url = ${apache-php-configuration:url}
config-https-only = true
return = domain secure_access
[lamp-frontend-promise]
<= monitor-promise-base
promise = check_url_available
name = lamp-http-frontend.py
url = ${request-frontend:connection-secure_access}
config-url = ${:url}
[imap-listen-promise]
<= monitor-promise-base
......@@ -212,6 +287,14 @@ name = smtp_listen.py
config-host = ${slap-configuration:ipv6-random}
config-port = 10025
[promise]
# Check any apache port in ipv4, expect other ports and ipv6 to behave consistently
<= monitor-promise-base
promise = check_socket_listening
name = apache-httpd-port-listening.py
config-host = ${apache-php-configuration:ip}
config-port = ${apache-php-configuration:port}
[request-dns-entry]
{% if slapparameter_dict.get('request_dns', '') %}
name = dns-mail-entry
......@@ -304,6 +387,8 @@ parts =
publish-connection-information
imap-listen-promise
smtp-listen-promise
php.ini-conf
apache-php-service
{{ part_list | join('\n ') }}
{% if slapparameter_dict.get('request_dns', '') %}
request-dns-entry
......@@ -313,5 +398,37 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline= true
# [instance-parameter]
[mariadb-urlparse]
recipe = slapos.cookbook:urlparse
url = {{ slapparameter_dict['database-list'][0] }}
[instance-parameter]
# snappymail = ${:document-root}
db-user = ${mariadb-urlparse:username}
db-password = ${mariadb-urlparse:password}
db-name = ${mariadb-urlparse:path}
db-host = ${mariadb-urlparse:host}
db-port = ${mariadb-urlparse:port}
document-root = ${apache-php-configuration:document-root}
backend-url = ${apache-php-configuration:url}
php-bin = {{ apache_parameter_dict['apache-php-location'] }}/bin/php
php-ini = ${php.ini-conf:output}
[php.ini-configuration]
tmp-dir = ${directory:tmp-php}
php-upload-dir = ${directory:upload-tmp}
[php.ini-conf]
recipe = slapos.recipe.template:jinja2
url = {{ apache_parameter_dict['template-php-ini'] }}
output = ${directory:php-ini-dir}/php.ini
context =
section apache_parameter_dict php.ini-configuration
section instance_dict instance-parameter
extensions = jinja2.ext.do
[php-bin]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/php
command-line = ${instance-parameter:php-bin} -c ${php.ini-conf:output}
[buildout]
parts =
switch-softwaretype
eggs-directory = {{ buildout_egg_directory }}
develop-eggs-directory = {{ buildout_develop_directory }}
offline = true
[default-dynamic-template-parameters]
bin-directory = ${buildout:bin-directory}
buildout-bin-directory = ${buildout:bin-directory}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
output = ${buildout:directory}/${:filename}
extensions = jinja2.ext.do
extra-context =
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key ipv4 slap-configuration:ipv4
key ipv6 slap-configuration:ipv6
key slapparameter_dict slap-configuration:configuration
key computer_id slap-configuration:computer
raw template_monitor {{ template_monitor }}
raw openssl_location {{ openssl_location }}
raw logrotate_cfg {{ logrotate_cfg }}
${:extra-context}
[dynamic-template-default]
<= jinja2-template-base
url = {{ template_default }}
filename = instance-default.cfg
extra-context =
raw dovecot_conf_template {{ dovecot_conf_template }}
raw dovecot_passdb_lua_template {{ dovecot_passdb_lua_template }}
raw dovecot_binary {{ dovecot_binary }}
raw postfix_main_template {{ postfix_main_template }}
raw postfix_master_template {{ postfix_master_template }}
raw postfix_virtual_template {{ postfix_virtual_template }}
raw postfix_vmailbox_template {{ postfix_vmailbox_template }}
raw postfix_location {{ postfix_location }}
raw xz_utils_location {{ xz_utils_location }}
section apache_parameter_dict dynamic-template-apache-php-parameters
section slap_connection slap-connection
key ipv4_set slap-configuration:ipv4
key ipv6_set slap-configuration:ipv6
raw bin_directory {{ bin_directory }}
section mariadb_parameter_dict dynamic-template-mariadb-parameters
[dynamic-template-apache-php-parameters]
{% if application_archive_root %}
application-location = {{ application_location }}/{{ application_archive_root }}
{% else %}
application-location = {{ application_location }}
{% endif %}
template-apache-conf = {{ template_apache_conf }}
apache-location = {{ apache_location }}
apache-php-location = {{ apache_php_location }}
template-php-ini = {{ template_php_ini }}
publish-frontend = !py!{{ default_frontend }}
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
[publish-connection-parameters]
imap-port = 10143
smtp-port = 10025
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = dynamic-template-default:output
#mariadb = dynamic-template-mariadb:output
#apache = dynamic-template-apache-php:output
[dynamic-template-mariadb-parameters]
bash = {{ bash_location }}
coreutils-location = {{ coreutils_location }}
dash-location = {{ dash_location }}
mariadb-location = {{ mariadb_location }}
template-my-cnf = {{ template_my_cnf }}
template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
template-mysqld-wrapper = {{ template_mysqld_wrapper }}
link-binary = {{ dumps(mariadb_link_binary) }}
mariadb-resiliency-after-import-script = {{ mariadb_resiliency_after_import_script }}
mariadb-slow-query-report-script = {{ mariadb_slow_query_report_script }}
mariadb-start-clone-from-backup = {{ mariadb_start_clone_from_backup }}
promise-check-slow-queries-digest-result = {{ bin_directory }}/check-slow-queries-digest-result
percona-tools-location = {{ percona_toolkit_location }}
unixodbc-location = {{ unixodbc_location }}
mroonga-mariadb-install-sql = {{ mroonga_mariadb_install_sql }}
mroonga-mariadb-plugin-dir = {{ mroonga_mariadb_plugin_dir }}
groonga-plugins-path = {{ groonga_plugin_dir }}:{{ groonga_mysql_normalizer_plugin_dir }}
check-computer-memory-binary = {{ bin_directory }}/check-computer-memory
bin-directory = {{ bin_directory }}
[default-dynamic-template-parameters]
bin-directory = ${buildout:bin-directory}
buildout-bin-directory = ${buildout:bin-directory}
[dynamic-template-default]
recipe = slapos.recipe.template:jinja2
url = ${template-default:target}
filename = mail-server-instance-default.cfg
output = $${buildout:directory}/$${:filename}
extensions = jinja2.ext.do
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key slapparameter_dict slap-configuration:configuration
raw template_monitor ${monitor2-template:output}
raw dovecot_conf_template ${dovecot.jinja2.conf:target}
raw dovecot_passdb_lua_template ${dovecot-passdb.jinja2.lua:target}
raw dovecot_binary ${dovecot:location}/sbin/dovecot
raw postfix_main_template ${postfix_main.jinja2.cf:target}
raw postfix_master_template ${postfix_master.jinja2.cf:target}
raw postfix_virtual_template ${postfix_mysql_aliases.jinja2.cf:target}
raw postfix_vmailbox_template ${postfix_mysql_mailbox.jinja2.cf:target}
raw postfix_location ${postfix:location}
raw xz_utils_location ${xz-utils:location}
section slap_connection slap-connection
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
[publish-connection-parameters]
imap-port = 10143
smtp-port = 10025
[switch-softwaretype-mserv]
recipe = slapos.cookbook:switch-softwaretype
apache = dynamic-template-default:output
[PHP]
engine = On
safe_mode = Off
expose_php = Off
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = On
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
session.save_path = "{{ parameter_dict['tmp-dir'] }}"
session.auto_start = 0
date.timezone = {{ instance_dict.get('php.date.timezone', 'Europe/Paris') }}
file_uploads = On
upload_max_filesize = {{ instance_dict.get('php.upload_max_filesize', '10240M') }}
post_max_size = {{ instance_dict.get('php.post_max_size', '10240M') }}
magic_quotes_gpc=Off
memory_limit = {{ instance_dict.get('php.memory_limit', '512M') }}
session.cookie_secure = True
max_execution_time = {{ instance_dict.get('php.max_execution_time', 1800) }}
max_input_time = {{ instance_dict.get('php.max_input_time', 3600) }}
output_buffering = {{ instance_dict.get('php.output_buffering', 4096) }}
max_file_uploads = {{ instance_dict.get('php.max_file_uploads', 100) }}
#extension_dir="./"#
sys_temp_dir="{{ parameter_dict['tmp-dir'] }}"
upload_tmp_dir="{{ parameter_dict['php-upload-dir'] }}"
zend_extension=opcache
extension=apcu
extension=redis
extension=imagick
apc.enabled=1
apc.file_update_protection=2
apc.optimization=0
apc.shm_size=256M
apc.include_once_override=0
apc.shm_segments=1
apc.ttl=7200
apc.user_ttl=7200
apc.gc_ttl=3600
apc.num_files_hint=1024
apc.enable_cli=1
apc.max_file_size=5M
apc.cache_by_default=1
apc.use_request_time=1
apc.slam_defense=0
apc.mmap_file_mask="{{ parameter_dict['tmp-dir'] }}/apc.XXXXXX"
apc.stat_ctime=0
apc.canonicalize=1
apc.write_lock=1
apc.report_autofilter=0
apc.rfc1867=0
apc.rfc1867_prefix =upload_
apc.rfc1867_name=APC_UPLOAD_PROGRESS
apc.rfc1867_freq=0
apc.rfc1867_ttl=3600
apc.lazy_classes=0
apc.lazy_functions=0
[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer={{ instance_dict.get('php.opcache.interned-strings-buffer', 8) }}
opcache.max_accelerated_files=10000
opcache.revalidate_freq={{ instance_dict.get('php.opcache.revalidate-freq', 1) }}
opcache.save_comments=1
postmaster@{{ mail_domain }} postmaster
@{{ mail_domain }} {{ mail_domain }}/catchall
......@@ -3,33 +3,108 @@ extends =
../../component/xz-utils/buildout.cfg
../../component/postfix/buildout.cfg
../../component/dovecot/buildout.cfg
# ../../component/mariadb/buildout.cfg
# ../../stack/slapos.cfg
../../stack/lamp/buildout.cfg
# ../../component/mariadb/buildout.cfg
../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
../../stack/erp5/buildout.cfg
../../component/apache-php/buildout.cfg
buildout.hash.cfg
parts =
slapos-cookbook
template
dovecot
postfix
# mariadb
lamp-instance
mariadb
[postfix]
configure-options-CCARGS = '-DHAS_MYSQL -I${mariadb:location}/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DUSE_TLS -DHAS_PCRE -DHAS_DB -I${libdb:location}/include -I${pcre:location}/include -I${openssl:location}/include -I${cyrus-sasl:location}/include/sasl -I${libnsl:location}/include'
configure-options-AUXLIBS = '-L${mariadb:location}/lib -Wl,-rpath=${mariadb:location}/lib -lmysqlclient -lmariadb -L${openssl:location}/lib -L${pcre:location}/lib -L${libdb:location}/lib -L${cyrus-sasl:location}/lib -L${libtirpc:location}/lib -L${libnsl:location}/lib -lnsl -lssl -lpcre -ldb -lcrypto -lsasl2 -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${libdb:location}/lib -Wl,-rpath=${cyrus-sasl:location}/lib -Wl,-rpath=${libnsl:location}/lib'
# [template]
# recipe = slapos.recipe.template
# url = ${:_profile_base_location_}/${:filename}
# output = ${buildout:directory}/template.cfg
[template]
recipe = slapos.recipe.template:jinja2
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
context =
key application_location application:location
key application_archive_root application:archive-root
key apache_location apache:location
key apache_php_location apache-php:location
key bash_location bash:location
key bin_directory buildout:bin-directory
key coreutils_location coreutils:location
key buildout_egg_directory buildout:eggs-directory
key buildout_develop_directory buildout:develop-eggs-directory
key buildout_directory buildout:directory
key dash_location dash:location
# key findutils_location findutils:location
key logrotate_location logrotate:location
key logrotate_cfg template-logrotate-base:output
# key gzip_location gzip:location
# key xz_utils_location xz-utils:location
key template_monitor monitor2-template:output
key mariadb_link_binary template-mariadb:link-binary
key mariadb_location mariadb:location
key mariadb_resiliency_after_import_script mariadb-resiliency-after-import-script:target
key mariadb_slow_query_report_script mariadb-slow-query-report-script:target
key mariadb_start_clone_from_backup mariadb-start-clone-from-backup:target
key mroonga_mariadb_install_sql mroonga-mariadb:install-sql
key mroonga_mariadb_plugin_dir mroonga-mariadb:plugin-dir
key groonga_plugin_dir groonga:groonga-plugin-dir
key groonga_mysql_normalizer_plugin_dir groonga-normalizer-mysql:groonga-plugin-dir
key percona_toolkit_location percona-toolkit:location
key template_php_ini template-php.ini:target
key template_apache_conf template-apache.conf:target
# key template_apache_php instance-apache-php:target
# key template_lamp instance-lamp:target
key template_default template-default:target
key template_mariadb template-mariadb:target
key template_mariadb_initial_setup template-mariadb-initial-setup:target
key template_mysqld_wrapper template-mysqld-wrapper:output
key template_my_cnf template-my-cnf:target
key unixodbc_location unixodbc:location
key openssl_location openssl:location
key db_name custom-application-deployment:db-name
key db_user custom-application-deployment:db-user
key default_frontend custom-application-deployment:default-frontend
key lamp_apache_httpd template-apache-httpd:target
raw dovecot_conf_template ${dovecot.jinja2.conf:target}
raw dovecot_passdb_lua_template ${dovecot-passdb.jinja2.lua:target}
raw dovecot_binary ${dovecot:location}/sbin/dovecot
raw postfix_main_template ${postfix_main.jinja2.cf:target}
raw postfix_master_template ${postfix_master.jinja2.cf:target}
raw postfix_virtual_template ${postfix_mysql_aliases.jinja2.cf:target}
raw postfix_vmailbox_template ${postfix_mysql_mailbox.jinja2.cf:target}
raw postfix_location ${postfix:location}
raw xz_utils_location ${xz-utils:location}
[template-mail-server-instance]
recipe = slapos.recipe.template
[template-download-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/mail-server-instance.cfg
[template-apache.conf]
<= template-download-base
[template-php.ini]
<= template-download-base
# download apache-httpd.conf.in
[template-apache-httpd]
<= template-download-base
[custom-application-deployment]
# path = /path/to/instance-custom.cfg
# part-list = part1 part2
# See software/maarch/software.cfg for an example.
path =
part-list =
# database information
db-name = lamp
db-user = lamp
# Publish default lamp slave frontend url
default-frontend = True
[template-default]
recipe = slapos.recipe.build:download
......@@ -57,11 +132,5 @@ filename = ${:_buildout_section_name_}
[application]
url = https://github.com/the-djmaze/snappymail/releases/download/v2.38.2/snappymail-2.38.2.tar.gz
md5sum = 551af7a01691f8d988c16aa73c75e686
[dynamic-template-lamp-parameters]
application-lamp-path = ${template-mail-server-instance:output}
part-list = switch-softwaretype-mserv
[custom-application-deployment-lamp]
path = ${template-mail-server-instance:output}
part-list = switch-softwaretype-mserv
recipe = slapos.recipe.build:download-unpacked
archive-root =
......@@ -6,8 +6,8 @@
"default": {
"title": "Default",
"software-type": "default",
"request": "mail-server-instance-default-input-schema.json",
"response": "mail-server-instance-default-output-schema.json",
"request": "instance-default-input-schema.json",
"response": "instance-default-output-schema.json",
"index": 0
}
}
......
......@@ -82,6 +82,8 @@ def main():
if line is None or not line.startswith('#'):
if line is None or line.startswith('['):
if hash_file_path is not None:
if hash_name not in HASH_MAP:
print("Warning: unknown hash:", hash_name)
current_section.insert(
len([x for x in current_section if x.strip()]),
'%s = %s%s' % (
......
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