官术网_书友最值得收藏!

  • Mastering Puppet 5
  • Ryan Russell Yates Jason Southgate
  • 177字
  • 2021-07-16 17:46:12

Roles

Let's take another step back and consider what we want to achieve with the roles part of the pattern. The overarching task is to piece together these building-brick-like profile classes into full tech stacks, which we call roles, and are now the second part of our full pattern:

Here you can see that we have taken the composite profiles from our previous example, and stacked them one on top of the other, to produce a full tech stack. We are also utilizing two additional shared profiles:

  • profile::base is included in all machines, including workstations. It manages security baselines and so on, using conditional logic for OS-specific profiles; for example, profile:: base::ubuntu, profile::base::redhat, and so on, as needed.
  • profile::server is included in all machines that provide a service over the network, and configures services such as NTP, firewalls, monitoring, logging, and so on.

Let's look again at the fully functional LAMP stack as an example in Puppet DSL:

# LAMP stack


class role::lamp {
include profile::web::apache
include profile::db::mysql
include profile::programming::php
include profile::server
include profile::base
}
主站蜘蛛池模板: 阿勒泰市| 文化| 望江县| 华坪县| 安塞县| 东乡县| 四平市| 桂平市| 龙岩市| 通州区| 乐山市| 大石桥市| 静宁县| 昌乐县| 定结县| 灵山县| 泸溪县| 两当县| 莱州市| 通城县| 阿合奇县| 防城港市| 丽水市| 甘孜县| 安义县| 财经| 湟源县| 彭山县| 辰溪县| 平阳县| 甘德县| 乌拉特前旗| 甘泉县| 崇阳县| 壶关县| 肇源县| 镇安县| 安陆市| 景东| 丰镇市| 广南县|