puppet

Why config files should't be changed line-by-line with Chef / Puppet?

*爱你&永不变心* 提交于 2020-01-02 01:55:25
问题 Why is changing lines in configuration file considered an anti-pattern in Chef or Puppet? It's something like bad habit, as I understood. I assume that this file-editing is done in some idempotent way and with advanced tools (augeas for example). Why is deploying the whole files, with ERB templates, considered a preferred method? You can find a lot of examples where dev-ops are suggesting usage of templates instead of file-editing. For example here, here, here, etc. 回答1: Actually there is a

Changing puppet module source

扶醉桌前 提交于 2019-12-31 04:40:09
问题 I checked Puppet's documentation but didn't find any suggestions about it. I have Puppet module for Monit - https://forge.puppetlabs.com/dhoppe/monit . It already has some predefined configurations for some services in files folder - https://github.com/dhoppe/puppet-monit/tree/master/files/common/etc/monit/conf.d . I want to add more, but not sure how to do it in the correct puppet way. Is it ok to add new service configuration to local `puppet/module/monit/files/ folder? Will this folder be

Windows Puppet agent does not connect to the AWSOpsWorks Puppet Enterprise master

不打扰是莪最后的温柔 提交于 2019-12-30 10:52:58
问题 I have created the puppet master using aws opsworks. and I am able to add ami linux nodes automatically to the puppet master. I am having issues when I tried to to add a windows 64 bit node to my puppet master by following this link https://puppet.com/docs/pe/2017.3/installing/installing_agents.html#install-windows-agents-with-the-msi-package I copied the puppet-agent-x64.msi from the puppet master present in location to the windows node and /opt/puppetlabs/server/data/packages/public/

Windows Puppet agent does not connect to the AWSOpsWorks Puppet Enterprise master

╄→尐↘猪︶ㄣ 提交于 2019-12-30 10:52:23
问题 I have created the puppet master using aws opsworks. and I am able to add ami linux nodes automatically to the puppet master. I am having issues when I tried to to add a windows 64 bit node to my puppet master by following this link https://puppet.com/docs/pe/2017.3/installing/installing_agents.html#install-windows-agents-with-the-msi-package I copied the puppet-agent-x64.msi from the puppet master present in location to the windows node and /opt/puppetlabs/server/data/packages/public/

Windows Puppet agent does not connect to the AWSOpsWorks Puppet Enterprise master

本秂侑毒 提交于 2019-12-30 10:52:21
问题 I have created the puppet master using aws opsworks. and I am able to add ami linux nodes automatically to the puppet master. I am having issues when I tried to to add a windows 64 bit node to my puppet master by following this link https://puppet.com/docs/pe/2017.3/installing/installing_agents.html#install-windows-agents-with-the-msi-package I copied the puppet-agent-x64.msi from the puppet master present in location to the windows node and /opt/puppetlabs/server/data/packages/public/

OpenSSL vs GPG for encrypting off-site backups?

梦想的初衷 提交于 2019-12-29 10:13:13
问题 Given the option between using GPG and OpenSSL for local encryption before pushing archives to an off-site backup location, what are the benefits and drawbacks of each solution? Background: I currently manage a server infrastructure based on Ubuntu 14.04.1 with all current patches applied as they become available. All of these systems are headless, automatically built using vetted preseeds and automation tools, and run in virtual machines via KVM on uniform Intel-based hardware. We have a

Puppet常识梳理

邮差的信 提交于 2019-12-26 07:14:31
Puppet简单介绍 1)puppet是一种Linux/Unix平台下的集中配置管理系统,使用自有的puppet描述语言,可管理配置文件、用户、cron任务、软件包、系统服务等。puppet把这些系统实体称之为资源,puppet的设计目标是简化对这些资源的管理以及妥善处理资源间的依赖关系。 2)Puppet是开源的基于Ruby的系统配置管理工具,puppet是一个C/S结构。所有的puppet客户端同一个服务器端的puppet通讯,每个puppet客户端每半小时(可以设置)连接一次服务器端,下载最新的配置文件,并且严格按照配置文件来配置服务器。 配置完成以后,puppet客户端可以反馈给服务器端一个消息, 如果出错,也会给服务器端反馈一个消息。 3)Puppet是用于大规模集群管理的神器。其本身使用Ruby语言开发,基于C/S架构。在每台机器上部署的客户端每隔一个指定的时间会连接到Master检查资源变化情况,若资源发生变化,将按配置动作进行相应的操作。 4)Puppet将所有可操作对象抽象为资源,目前涵盖了40多种,如:File、User、Group、Host、Package、Service、Cron、Exec等。 5)Puppet 通过抽象资源的方式,使得每台机器能够“清楚”其本身“应该”是什么“状态”,而客户端根据当前是否达到这个状态决定采取指定的动作。这使得Puppet

Is this the correct way to change a config file using puppet?

送分小仙女□ 提交于 2019-12-25 08:49:59
问题 I have a rails app and I'd like to change the ./config/environment/production.rb file to have a different config based on what I want that server to do. So, I'm going into the .rb file from the .pp file and changing some strings then restarting the service. This just seems really poor form to me. Is there a better way to do this? I've been asked to deliver 1 RPM and change the config via puppet, so... class Cloud-widget($MServer, $GoogleEarthServer, $CSever) { package { "Cloud-widget": ensure

Puppet: stopping service on individual nodes

倾然丶 夕夏残阳落幕 提交于 2019-12-25 07:48:20
问题 Puppet can be so frustrating sometimes. I have multiple nodes that use a service "poodle", and it has been configured this way. # SITE.PP node 'tweedle.example.com' { include basicstuff include poodle } node 'beetle.example.com' { include basicstuff include poodle } ## POODLE MODULE, manifests/init.pp class poodle { class {'poodle::install': } class {'poodle::config': } class {'poodle::service': } Class ['poodle::install'] -> Class ['poodle::config'] ~> Class ['poodle::service'] } ... class

augeas in puppet does not change file

眉间皱痕 提交于 2019-12-25 07:16:50
问题 I want to manage the contents of the carbon.conf file using Augeas from Puppet. I have used Augeas before in Puppet for managing an xml file and that worked great. However this time when the puppet catalog is applied, nothing happens to the carbon.conf file. There is also no error in the log. Here's my code in the puppet manifest file: augeas { 'cache config': notify => Service[carbon-cache], incl => '/opt/graphite/conf/carbon.conf', context => '/cache', lens => 'Carbon.lns', changes => [