Windows 配置管理
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4910034/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Configuration Management for Windows
提问by Nathan Lee
Are there any tools for windows like that *nix world has? I am looking for something like Chefor Puppet.
有没有像 *nix world 这样的 windows 工具?我正在寻找像Chef或Puppet这样的东西。
I have found cfEnginebut it still looks very *nix centric. Ideally it would be open source, and command line driven.
我找到了cfEngine,但它看起来仍然非常以 *nix 为中心。理想情况下,它将是开源的,并且是命令行驱动的。
The idea is to put together an automated infrastructure with windows based servers. Our current IT department does not allow non-windows servers.
这个想法是将一个自动化的基础设施与基于 Windows 的服务器放在一起。我们目前的 IT 部门不允许使用非 Windows 服务器。
采纳答案by jtimberman
Chef is supported on Windows by Opscode. While we don't run Windows for any of our infrastructure, we do have developers who are continually improving our Windows support. We also get community contributions, and most of the early phase Windows functionality for Chef was contributed by the community.
Opscode 在 Windows 上支持 Chef。虽然我们不为我们的任何基础设施运行 Windows,但我们确实有开发人员在不断改进我们的 Windows 支持。我们还获得了社区贡献,Chef 的大部分早期 Windows 功能都是由社区贡献的。
Important: Opscode now provides an MSI installer for Chef on Windows. This makes it easier than ever to get Chef and Ruby installed on Windows.
重要提示:Opscode 现在为 Windows 上的 Chef 提供了 MSI 安装程序。这使得在 Windows 上安装 Chef 和 Ruby 比以往任何时候都更容易。
While we have a lot of Unix/Linux background across our teams, our intention is that Windows is treated as a first class citizen. 2012 will be a big year for Chef and Windows. Keep an eye on the Opscode blogfor announcements.
虽然我们的团队中有很多 Unix/Linux 背景,但我们的意图是将 Windows 视为一等公民。2012 年对于 Chef 和 Windows 来说将是重要的一年。请密切关注Opscode 博客以获取公告。
The following Chef Resourceswork on Windows:
以下Chef 资源适用于 Windows:
Environment Resource: sets windows environment variables
User
Group
Mount
File
Gem Package
Remote File
Cookbook File
Template
Service
Ruby Block
Execute
That is, these are resources included in Chef itself. As Chef is extensible with cookbooks, many more resources are added through a variety of Windows specific cookbooks. Read on for more information.
也就是说,这些是包含在 Chef 本身中的资源。由于 Chef 可使用说明书进行扩展,因此通过各种特定于 Windows 的说明书添加了更多资源。继续读以获取更多信息。
You can get started with using Chef and Windows here:
您可以在此处开始使用 Chef 和 Windows:
Originally, Doug MacEchern wrote some cookbooks to do a number of things to automate windows, too.
最初,Doug MacEchern 也写了一些食谱来做很多事情来自动化窗口。
This information and more available on the Chef Wiki:
此信息以及 Chef Wiki 上的更多信息:
Update
更新
The following cookbook adds new resources to Chef to manage Windows:
以下说明书将新资源添加到 Chef 以管理 Windows:
It is an update/rewrite of Doug's fine resources from his repository linked above. Documentation is available on the Chef Wiki.
这是对 Doug 来自上面链接的存储库的优质资源的更新/重写。Chef Wiki上提供了文档。
The following cookbook deploys PowerShell and provides a resource to run PowerShell commands/scripts directly in Chef Recipes:
以下说明书部署 PowerShell 并提供资源以直接在 Chef Recipes 中运行 PowerShell 命令/脚本:
Documentation is available in the README.md included in the cookbook tarball.
文档可在包含在说明书 tarball 中的 README.md 中找到。
Additional cookbooks for installing 7-zip, managing IISand SQL Serverhave been added. Our "database" cookbook has been extended with a resource/provider for managing SQL Server databases and users (with the tds
rubygem).
添加了用于安装7-zip、管理IIS和SQL Server 的其他说明书。我们的“数据库”手册已经扩展了用于管理 SQL Server 数据库和用户(使用tds
rubygem)的资源/提供程序。
The knife-windowsplugin for knife adds functionality for interacting with Windows systems to provision them with Chef installation.
该刀窗口与Windows系统将它们与厨师安装交互来提供插件的刀添加功能。
Update: We have now added File ACL support for Windows to Chef, for all the usual file/directory suspects.
更新:我们现在为 Chef添加了对 Windows 的文件 ACL 支持,适用于所有常见的文件/目录嫌疑人。
回答by user589137
Cfengine Nova has had stable native support for Windows for years (i.e. no Cygwin is needed).
Cfengine Nova 多年来一直为 Windows 提供稳定的本地支持(即不需要 Cygwin)。
Everything that is possible on Unix (e.g. run commands, file copy, file edit, etc.) can also be done on Windows, with addition to Windows-specific features like
在 Unix 上所有可能的事情(例如运行命令、文件复制、文件编辑等)也可以在 Windows 上完成,除了 Windows 特定的功能,如
- Registry management
- File ACL permissions
- Windows service management
- Event log support
- Advanced OS discovery (version, arch, service pack, network, domain, etc.)
- 注册管理
- 文件 ACL 权限
- 视窗服务管理
- 事件日志支持
- 高级操作系统发现(版本、架构、服务包、网络、域等)
For a short introduction, look in Section 11 of the Nova supplement manual: http://cfengine.com/files/Nova_Supplement.pdf
有关简短介绍,请查看 Nova 补充手册的第 11 节:http: //cfengine.com/files/Nova_Supplement.pdf
回答by MattW
I have been looking for exactly the same thing.
我一直在寻找完全相同的东西。
I ran across Windows PowerShell Desired State Configurationwhich purports to do many of the CM tasks you'd want to do with Chef/Puppet.
我遇到了Windows PowerShell Desired State Configuration,它声称可以执行您希望使用 Chef/Puppet 执行的许多 CM 任务。
I am not going to give any opinion on it because I am still early in evaluating it - but if you're still looking for something, give this a shot.
我不会对此发表任何意见,因为我还处于早期评估阶段 - 但如果你仍在寻找某些东西,请试一试。
回答by Scarby
Having had a deal of experience here i think that it really depends what you need to manage on a given box. Find your most common use case and ask a more specific question in terms of: whats the best tool for managing that. Things like IIS can be tricky (on older windows builds at least) and finding modules for CM tools to manage things like IIS settings and app pools can be hit and miss - especially when it comes to advanced settings (worker thready recycling springs to mind)
在这里有很多经验,我认为这真的取决于你需要在给定的盒子上管理什么。找到您最常见的用例并提出一个更具体的问题:管理它的最佳工具是什么。像 IIS 之类的东西可能很棘手(至少在旧的 Windows 版本上)并且为 CM 工具寻找模块来管理诸如 IIS 设置和应用程序池之类的东西可能会遇到和错过 - 特别是在涉及高级设置时(工作人员线程回收浮现在脑海中)
However Puppet has forge modules for more basic IIS settings which largely worked for me - and i really like the declarative format here - especially if you are managing large numbers of IIS servers
然而,Puppet 有用于更基本的 IIS 设置的伪造模块,这在很大程度上对我有用 - 我真的很喜欢这里的声明式格式 - 特别是如果你正在管理大量的 IIS 服务器
Also one of the major issues with Windows and configuration management is the lack of a proper package management solution - what actually comes in really handy here is something called Chocolatey (see http://chocolatey.org/) there is a plugin to use this as a provider in puppet - making the whole management process particularly easy. However i imagine that this can be integrated with other CM tools aswell - but does a great deal to help with installing software automatically in a windows environment
Windows 和配置管理的主要问题之一是缺乏适当的包管理解决方案 - 这里真正有用的是一种叫做 Chocolatey 的东西(参见http://chocolatey.org/)有一个插件可以使用它作为 Puppet 的提供者 - 使整个管理过程特别容易。但是,我认为这也可以与其他 CM 工具集成 - 但对在 Windows 环境中自动安装软件有很大帮助
Though it is worth stating that whatever you end up using you will have to spend a while figuring out some odd bugs - windows and scripting/automation is not the best.
尽管值得一提的是,无论您最终使用什么,您都必须花一些时间找出一些奇怪的错误——Windows 和脚本/自动化并不是最好的。
回答by Huan
Based on my experience, I am glad to use such toolset:
根据我的经验,我很高兴使用这样的工具集:
Use powershell to manage the windows configuration. If only windows server, you can remotely execute the ps script.
If you like, suggest to use Puppet or Chef to distribute your powershell script into client.
If you like, suggest to use cygwin + (windows sshd) + crond to manage the shell-likely scripts which run in windows.
使用 powershell 管理 windows 配置。如果只有windows服务器,可以远程执行ps脚本。
如果您愿意,建议使用 Puppet 或 Chef 将您的 powershell 脚本分发到客户端。
如果愿意,建议使用 cygwin + (windows sshd) + crond 来管理在 windows 中运行的类似 shell 的脚本。
回答by Thilina
I think its better if you can use Microsoft System Center.
我认为如果您可以使用Microsoft System Center 会更好。
It a solution from the Microsoft to manage Microsoft base products form desktops to servers and all. Should give a try ...
它是来自 Microsoft 的解决方案,用于管理从桌面到服务器等所有 Microsoft 基础产品。应该试试...
How to Deploy Applications in Configuration Manager
Deploying Software and Operating Systems in System Center 2012
回答by fred
I don't recommend Chef unless you are a software developer who knows ruby. Chef is designed for software developers who want to manage IT infrastructure. Not for SysOps people who are the ones that actually end up managing it. It tries to treat IT infrastructure like code which is counter intuitive to how it actually works which is more like just data.
我不推荐 Chef 除非你是一个了解 ruby 的软件开发人员。Chef 专为想要管理 IT 基础架构的软件开发人员而设计。不适用于实际最终管理它的 SysOps 人员。它试图将 IT 基础设施视为代码,这与其实际工作方式相反,而更像是数据。
Puppet is more friendly for SysOps people imho but still can be complicated.
恕我直言,Puppet 对 SysOps 人员更友好,但仍然可能很复杂。
The good news is that there are other options as well. Less so for windows but projects like Puppet do support it reasonably well.
好消息是还有其他选择。对于 Windows 来说不太好,但像 Puppet 这样的项目确实支持它。