Articles of 厨师

刀Vsphere密码纯文本

我使用knife-vsphere插件为厨师与我们的vSphere主机进行交互。 作为刀-vsphere插件的configuration的一部分,似乎你必须input一个明文密码,我认为这似乎是错误的。 当我在我的食谱中设置用户时,我以前通过openssl passwd -1 "plainTextPassword"运行密码来获取哈希值,我设置为我创build用户,我不知道如果发生这种情况如果它在节点上,或者如果它在刀上。 有谁知道,如果你可以使用相同的哈希方法(或其他)本地存储我的密码让我login到vSphere或我必须把它作为纯文本? 我目前的刀rb文件如下所示: log_level :info log_location STDOUT node_name 'a-user' client_key 'C:/Users/user/.chef/a-user.pem' validation_client_name 'chef-validator' validation_key 'C:/Users/user/.chef/chef-validator.pem' chef_server_url 'https://ourChefHost01:443' syntax_check_cache_path 'C:/Users/user/.chef/syntax_check_cache' cookbook_path [ 'C:/Work/chef/chef-repo/cookbooks' ] ssl_verify_mode :verify_peer knife[:vsphere_host]="VHost" knife[:vsphere_user]="User" knife[:vsphere_pass]="IWantThisToBeAHashIfPossiblePlease_ThanksInAdvance!" knife[:vsphere_dc]="Region_1" knife[:vsphere_insecure]=false

仅当新内核安装/更新时才需要重新启动Linux机器

我们有一个用例,我们只有在通过yum_package安装/升级新的内核版本时才需要重启一台linux机器。 目前我正在使用厨师独奏来运行这个。 ruby_block 'kernel-update-done' do action :nothing block do Chef::Application.fatal!('Kernel was updated. Please reboot and start chef again.') end end yum_package node[:linux][:packages][:kernel] do action [:install, :upgrade] notifies :upgrade, 'ruby_block[kernel-update-done]', :immediately end 在阅读一些博客的同时,我开始知道处理这些情况的最好方法是编写自定义的LWRP。我是写LWRP的新手,想知道如何继续。

centOS / RHEL linux服务器通过AD实现集中authentication

我们有3个环境testing开发和生产,每个有40多个Linux服务器。 所有这些环境都需要通过ADbuild立集中authentication。 我可以用什么来达到这个目标? AD- Windows server 2008 Linux版本 – CentOS 6.5 / 6.5 / 5.10 / 5.11 / 7.01 你可以指导一下,可以使用厨师服务器通过AD for Linux服务器推出集中authentication来利用自动化。 任何高层次的步骤来实现?

为什么Web平台安装程序每40分钟尝试修复一次?

我看到Web Platform安装程序在我的win 2008 r2服务器(Build:7601:Service Pack 1)上执行修复/重新安装。 Web平台安装程序已经通过厨师(“iis”和“webpi”社区食谱)最初安装在本机上。 现在Web PI似乎已经开始以大约40分钟的时间间隔重新安装,最终导致IIS重新启动并破坏机器上的Web应用程序。 我试图调查事件日志,这没有做任何解释为什么发生这种事情/我怎么能阻止它。 通过打开MS安装程序的详细日志logging,我得到了一些信息,但没有什么是跳出来的: http : //pastebin.com/5yRYnQ0e 什么会触发Web平台安装程序尝试重新安装,以及如何防止它?

CentOS7 – 厨师(开源)设置错误

在CentOS7上,此刻一直在勉强搭build一个主厨服务器。 厨师pipe理员似乎正在做的很好。 我“(1)sudo wget https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-server-11.1.3-1.el6.x86_64.rpm和(2)sudo rpm -Uvh chef-server-11.1.3-1.el6.x86_64.rpm“每个标准程序我总是这样做。 那些运行顺利,但在“sudo chef-server-ctl reconfigure” 获得跟随输出错误。 我validation了我有openSSL和'build-essential'安装。 Starting Chef Client, version 11.12.2 Compiling Cookbooks… Recipe: chef-server::default * directory[/etc/chef-server] action create (up to date) [2015-04-03T18:23:23-07:00] WARN: Cloning resource attributes for directory[/var/opt/chef-server/chef-server-webui/etc] from prior resource (CHEF-3694) [2015-04-03T18:23:23-07:00] WARN: Previous directory[/var/opt/chef-server/chef-server-webui/etc]: /opt/chef-server/embedded/cookbooks/chef-server/recipes/chef-server-webui.rb:31:in `block in from_file' [2015-04-03T18:23:23-07:00] WARN: Current directory[/var/opt/chef-server/chef-server-webui/etc]: /opt/chef-server/embedded/cookbooks/chef-server/definitions/unicorn_config.rb:21:in `block in […]

