Commit ee9d4895 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

lamp: Move Frontend Request to apache instance

parent be655d15
......@@ -18,11 +18,11 @@ md5sum = 5c953c0f5d3376718eb9c4030288647a
[instance-apache-php]
filename = instance-apache-php.cfg.in
md5sum = a20bb27c0077b5a7252bda06ba7e069d
md5sum = 71447ec35a54953daf16b2e9d68fab8f
[instance-lamp]
filename = instance-lamp.cfg.jinja2.in
md5sum = 52b76d3c8aa23f467db33e32a2b50ed6
md5sum = 09f13faf1d2e9b299f15cc3364aa24e4
[template-apache.conf]
filename = apache.conf.in
......
......@@ -9,6 +9,7 @@ parts =
certificate-authority
logrotate-entry-apache
promise
lamp-frontend-promise
php.ini-conf
apache-php-service
......@@ -190,6 +191,27 @@ backend-url = ${apache-php-configuration:url}
php-bin = {{ parameter_dict['apache-php-location'] }}/bin/php
php-ini = ${php.ini-conf:rendered}
#----------------
#--
#-- Request Frontend
[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
slave = true
config-url = ${apache-php-configuration:url}
config-https-only = true
return = domain secure_access
[lamp-frontend-promise]
<= monitor-promise-base
module = check_url_available
name = lamp-http-frontend.py
url = ${request-frontend:connection-secure_access}
config-url = ${:url}
config-check-secure = 1
#----------------
#--
......@@ -199,6 +221,7 @@ php-ini = ${php.ini-conf:rendered}
<= monitor-publish
recipe = slapos.cookbook:publish.serialised
backend-url = ${apache-php-configuration:url}
frontend-url = ${request-frontend:connection-secure_access}
#----------------
......
......@@ -31,10 +31,12 @@ config-{{ key }} = {{ dumps(value) }}
config-database-list = ${request-mariadb:connection-database-list}
return =
backend-url
frontend-url
monitor-base-url
{% do part_list.append('request-apache') -%}
{% do publish_dict.__setitem__('backend-url', '${request-apache:connection-backend-url}') -%}
{% do publish_dict.__setitem__('url', '${request-apache:connection-frontend-url}') -%}
{% do monitor_base_url_dict.__setitem__('apache', '${request-apache:connection-monitor-base-url}') -%}
......@@ -64,28 +66,6 @@ return =
{% do publish_dict.__setitem__('mariadb-url-list', '${request-mariadb:connection-database-list}') -%}
{% do monitor_base_url_dict.__setitem__('mariadb', '${request-mariadb:connection-monitor-base-url}') -%}
[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
slave = true
config-url = ${request-apache:connection-backend-url}
config-https-only = true
return = domain secure_access
[lamp-frontend-promise]
<= monitor-promise-base
module = check_url_available
name = lamp-http-frontend.py
url = ${request-frontend:connection-secure_access}
config-url = ${:url}
config-custom-domain = {{ slapparameter_dict.get('custom-domain', '') }}
config-check-secure = 1
{% do publish_dict.__setitem__('url', '${lamp-frontend-promise:url}') -%}
[publish-early]
recipe = slapos.cookbook:publish-early
-init =
......
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