Articles of 厨师

重写Nginx的食谱default_enabled_site

我在尝试禁用Nginx中的default_enabled_site遇到了一些麻烦。 # My Cookbook /cookbooks/my-server-book – /recipes/ – /attributes/ metadata.rb # Opscode Nginx /cookbooks/nginx 我已经override['nginx']['enable_default_site'] = false到我的/cookbooks/my-server-book/attributes/default.rb文件,但它看起来像Nginx的食谱覆盖我的变化 Recipe: nginx::commons_conf * template[nginx.conf] action create (up to date) * template[/etc/nginx/sites-available/default] action create (up to date) * execute[nxdissite default] action run (skipped due to only_if) 我非常感谢任何见解。 我已经尝试了以下在node.json文件没有用: { "nginx": { "default_site_enabled": false }, "run_list": ["recipe[main]"] }

在Linux上searchChef + Django的项目框架

是否有一个预先存在的,在Linux上的最佳做法项目框架(Ubuntu优先)的Chef + Django的Web应用程序? 对于生产Django系统,我们首选的设置是Supervisor,Nginx,Ubuntu和Uwsgi。 另外我们使用厨师做configurationpipe理和stream浪+厨师做开发环境pipe理。 虽然这个系统一旦启动并运行,这个系统是非常棒的,但是它们可能会非常耗费时间来正确设置。 我的理想解决scheme将是预制的厨师Github存储库,这是一个最佳实践Django部署的骨架。 (它会提供一个chef-solo.rb准备用于部署到一个云ubuntu实例和一个Vagrantfile准备用于创buildVagrant开发机器。)基本上你所要做的就是添加一个厨师食谱来部署你的应用程序代码并调整一些设置。 像这样的理想解决scheme是否存在?

没有这样的食谱 – OpsWorks无法find自定义的食谱

我试图找出添加nginx服务器作为我的node.js AWS OpsWorks机器的代理的最佳方式。 由于Chef / OpsWorks似乎无法find食谱,所以我一直无法工作。 这里是我的设置:我使用node.js图层,并为nginx的厨师食谱创build了一个git回购。 我已经启用了自定义食谱,并且已经成功地使用了这个回购的一个自定义的HAproxy属性文件。 回购的结构如下: nginx-custom –recipes –templates –attributes haproxy –attributes 奇怪的是,HAproxy覆盖工作。 nginx的食谱基本上是从OpsWorks版本复制粘贴的,有我自己的一些属性(也许b / c是一个完整的食谱是问题?)。 所以当我尝试运行nginx-custom cookbook作为设置步骤的一部分时(我已经将菜谱的名字添加到设置步骤,使用默认配方,如'nginx-custom :: default'),我得到了“没有这样的食谱“错误。 我试着用sam结果作为独立命令运行它。 我在做什么明显错误? 我应该使用Berkshelf吗? 我应该制作一个自定义图层,而不是尝试修改现有图层吗? 任何帮助赞赏。 谢谢。

如何更改厨师nginx的默认HTTP端口80?

我试图安装厨师服务器安装的机器上的Apache。 由于厨师nginx占用了80端口,Apache无法启动。 如果我想让apache默认使用80端口,是否可以将nginx的默认http端口改为另一个? 我在Internet上find一个解决scheme,在apache和nginx上设置虚拟主机,但是他们需要一个不同的FQDN作为服务器名。 我的机器使用IP而不是FQDN,所以我需要更改厨师nginx的默认HTTP端口。 我试图添加/etc/chef-server/chef-server.rb以下内容: nginx['non_ssl_port'] = 9898 然后我跑了“chef-server-ctl reconfigure”。 它没有工作。 任何人都可以帮助吗? 谢谢。 更新 我的信息是错误的更改厨师服务器设置。 这些设置应该添加到/etc/opscode/chef-server.rb的/etc/opscode/chef-server.rb中。 在chef-server-ctl reconfigure ,nginx的HTTP端口改为9898.谢谢。

在Ubuntu 12.04上与厨师编译必要的食谱错误

