chef

Chef: Installing a Windows Service

天大地大妈咪最大 提交于 2019-12-08 07:16:44
问题 I'm new to this forum (so apologies if I've posted in the wrong place) and also VERY NEW to Chef. I've been all around the houses trying to get a clear example of how to install a Windows service. Basically I want the Chef equivalent of "SC create" The recipe I'm trying to use is this: windows_package "RMS_EU" do installer_type :msi action :install source "c:\Servies\V5.5\EUNTRouteManager\Routing.WindowsService.exe" end When I run this I get error saying theres a problem with msi. I've tried

chef-server stuck ruby_block[supervise_rabbitmq_sleep] action run on Docker container

China☆狼群 提交于 2019-12-08 05:15:39
问题 I have an ubuntu host running docker1.2 . On top of it I have created a centos6 container which is running great! When I tried to install chef-server-11.x version it gets stuck here: * file[/opt/chef-server/sv/rabbitmq/down] action delete (up to date) * link[/opt/chef-server/init/rabbitmq] action create (up to date) * link[/opt/chef-server/service/rabbitmq] action create (up to date) * ruby_block[supervise_rabbitmq_sleep] action run After Googling, I found we need to specify platform here in

Bootstrapping issues in Chef

混江龙づ霸主 提交于 2019-12-08 01:34:28
问题 I have setup a basic infrastructure using chef. This includes a local chef server(ubuntu based), workstation and an ubuntu based server(to be used as the node). Please note that the entire infrastructure lies behind the firewall in my office network. And I have made necessary proxy settings for the servers to access the internet. So here is the problem - When I try to bootstrap the node using - knife bootstrap <node's ip> --sudo -x <username> -P <password> -N "<name>" i get the following

git error while deploying through chef

白昼怎懂夜的黑 提交于 2019-12-07 19:49:23
问题 i am trying to deploy rails app through chef code. recipe contains code deploy_revision "testapp" do repo "REPO_URL" ssh_wrapper "/home/ubuntu/.ssh/chef_ssh_deploy_wrapper.sh" environment({ "RAILS_ENV" => "staging" }) deploy_to "/home/ubuntu/testapp" branch "master" user "ubuntu" group "ubuntu" scm_provider Chef::Provider::Git end and sshwrapper file contains exec ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no github.com -i "/home/ubuntu/.ssh/id_rsa" "$@" when i ran bootstrap

How to specify cookbook path in .kitchen.yml file for chef_solo provisioner?

淺唱寂寞╮ 提交于 2019-12-07 17:13:36
问题 I want to specify cookbook paths using chef_solo as a provisioner in Test Kitchen. We are not using Berkshelf or chef_zero at this time. I set cookbooks_path in my .kitchen.yml file, but it seems like the chef_solo provisioner ignores that flag. See stack trace, below. .kitchen.yml --- driver: name: vagrant provisioner: name: chef_solo require_chef_omnibus: 11.8.0 roles_path: '../../roles' data_bags_path: '../../data_bags' environments_path: '../../environments' cookbooks_path: '../cookbooks,

How to I get a chef custom lwrp to implement notifies and not_if?

谁说胖子不能爱 提交于 2019-12-07 16:45:00
问题 I write a custom Lightweight resource. But the notifies and only_if is not recognized. Anyone else get this working? I use these in opsworks supplies resources. So I know I am using them correctly. Unfortunately proprietary code, so I can't post the code. 回答1: Ok. RTFM. Well not really. I did not find this specific issue covered. If you write your own light weight resource and want to be able to use notifies, then use new_resource.updated_by_last_action(false) or new_resource.updated_by_last

How to update nginx via Chef

假如想象 提交于 2019-12-07 13:54:34
问题 Note this is a copy of a question I asked on ServerFault but was unable to get an answer for. Hoping I can get some feedback here. I am a developer who recently inherited our previous devops person's chef setup. I'm running Chef 10 server and have realized that the nginx cookbook from opscode still uses nginx version 1.2.6. Since there are many security patches that have been released I'd like to move to 1.4.1 and feel that Chef should make this very easy. However it has proven to be

Overriding Cookbook Attribute in Vagrantfile Custom JSON Data

余生颓废 提交于 2019-12-07 13:51:20
问题 How do you access node.override using chef.json in a Vagrant file? For example, using vagrant-berkshelf , I'm trying to install a particular Maven version based on Custom JSON Data in the Vagrantfile : chef.json = { 'maven' => { 'version' => '3.0.5' } } cookbooks\maven_custom\attributes\default.rb default['maven']['version'] = "3.2.1" cookbooks\maven_custom\recipes\default.rb Chef::Log.info(node['maven']['version']) When I run vagrant provision , the following gets printed out: 3.2.1

Access Attributes Across Recipes

喜欢而已 提交于 2019-12-07 12:51:48
问题 Is it possible to configure attributes that are accessible across recipes? If yes, how? I've configured attributes for each recipe, but there is significant repetition I'd like to eliminate. 回答1: The way Chef works is that at the start of a convergence Chef iterates through all cookbooks that have recipes that will be run on the node (either directly on the run list or referenced via include_recipe ). For each cookbook Chef will then read in all of the attribute files stored in the attributes

home directory is not created with adding user resource with chef

大憨熊 提交于 2019-12-07 07:05:24
问题 On a vagrant box precise64 (ubuntu 12.04) While creating a user resource with Chef, the home directory is not created: My recipe: user "myuser" do supports :manage_home => true shell "/bin/bash" home "/home/myuser" comment "Created by Chef" password "myencryptedpassword" system true provider Chef::Provider::User::Useradd action :create end When I authenticate: $ su - myuser Password: No directory, logging in with HOME=/ Update - The workaround for precise64 (Ubuntu 12.04 64bit) directory "