Articles of 傀儡

Vagrant OS X主机nfs共享权限错误 – 未能将所有者设置为“1000”

我是stream浪汉和木偶新手,我创build了一个Debian Squeeze加独立木偶的基本框,使用这里的说明来安装Puppet以及Puppetlabs软件包 。 该框本身似乎成功导入,但一旦我开始configuration它,我得到的错误似乎是与主机上的NFS共享。 1000是vm上的Vagrant用户的uid。 错误: Error: Failed to set owner to '1000': Operation not permitted – /vagrant/www/index.php Error: /Stage[main]/Perchdemo::Sites::Create/File[/vagrant/www/index.php]/owner: change from 501 to vagrant failed: Failed to set owner to '1000': Operation not permitted – /vagrant/www/index.php 这发生在我使用Puppet将index.php文件复制到主机文件系统上的share / vagrant / www时。 我已经使用这个Puppet模块在一个独立安装的虚拟机上的文件被托pipe在虚拟机的文件系统上,理想情况下,但我希望他们在虚拟机共享上。 用更多的信息编辑。 当我使用puppetlabs apache模块创build虚拟主机时,最初发生了错误。 不pipe哪个用户我尝试强制创build,都会失败,并出现相同的错误。 我的stream浪文件如下。 Vagrant::Config.run do |config| config.vm.box = "squeeze64" config.vm.network […]

如何在使用pecl安装php扩展时传递configuration选项?

有一个PHP扩展,当我用pecl命令安装时,需要传递一个configuration选项。 我找不到办法做到这一点。 当然,我可以手动安装它,但是我需要它可以用一个命令来安装它 – 这样它就可以通过puppet轻松安装。 有任何想法吗?

Puppet&Hiera:$ variable在访问它时不是一个散列或数组

我使用的是Puppet 3.2.2和Hiera 1.2.1。 我写了一个puppet模块,init.pp的内容是: class install( $common_instanceconfig = hiera_hash('common_instanceconfig'), $common_instances = hiera('common_instances') ) { define instances { common { $title: name => $title, path => $common_instanceconfig[$title]['path'], version => $common_instanceconfig[$title]['version'], files => $common_instanceconfig[$title]['files'], pre => $common_instanceconfig[$title]['pre'], after => $common_instanceconfig[$title]['after'], properties => $common_instanceconfig[$title]['properties'], require => $common_instanceconfig[$title]['require'] , } } instances {$common_instances:} } 而hiraradata文件是: classes: – install common_instances: […]

让Puppet清单/模块可供广大读者使用

我们的团队在过去六个月里把木偶推出了我们的系统。 我们正在pipe理各种资源,其中一些有敏感数据(用于自动备份的数据库密码,专用软件的许可证密钥等)。 其他团队希望参与(或至less能够看到)我们的模块和清单的开发。 其他人如何继续通过Puppet获得安全的数据,同时与更多的观众分享模块和体现?

木偶文件传输慢

我在不同的数据中心有一个木偶大师和奴隶。 它们之间的延迟是〜40ms。 当我在奴隶上运行“木偶代理 – testing”来应用最新的清单时,需要360秒才能完成。 经过一番挖掘,我可以看到减慢的主要原因是文件传输。 似乎要花费大约10秒才能传输每个文件。 这些文件只有很小(configuration文件),所以我不明白为什么他们会花这么长时间。 这是我清单中文件的一个例子: file { "/etc/rsyncd.conf" : owner => "root", group => "root", mode => 644, source => "puppet:///files/rsyncd/rsyncd.conf" } 运行puppet-profiler我看到这个: 10.21s – File[/etc/rsyncd.conf] 也似乎我不能一次使用puppet更新多个服务器。 如果我同时运行两台服务器,那么木偶需要两倍的时间。 我已经改变了木偶大师从使用webrick到杂种,但这似乎没有帮助。 这使得痛苦的部署变化。 一个简单的configuration更改可能需要一个小时才能推出到所有服务器。

将服务器添加到known_hosts

我想从命令行中将github.com添加到known_hosts文件中,因为我创build了一个puppet清单来configuration远程服务器。 我努力了: "ssh-keyscan -H github.com > /home/ubuntu/.ssh/known_hosts" 但是当服务器试图访问github时: Failed to add the RSA host key for IP address '207.97.227.239' to the list of known hosts (/home/ubuntu/.ssh/known_hosts). 我也试过: "ssh-keyscan -H github.com,207.97.227.239 > /home/ubuntu/.ssh/known_hosts"` 但访问github抛出: Host key verification failed. 我敢肯定,这是没有额外的用途,但如果我ssh我的服务器,然后ssh github,并按照步骤,我收到以下消息Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts那么它会完美的工作。 谢谢

无法呼叫标志:无法find木偶的证书请求

我使用以下指南开始使用ec2上的puppet。 https://help.ubuntu.com/12.04/serverguide/puppet.html 在最后一步,当我试图从木偶大师签署木偶客户端,我得到以下错误 root@ip-10-248-27-66:/home/ubuntu# puppetca –sign ec2-54-245-56-210.us-west-2.compute.amazonaws.com err: Could not call sign: Could not find certificate request for ec2-54-245-56-210.us-west-2.compute.amazonaws.com 这是puppetmaster上的/etc/hosts的输出 127.0.0.1 localhost puppetmaster 10.248.34.162 ec2-54-245-56-210.us-west-2.compute.amazonaws.com puppet # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 这是puppet客户端上的/etc/hosts的输出 127.0.0.1 localhost 10.248.27.66 ec2-50-112-220-110.us-west-2.compute.amazonaws.com puppetmaster […]

是否有可能使用Puppet来确保目录中的多个文件都存在,而无需定义所有文件?

我有几百个具有不同configuration文件的一次性服务器,这些文件需要存在于一个目录中。 这些文件的副本驻留在木偶大师身上。 在我的其中一个类中,我有一组默认的configuration,总是被推送到节点,如下所示: file { "/etc/someprogram/config/000-default": ensure => "present", owner => "root", group => "root", mode => 0764, source => "puppet:///modules/someprogram/000-default", } 我想要的是这样的: $filearray = directory listing of /etc/puppet/modules/someprogram/files/$fqdn with each file as an element into array $filearray.each( file { "/etc/someprogram/config/$filename": ensure => "present", owner => "root", group => "root", mode => 0764, source => […]

滚动更新与傀儡,ansible或织物

我有一些docker服务器与他们之前的负载均衡器。 现在我想更新我的应用程序没有停机。 当一个docker停机并且不再可达时,负载均衡器将自动从列表中删除,所以这不是问题。 主要的问题是避免停机时间:所以,我必须确保一次只有一个docker重新启动 – 或者确保至less有N个docker在线! 目前,我正在使用一个简单的bash脚本,我需要手动等待一个docker重新上线,然后再重新启动下一个docker,等等。 现在bash对于这种东西并不是最理想的,我希望有更好的工具可以使整个任务自动化。 例如,如果第n个docker在线,我可以使用一个简单的ping URL http://jetty-number-n.com/ping来响应OK(200)。 我怎么能解决这个任务,并用哪个工具? 感谢@ceejayoz我find了可靠的滚动更新 。 但它仍然不是最理想的,因为我需要设置一个固定的超时时间。

如何“更新”/“aptitude安全升级”许多主机?

我有两本关于Puppet的书,没有一本提到如何aptitude safe-upgrade yum update或aptitude safe-upgrade 。 所以我觉得木偶不能,我觉得很难相信。 题 你将如何推动yum update或aptitude safe-upgrade每个月在许多不同的主机上aptitude safe-upgrade ?