Not hotdeploying services

I have services and the library they depend on in a single repository.
When deploying that repository is checked out in zato_extra_path.
I need the restart the server to load the library but I want to replace the services at the same time to prevent version mismatches between library and services.

Can I deploy services by storing them in zato_extra_path along the library they use and have them bound in zato by restarting the server?

I do not want to hot-deploy!
Because that distributes the services to servers that may still use the old library.

I found service-sources.txt but that requires that paths are relative to the server root. Is there something similar that works for zato_extra_path or is there a location under the server root where the libary can be stored and loaded?

Hi Leo,

there is no requirement that paths in sevice-sources.txt be relative. If they are indeed then they are established in relation to server root, this is correct. But they can be very well absolute, this is fine as well.

Regards.

Hey Dariuszs,
Good to know.
The docs say differently and in documentation we trust.
Leo

Can you tell me where in the documentation it says this must be absolute? It would need to be amended to make sure that absolute paths are also listed.

The one below correctly mentions both relative and absolute paths.

https://zato.io/docs/admin/guide/install-config/config-server.html#main-service-sources

I was looking at https://zato.io/docs/admin/guide/installing-services.html#service-sources-txt and in the file comments itself:

All paths are relative to server root so that, for instance,

./my-services will resolve to /opt/zato/server1/my-services if a server has been

installed into /opt/zato/server1

List your service sources below, each on a separate line.

Recommended to be always the very last line so all services that have been

hot-deployed are picked up last.

./work/hot-deploy/current

BTW. Given that it is recommended to wedge my own services halfway in this file (before the pickup line) it would be nice it it is possible to include files. That way I don’t have to fool around with sed/awk etc to modify this file for deployed services. I will turn this comment into a GH issue.

Thanks, includes are a good idea but you don’t need worry about sed today either.

Please open server.conf and look up main.service_sources - this is the key that points to ./service-sources.txt which in turn points to your own services.

You can replace ./service-sources.txt with a different file with entries as you need them - just keep in mind to append ‘./work/hot-deploy/current’ at the end of it as it is in ./service-sources.txt.