Created
November 24, 2016 15:04
-
-
Save hvelarde/b7ceefae30e0dca3cc710e2843fd8946 to your computer and use it in GitHub Desktop.
Part to restart instances with warm up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# need to change permission access to /etc/varnish/secret | |
[restart] | |
recipe = collective.recipe.template | |
input = inline: | |
#!/bin/bash | |
for i in {1..4} | |
do | |
varnishadm backend.set_health instance$i sick | |
${buildout:bin-directory}/supervisorctl restart app:instance$i | |
curl http://localhost:808$i/Plone > /dev/null | |
varnishadm backend.set_health instance$i auto | |
done | |
output = ${buildout:bin-directory}/restart | |
mode = 755 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment