How are Windows services created using Chef?

筅森魡賤 提交于 2019-12-13 22:15:40

问题


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.


回答1:


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).


来源:https://stackoverflow.com/questions/23096451/how-are-windows-services-created-using-chef

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!