我正试图得到一个configuration了厨师的nginx /独angular兽ruby应用服务器。 我遇到的问题是依赖于构build必要的食谱,当运行,结果输出: ================================================================================ Error executing action `install` on resource 'package[build-essential]' ================================================================================ Chef::Exceptions::Exec ———————- apt-get -q -y install build-essential=11.5ubuntu2 returned 100, expected 0 对厨师来说,我还是个新手,我不确定为什么会这样。 有任何想法吗?

厨师独奏错误Errno :: ENOENT:没有这样的文件或目录 – solo.rb

我试图在Ubuntu 12.04服务器上通过opscode食谱安装nginx。 我知道这取决于ohai,所以我也下载了食谱。 当我跑步 $ sudo chef-solo -c solo.rb 我得到一个错误说 FATAL: Errno::ENOENT: No such file or directory – solo.rb 不知道当我的当前目录中如何solo.rb丢失。 $ ls cache cookbooks node.json node.json~ solo.rb solo.rb~ 这是来自debugging的输出 $ sudo chef-solo -l debug -c solo.rb [Sun, 20 May 2012 14:00:10 -0400] INFO: *** Chef 0.10.10 *** [Sun, 20 May 2012 14:00:10 -0400] DEBUG: Building […]

如何在使用Chef和Vagrant时禁用默认的nginx网站?

我正在使用Berkshelf,Chef和Vagrant,我正在尝试configuration在nginx上运行的自定义网站。 我使用opscode nginx配方,然后编写我自己的自定义网站的配方。 当我运行vagrant时,我得到一个关于不禁用默认nginx网站的错误。 我发现了几个不同的build议,但似乎没有任何工作。 错误: STDOUT: STDERR: nginx: [emerg] a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites- enabled/kyleboon.me:2 nginx: configuration file /etc/nginx/nginx.conf test failed 我的Berksfile: site :opscode metadata cookbook 'nginx' 我定义的'roles / web.json'angular色: { "name": "web", "chef_type": "role", "json_class": "Chef::Role", "description": "The base role for systems that serve HTTP traffic", "default_attributes": { "nginx": { […]

chef-recipe ArgumentError未知指令:“\ n”

我正在使用厨师服务器11,并使用厨师提供gem来自动化云基础架构。 我有一个简单的配方来创build一个AMI的实例,但它失败了一个ArgumentError未知指令:“\ n”错误 我的厨师食谱是 require 'chef/provisioning/aws_driver' with_driver 'aws::us-east-1' machine 'new-chef-instance' do machine_options :ssh_username => 'root', :bootstrap_options => { :key_name => 'mykeyname', :image_id => 'myamiid', :instance_type => 't2.micro', :subnet_id => 'mysubnetid', :security_group_ids => 'my-security-group' } end 执行这个配方后,像这样 chef-client -z recipes/createserver.rb 创build实例后出现以下错误 [2015-08-24T11:42:17+00:00] INFO: Processing chef_node[new-chef-provision] action create (basic_chef_client::block line 57) ================================================================================ Error executing action `converge` on […]

如何为一个尚未存在的用户安装一个目录

我试图使用共享文件夹机制来安装一个数据磁盘,除了该目录默认为vagrant并且tomcat6不能写入它之外,这个工作很好。 所以我想我可以使用以下命令将磁盘的所有者设置在vagrantfile中: config.vm.synced_folder "data/", "/data", owner: "tomcat6", group: "tomcat6" 但tomcat6用户不存在,因为tomcat配方还没有运行,所以stream浪者失败: Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available. Please verify that the guest additions are properly installed in the guest and can work properly. The command attempted was: mount -t vboxsf -o uid=`id -u tomcat6`,gid=`getent […]

厨师生成食谱

创build食谱时,我遇到了问题,如下所示: 这有什么关系? 我已经安装了chef-dk 。 我是厨师新手,如果您需要更多关于我的环境的信息,请不要犹豫。 root@chef-work:/home/ubuntu/chef-repo/cookbooks# chef generate cookbook learn_chef_apache2 perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_PAPER = "nb_NO.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). Can't open generate: No […]