Don't crash when frontend is not available.

LAMP instances will request frontend instances but will still publish backend URL if frontend is not available.
parent e91397db
......@@ -19,6 +19,7 @@ extends =
../../component/mariadb/buildout.cfg
../../component/apache/buildout.cfg
../../component/apache-php/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/git/buildout.cfg
../../component/glib/buildout.cfg
......@@ -68,7 +69,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-php.cfg
output = ${buildout:directory}/template-apache-php.cfg
md5sum = 2e6dd002baf051e9199d135d9ae22a0b
md5sum = 7fad5ca60c33f6f5ba91c511f8aaae39
mode = 0644
[template-apache-backup]
......
[buildout]
parts =
url
request-mariadb
request-frontend
apache-php
stunnel
certificate-authority
ca-stunnel
logrotate
......@@ -14,21 +9,34 @@ parts =
cron
cron-entry-logrotate
promise
publish-backend-connection-informations
frontend-promise
publish-frontend-connection-informations
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[url]
recipe = slapos.cookbook:publishurl
url = $${request-frontend:connection-site_url}
[promise]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/apache
hostname = $${apache-php:ip}
port = $${apache-php:port}
[frontend-promise]
recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend
url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
[publish-backend-connection-informations]
recipe = slapos.cookbook:publish
backend_url = $${apache-php:url}
[publish-frontend-connection-informations]
<= publish-backend-connection-informations
url = $${request-frontend:connection-site_url}
[mariadb-urlparse]
recipe = slapos.cookbook:urlparse
url = $${request-mariadb:connection-url}
......@@ -44,6 +52,7 @@ pid-file = $${basedirectory:run}/apache.pid
lock-file = $${basedirectory:run}/apache.lock
ip = $${slap-network-information:global-ipv6}
port = 8080
url = http://[$${:ip}:$${:port}]/
error-log = $${directory:httpd-log}/error.log
access-log = $${directory:httpd-log}/access.log
php-ini-dir = $${directory:php-ini-dir}
......@@ -115,7 +124,7 @@ return = url
recipe = slapos.cookbook:request
name = Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.74:/software/apache-frontend/software.cfg
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url
config-url = http://[$${apache-php:ip}]:$${apache-php:port}/
......
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