Pregunta

I have a jar file I'd like to run as a service on Windows, but I don't believe creating a Windows service is supported in Chef: CHEF-3865

How are Chef users adding new services to Windows machines they manage? Powershell?

My jar file is for the Jenkins Swarm Plugin, I am dynamically creating new swarm slaves using Chef.

¿Fue útil?

Solución

I was able to get this working using WinSW w/ a new Chef Cookbook.

Cookbook Steps:

  1. Download jar to node.
  2. Download winsw wrapper app to node.
  3. Download winsw config file to node.
  4. Update the winsw config file with node-specific info (jar to install, etc)
  5. Install the jar service wrapper: winsw.exe install (returns 0 if successful, 23 if already installed).
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top