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

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
}
主站蜘蛛池模板: 泸州市| 射阳县| 通河县| 阆中市| 呼伦贝尔市| 连城县| 镶黄旗| 枣强县| 盘山县| 商丘市| 金华市| 大悟县| 微山县| 松潘县| 贵阳市| 武城县| 乃东县| 阜南县| 新昌县| 陆川县| 兴隆县| 集贤县| 礼泉县| 赫章县| 射阳县| 鄄城县| 阳西县| 忻州市| 塔城市| 塔城市| 肃北| 天柱县| 墨脱县| 西乌| 东安县| 湟源县| 云和县| 三明市| 托克逊县| 楚雄市| 资源县|