在厨师使用2个自定义资源生成configuration文件

我想描述一下我的服务器 my-container("name") my-feature("name", "config") 我的容器描述了一个Docker容器,它在名字文件夹中有一些自定义的Dockerfile。 当我添加my-feature()到服务器定义时,我想将一个额外的部分添加到Dockerfile中,而其余部分与my-container相同。 如何在厨师中实现这个或类似的configuration? 我阅读了厨师模板中的部分内容,但不确定是否可以在这种情况下使用。 谢谢你,罗马

我可以使用厨师进行MSI的期望状态configuration(DSC)吗?

我想弄清楚如何使用厨师MSIs。 我想要的是我可以指定产品,版本和下载链接。 厨师然后会查询MSI数据库,检查版本,而不是匹配,下载并通过链接安装。 厨师似乎有积木,但我不能完全弄清楚他们是如何结合在一起的。 是否有可能做到这一点? 谢谢! 埃里克

如何使用nginx / passenger / mysql / rvm设置vagrant?

有人请评价或帮助我的stream浪文件和厨师独奏? 这是一个Ubuntu的服务器14.04LTS本地VM与rvm,ruby2.2,Nginx,乘客,MySQL …很常见。 我想要的是能够configuration这些包的stream浪ubuntu盒,但由于某种原因,该过程失败。 Vagrantfile # -*- mode: ruby -*- # vi: set ft=ruby : # All Vagrant configuration is done below. The "2" in Vagrant.configure # configures the configuration version (we support older styles for # backwards compatibility). Please don't change it unless you know what # you're doing. Vagrant.configure(2) do |config| # The […]

我的克隆厨师服务器有同步收件人的问题

我inheritance了一个复杂的公司基于云的服务器系统,有几个使用Chef的节点来设置不同的节点。 Chef + Ironfan + Berksshelf是Chef服务器上最重要的元素。 对于一个冗余系统,我把完全工作的主厨服务器克隆到另一个云实例。 (=完全备份和复制几乎所有文件+手动工作在一些configuration文件+ chef-server-ctl reconfigure +重新启动) 克隆的服务器具有不同的名称/不同的IP,并且在第一个视图上看起来已经完美。 Web界面已经启动并正在运行。 我可以使用Ironfan命令启动/ bootstrap / sync / kill Cloud节点。 我能够从另一个厨师服务器移动一些实例到这个。 但是,在新创build的节点的“kick”命令中,我正面临一个令人讨厌的问题。 客户端节点尝试从厨师服务器下载一些配方,下载失败。 错误信息: euca-10-130-130-10.eucalyptus.escloc59.eecloud.xxx-net.net [2015-11-10T16:01:00+02:00] INFO: Loading cookbooks [[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]] euca-10-130-130-10.eucalyptus.escloc59.eecloud.xxx-net.net Synchronizing Cookbooks: euca-10-130-130-10.eucalyptus.escloc59.eecloud.xxx-net.net [2015-11-10T16:01:00+02:00] ERROR: Server returned error […]

厨师 – 通知多个包

我试图在CentOS 7上部署postgresql 9.4 package ['postgresql94-server', 'postgresql94-contrib'] do action :nothing end execute "yum check-update" do command "yum check-update" action :nothing end package 'Install Postgres Repo' do package_name 'pgdg-redhat94' source '/tmp/pgdg-redhat94-9.4-2.noarch.rpm' notifies :run, 'execute[yum check-update]', :immediately notifies :install, 'package[postgresql94-server, postgresql94-contrib]', :immediately action :nothing end execute 'Download Postgres repo RPM' do command 'curl http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-redhat94-9.4-2.noarch.rpm -o /tmp/pgdg-redhat94-9.4-2.noarch.rpm' notifies :install, […]