puppet

Handling sensitive information with Puppet

纵饮孤独 提交于 2019-12-23 06:49:17
问题 What is the best way to store and handle sensitive information with puppet and safely distribute it to your nodes? The version I am using is 2.7. One example would be database passwords. Plain text passwords are needed on your application servers. How can one store these without leaving them lying around inside of the puppet scripts? 回答1: Using Hiera for external data lookups and encrypting that data via eyaml or GPG is a good start. https://docs.puppet.com/hiera/ https://puppet.com/blog

Setting up Vagrant with PuPHET failure

别说谁变了你拦得住时间么 提交于 2019-12-23 05:26:07
问题 I'm using PuPHET tool to setup Vagrant so that a combo vagrant+puppet should just easily boot a VM with vagrant up. Im using a Centos64 setup - php 5.4, and some minor standard debug mode. Im running this on a Mac OSX Maverick. Here is the configuration: vagrantfile-local: vm: box: centos64-x64-vbox43-1383512148 box_url: 'http://box.puphpet.com/centos64-x64-vbox43.box' hostname: null network: private_network: 192.168.56.101 forwarded_port: OhyIDGb9LuDg: host: '7943' guest: '22' provider:

VCsrepo specifying ssh key to use

[亡魂溺海] 提交于 2019-12-22 12:38:13
问题 I am trying to write a module in which puppet will be fetching an SVN repo and i want it to use a specific key in order to fetch the repository. How can I specify a ssh key to in SVN VCSrepo? On the documentation it says we can use vcsrepo for managing ssh keys but there isn't any example for SVN on how to do it at their website 回答1: Well, it's a little confusing, to be sure. The documentation states When your source uses SSH, such as 'username@server:…', you can manage your SSH keys with

VCsrepo specifying ssh key to use

南楼画角 提交于 2019-12-22 12:38:13
问题 I am trying to write a module in which puppet will be fetching an SVN repo and i want it to use a specific key in order to fetch the repository. How can I specify a ssh key to in SVN VCSrepo? On the documentation it says we can use vcsrepo for managing ssh keys but there isn't any example for SVN on how to do it at their website 回答1: Well, it's a little confusing, to be sure. The documentation states When your source uses SSH, such as 'username@server:…', you can manage your SSH keys with

Error: Could not parse application options: invalid option: --manifestdir

假装没事ソ 提交于 2019-12-22 10:08:33
问题 I was trying to install piwik-dev-environment. According to instructions I cloned the repo, installed Vagrant and executed vagrant up . The process ended with the following error: Error: Could not parse application options: invalid option: --manifestdir Full logs are here: Bringing machine 'default' up with 'virtualbox' provider... ==> default: Box 'trusty64' could not be found. Attempting to find and install... default: Box Provider: virtualbox default: Box Version: >= 0 ==> default: Box

大规模机器集群-基础环境一致性

扶醉桌前 提交于 2019-12-22 08:41:10
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 本篇讲 “故障自动维修流程”里 “环境初始化”这个环节。 初始化的问题—环境不一致 可能大家会觉得,环境初始化有什么好说的,不就是跑一堆设置系统参数的脚本么? 事实上,设置环境很容易,但是要保证环境设置正确会遇到很多问题。 环境不一致影响业务的case 先来看我们对业务sre 的访谈,因“环境设置不正确”导致业务受损的case有很多,如下所示, 因超线程未开启,导致服务在流量高峰时性能不足,产生请求拒绝 因QoS未设置,导致跨机房查询数据时,响应延迟飙高,大面积拖慢了了用户访问速度 因未设置ssd磁盘内核参数,导致磁盘处于低性能状态,影响业务读取速度 因网卡多队列未正确设置,导致单个cpu被打满,产生拒绝请求 因基础agent版本不一致,影响变更、数据配送任务,产生了脏数据 因core pattern 未正确设置,业务程序出core打满磁盘,拉长了止损时间 因环境缺失/版本不符导致业务程序依赖异常,产生请求拒绝, 如mysql/hadoop client 缺失, python/perl 版本过老 因内核网络、内存参数未正确设置,导致业务出现性能颠簸问题,产生间歇性请求拒绝,排查成本高 上述case,都是因部分机器环境未正确设置导致的,也就是机器环境存在“不一致”的情况。 环境不一致的原因 为什么会不一致

What ports does pip use?

徘徊边缘 提交于 2019-12-22 04:11:51
问题 This is hopefully a quick one to answer, I'm trying to provision a box on AWS with puppet and one of the steps involves a pip install from a requirements file. Something like this: - /usr/local/venv/ostcms/bin/pip install -r /vagrant/requirements.txt The step basically fails because it can't find any of the packages in the requirements file, but when I open the AWS box's security group up to allow "All Traffic" the pip step works. I'm trying to find the port that pip uses so I can basically

Puppet iteration string/array

我的未来我决定 提交于 2019-12-22 01:32:33
问题 Can you think of a way to solve this problem in Puppet? I have a custom fact with generates a string of IP addresses depending on the domain it is run on, it can resolve to have 1 to n addresses. "10.1.29.1" "10.1.29.1,10.1.29.5" "10.1.29.1,10.1.29.5,10.1.29.7" etc I want to add these to the host file with a generated server names of servernameX for example; 10.1.29.1 myservername1 10.1.29.5 myservername2 10.1.29.7 myservername3 So how can you do this as puppet doesn't have an array iterator

How to create separated XML nodes with “set” in Puppet using Augeas?

点点圈 提交于 2019-12-21 23:51:56
问题 I am using the Augeas tool for Puppet 3.2 and I am trying to create an XML file. I want to be able to add multiple fields with the same name into my XML doc. For instance, I want to separate node2/location2 from node1/location1 by placing it in its own "node" field. This is my code: augeas { "update template": lens => "Xml.lns", require => File["${buildpath}/tempfile.xml"], incl => "${buildpath}/tempfile.xml", changes => [ "set member/acceptors[#attribute]/node[#attribute]/nodeIdentity[

how to test the result of applying a puppet template to given test parameters

此生再无相见时 提交于 2019-12-21 17:26:54
问题 I have the following puppet template file solr.json.erb: { "servers" : [ { "port" : "<%= jmx_port %>", "host" : "localhost", "queries" : [ <% @markets.each do |market| -%> { "outputWriters" : [ { "@class" : "com.googlecode.jmxtrans.model.output.StdOutWriter", } ], "obj" : "solr/market_<%= market %>:type=queryResultCache,id=org.apache.solr.search.LRUCache", "attr" : [ "hits","hitratio"] }, <% end -%> ], "numQueryThreads" : 2 } ] } and I want to test the result of applying the template to some