Commit 76f52e6f authored by Guillaume Hervier's avatar Guillaume Hervier

software/caddy-frontend: auto-restart services on SR upgrade.

parent 29b2d7cc
...@@ -22,7 +22,7 @@ md5sum = c801b7f9f11f0965677c22e6bbe9281b ...@@ -22,7 +22,7 @@ md5sum = c801b7f9f11f0965677c22e6bbe9281b
[template-apache-frontend] [template-apache-frontend]
filename = instance-apache-frontend.cfg.in filename = instance-apache-frontend.cfg.in
md5sum = 750e2b1c922bf14511a3bc8a42468b1b md5sum = 3bf520c34753cf9ee9e665e9ef7fb469
[template-apache-replicate] [template-apache-replicate]
filename = instance-apache-replicate.cfg.in filename = instance-apache-replicate.cfg.in
......
...@@ -11,7 +11,9 @@ parts = ...@@ -11,7 +11,9 @@ parts =
cron cron
cron-entry-logrotate cron-entry-logrotate
ca-frontend ca-frontend
ca-frontend-service
certificate-authority certificate-authority
certificate-authority-service
logrotate-entry-caddy logrotate-entry-caddy
logrotate-entry-nginx logrotate-entry-nginx
caddy-frontend caddy-frontend
...@@ -240,6 +242,7 @@ wrapper-path = ${directory:service}/frontend_caddy ...@@ -240,6 +242,7 @@ wrapper-path = ${directory:service}/frontend_caddy
wait-for-files = wait-for-files =
${ca-frontend:cert-file} ${ca-frontend:cert-file}
${ca-frontend:key-file} ${ca-frontend:key-file}
hash-files = ${buildout:directory}/software_release/buildout.cfg
[not-found-html] [not-found-html]
recipe = slapos.cookbook:symbolic.link recipe = slapos.cookbook:symbolic.link
...@@ -281,12 +284,18 @@ recipe = slapos.cookbook:certificate_authority ...@@ -281,12 +284,18 @@ recipe = slapos.cookbook:certificate_authority
openssl-binary = {{ parameter_dict['openssl'] }}/bin/openssl openssl-binary = {{ parameter_dict['openssl'] }}/bin/openssl
ca-dir = ${directory:ca-dir} ca-dir = ${directory:ca-dir}
requests-directory = ${cadirectory:requests} requests-directory = ${cadirectory:requests}
wrapper = ${directory:service}/certificate_authority wrapper = ${directory:bin}/certificate_authority
ca-private = ${cadirectory:private} ca-private = ${cadirectory:private}
ca-certs = ${cadirectory:certs} ca-certs = ${cadirectory:certs}
ca-newcerts = ${cadirectory:newcerts} ca-newcerts = ${cadirectory:newcerts}
ca-crl = ${cadirectory:crl} ca-crl = ${cadirectory:crl}
[certificate-authority-service]
recipe = slapos.cookbook:wrapper
command-line = ${certificate-authority:wrapper}
wrapper-path = ${directory:service}/certificate_authority
hash-files = ${buildout:directory}/software_release/buildout.cfg
[cadirectory] [cadirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
requests = ${directory:ca-dir}/requests/ requests = ${directory:ca-dir}/requests/
...@@ -301,12 +310,18 @@ recipe = slapos.cookbook:certificate_authority.request ...@@ -301,12 +310,18 @@ recipe = slapos.cookbook:certificate_authority.request
key-file = ${cadirectory:certs}/frontend.key key-file = ${cadirectory:certs}/frontend.key
cert-file = ${cadirectory:certs}/frontend.crt cert-file = ${cadirectory:certs}/frontend.crt
executable = ${directory:service}/frontend_caddy executable = ${directory:service}/frontend_caddy
wrapper = ${directory:service}/frontend_caddy wrapper = ${directory:bin}/frontend_caddy
key-content = ${configuration:apache-key} key-content = ${configuration:apache-key}
cert-content = ${configuration:apache-certificate} cert-content = ${configuration:apache-certificate}
# Put domain name # Put domain name
name = ${configuration:domain} name = ${configuration:domain}
[ca-frontend-service]
recipe = slapos.cookbook:wrapper
command-line = ${ca-frontend:wrapper}
wrapper-path = ${directory:service}/frontend_caddy
hash-files = ${buildout:directory}/software_release/buildout.cfg
[ca-custom-frontend] [ca-custom-frontend]
< = jinja2-template-base < = jinja2-template-base
template = {{ parameter_dict['template_empty'] }} template = {{ parameter_dict['template_empty'] }}
...@@ -411,6 +426,7 @@ recipe = slapos.cookbook:wrapper ...@@ -411,6 +426,7 @@ recipe = slapos.cookbook:wrapper
command-line = {{ parameter_dict['trafficserver'] }}/bin/traffic_cop command-line = {{ parameter_dict['trafficserver'] }}/bin/traffic_cop
wrapper-path = ${trafficserver-variable:wrapper-path} wrapper-path = ${trafficserver-variable:wrapper-path}
environment = TS_ROOT=${buildout:directory} environment = TS_ROOT=${buildout:directory}
hash-files = ${buildout:directory}/software_release/buildout.cfg
[trafficserver-reload] [trafficserver-reload]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
...@@ -644,6 +660,7 @@ wrapper-path = ${directory:bin}/nginx-wrapper ...@@ -644,6 +660,7 @@ wrapper-path = ${directory:bin}/nginx-wrapper
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${nginx-wrapper:wrapper-path} -pidfile ${nginx-configuration:pid-file} command-line = ${nginx-wrapper:wrapper-path} -pidfile ${nginx-configuration:pid-file}
wrapper-path = ${directory:service}/frontend_nginx wrapper-path = ${directory:service}/frontend_nginx
hash-files = ${buildout:directory}/software_release/buildout.cfg
[dynamic-nginx-frontend-template] [dynamic-nginx-frontend-template]
< = jinja2-template-base < = jinja2-template-base
......
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