我正在努力让我的头脑围绕木偶,更糟糕的是,我正在使用Red Hat Satellite 6,这增加了额外的复杂性。
我目前正在构建一个grpahite图形解决方案。有三种类型的服务器(中继-接收数据,缓存-存储数据,图-运行Grafana并与缓存对话)。
我有两个不同的同事告诉我用两种不同的方式来做。我的第一个可用的方法是创建一个'role_graphing',然后创建一个‘子角色’,比如role_graphing::relay等等。我的第二种可用方法是在每个服务器上只有一个角色。
我目前使用的是第一种方法,我的init.pp如下所示:
class role_graphing {
include profile::graphing_base
}
class role_graphing::relay inherits role_graphing {
include profile::carbon_c_relay
}
class role_graphing::cache inherits role_graphing {
include profile::carbon_cache
include profile::carbon_c_relay
include profile::graphite_web
include profile::memcached
}
class role_graphing::graph inherits role_graphing {
include profile::graph
} 然后在我的manifests文件夹中,我有一个profile_relay.pp、profile_cache.pp等等。每个概要文件只需从Yum或Forge安装所需的包,然后对其进行配置。
我这样做是“正确”的吗?
发布于 2016-05-21 10:02:41
我不会直接建议你,而是描述Puppetlabs对这些术语的意图,然后给出一个例子,这样你就可以大致了解它了。
模块是清单、函数、文件、模板等的集合。配置文件是一个或多个模块的集合。角色是一个或多个配置文件的集合。服务器是一个或多个角色的集合。
示例:
localhost.localdomain包含角色application_server
role application_server包含配置文件lamp和web_apps
配置文件灯包含apache、mysql和php模块。
profile web_apps包含app_one和app_two模块
https://stackoverflow.com/questions/37270975
复制相似问题