如何使用Chef创建Windows服务? [英] How are Windows services created using Chef?
本文介绍了如何使用Chef创建Windows服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个jar文件,希望在Windows上作为服务运行,但我不认为Chef支持创建Windows服务: CHEF-3865
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
Chef用户如何向他们管理的Windows计算机添加新服务?电源外壳?
How are Chef users adding new services to Windows machines they manage? Powershell?
我的jar文件用于Jenkins Swarm插件,我正在使用Chef动态创建新的swarm奴隶。
My jar file is for the Jenkins Swarm Plugin, I am dynamically creating new swarm slaves using Chef.
推荐答案
我可以使用带有新厨师食谱的WinSW来完成此工作。
I was able to get this working using WinSW w/ a new Chef Cookbook.
食谱步骤:
- 将jar下载到节点。
- 将winsw包装器应用程序下载到节点。
- 将winsw配置文件下载到节点。
- 使用特定于节点的信息(要安装的jar)更新winsw配置文件
- 安装jar服务包装器:winsw.exe安装(如果成功,则返回0,如果已安装,则返回23)。
- Download jar to node.
- Download winsw wrapper app to node.
- Download winsw config file to node.
- Update the winsw config file with node-specific info (jar to install, etc)
- Install the jar service wrapper: winsw.exe install (returns 0 if successful, 23 if already installed).
这篇关于如何使用Chef创建Windows服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文