[英]Using puppet to build from source
How can I use puppet to build from source without using multiple Exec
commands?. 如何在不使用多个Exec
命令的情况下使用puppet从源代码进行构建? Do we have modules for it on forge that I could use? 我在锻造上有可用的模块吗?
It's possible to use Puppet to build applications from source without using execs, possibly with a custom written type and provider. 可以使用Puppet从源代码构建应用程序而无需使用exec,可能使用自定义的书面类型和提供程序。 Otherwise, yes, it'd have to be a few different exec resources with onlyif
, creates
etc. statements to stop them running every time the agent ran. 否则,是的,它就得在几个不同的EXEC资源, onlyif
, creates
等语句来阻止他们运行的每个代理运行时间。
Puppet's model of configuration management is known as a desired state model: you define the end state of the system and let the system. Puppet的配置管理模型被称为所需状态模型:您定义系统的最终状态,然后让系统运行。 This is why exec's are generally avoided in Puppet: they don't fit a desired state model. 这就是为什么在Puppet中通常避免执行程序的原因:它们不符合所需的状态模型。 It also makes things like updating the application, or dealing with unknowns like a partial failure of the compilation that creates a required file. 它还使您可以进行诸如更新应用程序之类的操作,或处理诸如创建所需文件的编译部分失败之类的未知信息。
In my opinion, I would not recommend using configuration management to build applications from source at all . 我认为, 我完全不建议使用配置管理从源代码构建应用程序 。 There are a few issue inherent with doing so (this is not just for Puppet, but most config management languages): 这样做有一些固有的问题(这不仅是针对Puppet的,而且是大多数配置管理语言的):
This sounds like something that would be better served by packaging, using tools such as FPM or just native package building tools such as rpmbuild
. 听起来,通过使用FPM之类的工具或仅使用本地软件包构建工具(例如rpmbuild
,通过打包可以更好地解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.