I try to migrate a Plone site (used by a charity) from Python 2.7 - Plone 5.0 to Python 3 and Plone 5.2. I already migrated the used Plone add-ons for the site to Plone 5.2 and Python 3. I could run buildout for development with a single instance. I'm currently working on the buildout for the production environment. I was done with the instance, the zeoserver and the supervisor part of the buildout script. I could create a new zeoserver with four instances and start and stop it with supervisor.
I worked on the Varnish part of the script yet. I used the add-on plone.recipe.varnish for this. I tried with the latest release and Varnish 4.x first, but always got an error after running supervisor about purge. It stops at the line with 'import purge' and searches for a missing library in the Varnish build (the one for purging).
I changed my setting to use the sources of the recipe from the Github.com repository with Varnish 6.0.6 and the error disappeared. I could build Varnish from source. I could start supervisor, but varnish errored with the following entry in its log:
Error: Could not get socket 0.0.0.0:10001: Address already in use
(-? gives usage)
I looked with netstat for the used ports and got varnishd listening on that port. I opened my browser on this port (localhost:10001) and could view my Plone site. Although supervisor / varnish throw an error message to the log and the supervisor status of Varnish was:
varnish FATAL Exited too quickly (process log may have details)
I had a look into the 'var' directory of the buildout too and there is a cache folder with current content (py-files). Thus there is some caching once I added / edited some content to the site.
I don't know how to fix the issues with supervisor / Varnish. You could find the buildout script which I created and used for building the site on Github:
Because of issues with building haproxy (error with chmod 0755) I currently dropped the work on migrating this part of the current setup yet.