gkra so... berks from chefdk is apparently broken? 00:01
(on my box) 00:01
I get: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/buff-config-0.4.0/lib/buff/config/ruby.rb:30:in `rescue in initialize': uninitialized constant Buff::Config::Ruby::Evaluator::Chef (Buff::Errors::InvalidConfig) 00:02
Majost huh 00:04
coderanger jtimberman: compiling gecode http://i.coderanger.net/WmW7P.png :) 00:20
sarkis_ jtimberman: is the logrotate cookbook no longer supported? 00:25
lyrua hello 00:32
if I have an issue with chef (windows, and powershell) where should I post my question to ? 00:33
coderanger lyrua: Here is fine 00:33
lyrua: Though the ML might have more Windows-knowledgable folks 00:34
lyrua ML ? 00:34
coderanger mailing list 00:35
lyrua where can I get the mailing list ? 00:35
coderanger http://lists.opscode.com 00:36
lyrua my question is: has anyone tried to call powershell.exe from chef run? it worked on my vagrant, my not in production, it returned -65536 code 00:36
chef-client called powershell,exe just fine locally, but in production chef-client just failed to invoked it 00:37
thanks coderanger. I'll give it a shot 00:38
coderanger lyrua: Are you not using the powershell resource? 00:38
lyrua I tried that too, powershell_script and tried with architecture, but failed with same code error 00:39
coderanger lyrua: Whats the actual output, if any? 00:39
jidar I had a lot of problems with the PS provider 00:39
lyrua STDERR: Internal Windows PowerShell error. Invoking managed Windows PowerShell failed with error 8007000e 00:39
Expected process to exit with [0], but received '-65536' 00:39
jidar it would fail with out of memory errors for no reason, so I ended up just writing the files to disk and calling powershell.exe manually, which worked a bit better 00:39
lyrua: the process is returning a non 0 return code, so chef thinks its failing to execute properly. Have you tried running the command manually on the same machine, with the same user? 00:40
FireBeyond Confused as to why the user attribute is being ignored in this execute block 00:41
http://pastebin.com/mWpgQWPB 00:41
lyrua yes I tried running manually with same user, called 32bit and 64bit powershell 00:41
and both worked 00:41
coderanger FireBeyond: how is that script checking if it is root? 00:42
jidar what's the exact command you're using? 00:42
FireBeyond The binary for zabbix_agentd tests for it. I can't run as root at the command line, and don't want to 00:43
lyrua there is a powershell script ps1 and I just want to run it 00:43
FireBeyond but when I specify user 'myuseraccount', it seems to be ignored 00:43
in the execute block 00:43
lyrua powershell.exe -executionpolicy Bypass something.ps1 00:43
ps1 is very simple, it will just create a text file with date in it 00:44
coderanger FireBeyond: If I'm reading this correctly, it is trying to change user to zabbix which doesn't exist? 00:44
jidar powershell.exe -NoProfile -ExecutionPolicy unrestricted -WindowStyle Hidden -File 00:46
that's how I kicked stuff off 00:46
lyrua there is only one email from Opscode: opscode-announce@lists.opscode.com? Is it ok to emailing a question to it ? 00:46
coderanger lyrua: You want the chef list 00:47
lyrua: http://lists.opscode.com/sympa/info/chef 00:47
lyrua oh i was in Home tab, thanks coderanger 00:48
coderanger FireBeyond: Yeah, this is just a terribad error message 00:48
FireBeyond coderanger: the binary certainly does check for that. but still doesn't explain why the chef recipe isn't even trying to execute it as 'myuser' 00:48
coderanger FireBeyond: Had to go grep the code 00:48
FireBeyond: Chef isn't involved 00:48
lyrua jidar: I'll try that 00:48
coderanger FireBeyond: You told zabbix to run as "zabbix", which doesn't exist, so it falls back to root, and then errors 00:49
FireBeyond: http://git.zabbixzone.com/trunk/.git/blob/HEAD:/src/libs/zbxnix/daemon.c#l156 00:49
FireBeyond Hrm, that much makes sense, and forgive me if it's dense of me, but if i create a code block in my recipe that says execute "start zabbix" do, user "username", command "/usr/local/sbin/zabbix_agentd", end 00:51
that -won't- execute the command as user x? 00:51
(the simple solution, and the one i'm implementing right now is to create the zabbix account, but just trying to further my understanding) 00:52
someara FireBeyond that should execute as username 00:52
FireBeyond right, so, looking at the code block in the error, chef sees that too, and yet is (evidently) not executing as that username, or the agent wouldn't complain that it can't run as root 00:53
coderanger FireBeyond: Your zabbix config file has an invalid user specified in it 01:00
FireBeyond: Either create the zabbix user or fix your config 01:00
someara that it doesn't complain that it can't run as brokenuser and executes as root feels like a bug to me 01:00
FireBeyond To be sure, changing to the zabbix user fixes the issue 01:01
Majost_ coderanger, Correct me if I am wrong; but to use poise I should be using chef_gem in my default recipe, yes? 01:02
coderanger Majost_: For what? 01:02
Majost_ I didn't think it was part of chef proper 01:03
coderanger Its a cookbook 01:03
Majost_ ah right 01:03
coderanger Just add "depends 'poise'" to your metadata.rb 01:03
jidar lyrua: full example of how I called it from chef: http://pastebin.com/uJ7cBAA5 01:07
tempname Has anyone ever run into this issue while using the apt cookbook? Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) 01:11
gkra okay... if i run berks (from chefdk) inside my chef repo, it bombs. if I run it outside, it doesn't, but it has no configs. 01:23
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/buff-config-0.4.0/lib/buff/config/ruby.rb:30:in `rescue in initialize': uninitialized constant Buff::Config::Ruby::Evaluator::Chef (Buff::Errors::InvalidConfig) 01:24
any idea how to track down *what* config it's barfing on? 01:24
oh !@%3 me 01:27
# Allow overriding values in this knife.rb 01:28
home_dir = ENV['HOME'] || ENV['HOMEDRIVE'] 01:28
knife_override = "#{home_dir}/.chef/knife_override.rb" 01:28
Chef::Config.from_file(knife_override) if File.exist?(knife_override) 01:28
if I comment out that last line, berks works fine. 01:28
jidar wacky 01:34
gkra nice 01:34
now berks is failing to git clone the requested cookbooks from github 01:34
is there some special ssh magic for that? 01:35
wait 01:36
I think github might be having problems... 01:37
sarkis check the status page 01:38
https://status.github.com/ 01:38
hmm this is strange, anyone using chef solo + sethvargo users cookbook? 01:39
it doesn't seem to be picking up new .json files in the data_bag/users/ folder 01:39
gkra so... 01:48
with the old berks, I could have a Berksfile in my chef repo dir, and just work with that... 01:49
is that no longer the case? 01:49
traviscline anyone know of an example of someone programatically generating runit_service services (I don't want to rely on having particular template files on disk) 01:50
sarkis gkra: as far as i can tell, you would just need to change site :opscode line to the source line 01:52
coderanger traviscline: Now sure what you mean 01:52
er, not 01:52
sarkis gkra: berkshelf kinda pushes you to do the whole application cookbooks deal too which actually is nicer.. are you using roles? 01:52
gkra hmm. 01:53
I'd been cheating, and having a "master" Berksfile in my chef repo that I've kept up to date with the latest versions for all the cookbooks we're using... 01:53
yeah, we're using the role+cookbook model 01:54
sarkis are u having trouble with it? 01:54
gkra trying to adapt to a workflow :) 01:55
berks 3 looks like it'll help us solve a lot of our environment-promotion issues 01:55
but that also means I need to go through all our cookbooks and properly berks them :) 01:56
sarkis i had to ditch roles 01:57
it just didn't make sense to me tbh, but then again i come from puppet so maybe that played into it as well 01:57
i can see how that is a problem for a bigger codebase though 01:57
but you are right, need to come up with some standard and stick to it, i did find that to be true about chef thus far.. so many ways to skin a cat, just gotta find what works best for your team and outline it well so everyone follows it. 01:58
gkra we've pretty much gone with role-per-service for our platform 01:58
jbz gkra: us as well 01:58
stack the roles on multiservice nodes 01:58
gkra yup. 01:58
and then cookbook-per-role to handle versioning 01:59
jbz I just still haven't been sold on cookbooks-as-roles 01:59
I haven't run across a problem where I couldn't handle the lack of versioning on the server by using git repos and chef environments. 01:59
And I purely, purely hate checking in cookbook code to change values. It gives me hives. 01:59
jameson__ jbz: I think cookbook-as-roles is patching the issue where roles can't be safely versioned ans shared. 02:00
jbz jameson__ Oh, I grok that, but I haven't run into a problem which would have been solved by that yet 02:00
gkra hmm. 02:00
crap 02:00
jbz whereas I *have* been bitten numerous times by people (me, lots of times) checking in cookbooks after work was done and breaking convergence. 02:01
And sure, "DO MORE TESTING" 02:01
jameson__ you took the words out of my keyb9oard 02:01
jbz in a perfect world of puppies and kittens, yep. 02:01
gkra how does berks 3 look for it's config file? 02:01
jbz Testing only catches cases there are tests for. :-P 02:02
jameson__ jbz: i am treating roles like definitions in recipes, a necessary use, but we could do better. 02:02
an 'alias' 02:02
jbz Please don't get me wrong, I'm not advocating my approach 02:02
it WFM so far though. 02:02
jameson__ I think the role issue is prevalent when it goes from WFM to WorksForUs/We 02:03
gkra uhm... 02:04
jameson__ gkra: I thought berks looks for the berksfile locally 02:04
gkra for berks in chefdk, should I install bundler via "chef gem install bundler" or just use my local ruby? 02:04
jameson__ the chef gem install bundler 02:06
gkra then how do I call that bundler? 02:06
jameson__ bundler 02:06
olh wait I am in rbenv 02:07
gkra is there any *harm* in using my rbenv bundler? 02:08
jameson__ no, I am ging that 02:08
it's just you know, 15min compiling ridley 02:08
for berks 02:08
gkra heh 02:09
so berks is from chefdk, bundler is from rbenv 02:09
jameson__ actually for me, don't have that at all :\ I need to fix that 02:10
gkra heh 02:10
jameson__ fyi, the gems are installed to /opt/chefdk/embedded/lib/ruby 02:10
gkra I'm a bit cheesed that berks breaks on Chef::Config.from_file(knife_override) if File.exist?(knife_override) 02:10
but i guess it was kind of a hack for knife.rb 02:11
gkra gah 02:19
adding 'protocol: :https' and berks 3 still tries to fetch via ssh 02:19
jameson__ :3 02:20
gkra which of course is not working because Github apparently hates me right now 02:20
fatal: remote error: 02:22
Repository not found. 02:22
oh, sir, it's there. 02:22
jameson__ yeah, I'm not sold on chef-dk 02:23
gkra ugh... how do I install berkshelf 2? :) 02:23
jameson__ if you want uncertain dependency resolution you can put it in your Gemfile ;) 02:23
< 3.0 02:23
gkra where do I put my Gemfile? 02:24
that's my other issue, is I'm learning the ruby side of this on the fly... 02:24
jameson__ oh you should do that first 02:26
Gemfile and Berksfile lives in the same directory as your cookbook 02:26
gkra joy 02:27
I'm managing about 30 cookbooks right now :) 02:27
okay, wtf, berks. 02:27
if I tell you a protocol, freaking use it. 02:27
it'd be nice if there were some more detailed docs :( 02:28
okay, there's my problem... Berkshelf is using "git" protocol instead of :ssh or :https as i've configured in Berksfile 02:30
*headdesk* 02:30
jameson__ :3 02:36
sarkis man this is strange 02:40
Recipe: users::sysadmins 02:40
* users_manage[sysadmin] action remove[2014-04-23T02:38:47+00:00] WARN: This recipe uses search. Ch 02:40
ef Solo does not support search unless you install the chef-solo-search cookbook. 02:40
trying to remove[datetime???] 02:40
coderanger sarkis: ? 02:42
traviscline coderanger: re: programatic runit services -- i want a lwrp that I only need to provide a few bits of info but want a runit service to result 02:46
so I dont' want to sprinkle .erb files around as it appears I need to do 02:46
coderanger traviscline: Just put the template in the LWRP's cookbook itself 02:47
traviscline: ex. https://github.com/poise/berkshelf-api/blob/master/libraries/berkshelf_api.rb#L228-L233 02:47
supercom32 Newbie question here, but I have a bunch of require fields in my ruby code. Does anyone know which ones come standard with Ruby/Chef and which ones I need to make sure a chef_gem statement exists for? http://pastebin.com/Gj7sjWZW 02:47
cheeseplus coderanger: would accumulator work? https://github.com/kisoku/chef-accumulator 02:47
traviscline hm yeah 02:47
cheeseplus for the same purpose 02:47
coderanger cheeseplus: For which purpose? 02:48
supercom32: Those are all standard I think 02:48
cheeseplus for traviscline 02:48
coderanger cheeseplus: I don't think so 02:48
supercom32 coderanger: Ah, I see. 02:49
coderanger supercom32: Simple way to tell, write some test-kitchen tests and see if it works ;-) 02:50
cheeseplus sorry, crappy train wifi makes it hard to read le github 02:51
supercom32 coderanger: test-kitchen? What is that? I'm kind of green. I assume it's a way to simulate a clean env? 02:51
coderanger supercom32: Its an integration testing framework for Chef, so yes 02:52
traviscline coderanger: so the template file has to match the name given to runit_service, right? 02:55
coderanger traviscline: You can customize that too 02:55
traviscline: https://github.com/hw-cookbooks/runit#parameter-attributes 02:56
run_template_name and similar 02:56
traviscline: Like this https://github.com/balanced-cookbooks/rundeck/blob/master/libraries/rundeck.rb#L281-L286 02:57
traviscline if I'm wrapping a resource can I easliy expose it's actions? 03:06
coderanger traviscline: Not sure what that means 03:09
traviscline i want to expose a two-parameter resource that just hands back a runit_service 03:09
(so support :restart :create, etc) without many LOC 03:09
coderanger Why not subclass the runit resource/provider? 03:10
gestrella Im trying to install rvm on my system. Im currently using chef-rvm and including the following recipe: include_recipe "rvm::system_install" rvm is installed but after that the chef-client is not working 03:15
I do undertand that chef-client uses an embedded chef. but it seems that the rvm is creating a conflict 03:16
What's the best practice to install rvm using chef 03:16
coderanger gestrella: Unhelpful answer: don't :-) 03:17
gestrella: What OS are you using? 03:17
gestrella Centos 6.4 03:17
coderanger gestrella: Super easy solution, use software collections 03:18
gestrella Software collections? 03:18
coderanger gestrella: http://wiki.centos.org/AdditionalResources/Repositories/SCL 03:18
gestrella: centos already has all versions of Ruby packaged for you and ready to go 03:18
gestrella Thanks CodeRanger 03:18
That means that I dont need to use rvm at all 03:19
coderanger Indeed :) 03:19
rvm is (at best) for workstations, not for servers 03:19
though rvm is mostly obsolete in favor of rbenv and chruby 03:20
gestrella ok 03:20
coderanger but still both of those are better on workstations than servers 03:23
sarkis why wouldn't chef look in /etc/init.d/ and only in /etc/init? 03:27
coderanger sarkis: For services you mean? 03:30
sarkis yea 03:31
im telling chef use the Upstart provider 03:31
coderanger sarkis: Upstart doesn't use init.d 03:32
sarkis ah 03:32
coderanger That folder contains old-style sysv init scripts 03:32
sarkis ah i see what i did 03:35
race condition, /etc/init/monit.conf isn't written before the upstart restart 03:36
chrismoos :b 2 03:48
coderanger chrismoos: :wq! 03:48
chrismoos @coderanger ;) i guess i was in insert mode 03:49
sarkis ok last question 04:09
* rbenv_ruby[2.1.1] (system) action install[2014-04-23T04:08:27+00:00] WARN: ruby_build cookbook is missing. Please add to the run_list (Action will be skipped). 04:09
i have include_recipe "ruby_build" that's not the same as the run_list right?\ 04:10
jidar is there no way to get test-kitchen to not have to download the chef client/etc everytime it runs? 04:23
meth Is there anything that can alert you if a host de-converges? 04:34
juliancdunn jidar: build a box with Chef Client already baked in and use that 04:38
jidar juliancdunn: so I don't use the platform stuff in the .yml? - name: centos-6.5 ? 04:43
juliancdunn jidar: name it something like centos-6.5-chef11.12.2 or whatever and provide a box_url for it 04:46
jidar oh ok 04:46
juliancdunn the name matches whatever name your driver recognizes - so if vagrant, the name of the box registered with vagrant 04:46
jidar it seems to want to prepend opscode 04:49
even though I'm putting in chef/centos6.5 04:49
juliancdunn not if you specify a box_url 04:49
jidar oh ok, right, sorry 04:49
juliancdunn meth: what do you mean "de-converges" 04:50
you can set alerts based on # of resources converged... should be close to 0 04:50
meth if -W shows that changes are required for the host 04:51
juliancdunn you could run that as a nagios check or something if you like :) 04:51
meth sure but I'm wondering if something already exists 04:51
juliancdunn not that I know of 04:52
in practice I see very few people using why-run 04:52
meth well isn't that terrible? 04:52
juliancdunn how so? 04:53
meth I always use -W to make sure what I'm applying is the only thing that's going to apply and to make sure nothing unforseen is going to roll out.. sometimes changes drift perhaps on purpose (like during an emergency) and weren't added back to the cookbooks yet etc.. 04:53
juliancdunn it depends if you see Chef as a policy compliance daemon, or a change application system 04:54
I think most people see it as the former and run Chef as a daemon/service as a result 04:54
"weren't added back to the cookbooks yet" doesn't happen if you only make changes through Chef 04:55
meth well for production critical hosts we like to roll out by hand because it's all change controlled and audited 04:56
and to me I use -W as a sanity and to make sure something hasn't drifted that should be updated in the cookbook .. etc. 04:56
jidar juliancdunn: is the box_url defined in Vagrant, because I can't find any docs that refer to it in test-kitchen? 04:56
viglesias jidar: http://hastebin.com/avuxalucad.sm 04:57
jidar ah, fantastic, thanks 04:58
viglesias np 04:58
meth changes happen though.. someone might fix something intraday outside of chef to get around a production problem.. also what if the cookbook version I'm about to roll out is wrong? maybe the host is a few release behind for a reason? maybe the branch I'm working off included more changes than I realized? etc.. 04:58
so when i go to push a new cookbook version if i see hundreds of lines of changes in -W that aren't the changes I'm trying to push then I need to figure out what's going on.. 05:00
juliancdunn all good discussion points... come back during the day Eastern time and I'll discuss it with you :) 05:00
<- goes to bed 05:00
meth ah it's ok i bet it doesn't exist and like you said it's a 2 second check to add my self 05:01
thanks for help 05:01
jameson__ chef-zero :( y u do dis 05:13
brucelee_ whats a good iptables cookbook 06:48
the one that comes with opscode is only 2 stars :p 06:48
coderanger brucelee_: 1) the stars system is useless 2) http://community.opscode.com/cookbooks/ufw is probably the simplest 06:57
double_p "port"=> "99427" -- heh 07:02
brucelee_ coderanger: awesome thanks 07:09
coderanger: still there? 07:09
coderanger Vaguely 07:10
whysthatso hey all. i have a workflow question, and i was wondering if anybody could point to a howto or tutorial, or some best practice corner points for that. atm i am working on a collection of application cookbooks which should follow test/stage/prod cycles. i use git for scm. now, since i started out on a legacy infrastructure project, i recreated current prod in stage, and all the cookbooks are working now. but i now would like to start rewo 08:37
rking the infrastructure on the testing stage, adding some functionality and refactoring out some unused stuff. however, i would like to keep the current stage cookbook in its current form for future reference. is it so that i should work with three different real directories according to my environments? or is there a way to do this via git? does any of that make sense so far? 08:37
JensOfSweden whysthatso: just make 3 different branches in your repo(s) like test/stage/prod and then do pullrequests from test -> stage -> prod and have a cronjob/ci server upload the cookbooks to a chef server and have it update the environment if you have cookbook versions in your environments for test/stage/prod perhaps 08:47
whysthatso JensOfSweden: so on my workstation i 'physically' only work on the testing branch, commit it and then pull it over to the next env? i might have still not gotten my head around how this practically goes down 08:51
JensOfSweden whysthatso: if i get you correctly you should only work on your testing branch on your workstation and try it out with vagrant/chefsolo/testkitchen or such. Then when you feel confident you want to stage it. Push it to the stage repo and have a chef server run all the cookbooks on your stage servers, and then same for prod. 08:53
whysthatso okay. that kind of makes sense... how could i push from git to hosted chef? 08:55
i haven't worked with a ci server yet, so for the beginning i think i would rely on something more manually 08:56
would it be along to lines of pulling into some tmp location and then pushing from there? 08:56
JensOfSweden Havnt worked with a hosted chef, but shoulnt be that hard. 08:57
Do you use your workstation for everything? 08:57
I guess its just use knife cookbook upload -a if you have your hosted chef info in the knife.rb file 08:59
whysthatso ja, actually working with berkshelf 09:00
JensOfSweden when you want to push it then just git checkout stage and use knife cookbook upload -a 09:01
whysthatso but yeah, that*s the thing i don't understand about git integration: if locally i only have my testing cookbook, with the version number of testing, then how can i push stage or prod? 09:01
ah.... 09:01
of course 09:01
JensOfSweden you have all the branches on your workstatiion, but when developing you should only be in your testing branch 09:02
whysthatso at that point the real code locally is already as advanced as the environment 09:02
puh.... branching - when it comes down to the details - really makes my head burn 09:02
JensOfSweden Youll get it eventualy, its not that hard =) 09:03
If you realy want to separate the repos with git you should read up on git 09:03
srenatus hmm. not getting any response to POST https://&lt;os-chef&gt;/environments/&lt;mine&gt;/cookbook_versions but having a spinning erchef beam process...anyone experienced that before? 09:43
ghghz Hey, how to bypass this limit? JSON must be no more than 1000000 bytes 09:49
srenatus ghghz: which json? 09:49
ghghz: any? 09:49
ghghz am, what do you mean which? 09:50
srenatus ghghz: so a JSON file is supposed to be smaller than 1M bytes? 09:51
ghghz: I'm missing the context.. I don't suppose this is true universally (is it?) 09:51
ghghz srenatus: wait, I'll post you more details 09:52
http://pastebin.com/JvvADZNe 09:52
srenatus ghghz: oh. we're talking erchef... 09:53
ghghz: end of chef-run? trying to save the node object? 09:54
ghghz you mean why-run mode? 09:55
chef-client -W wents OK, without any errors/warnings 09:56
srenatus ghghz: I actually asked for some more context on the chef-client side 09:56
why-run won't node.save, so it could be node.save 09:57
and it probably is, because where else should there be "much data" to save 09:57
ghghz how to figure out which data to save? 09:57
srenatus ghghz: by default, it will be the entire node object. there's whitelisting of attributes, but I've never really tried that 09:58
ghghz: https://github.com/opscode-cookbooks/whitelist-node-attrs 09:59
ghghz srenatus: thank you, going to test 09:59
srenatus ghghz: :) 10:00
gokr I am getting failures on "knife upload mycookbook" and yes, it has large files. Some broken pipe or something. 10:11
subraminion Hi, I have a requirement where I need to recompile kernel and reboot the server 10:14
how can the chef cookbook continue to work through a reboot? 10:14
workmad3 subraminion: it can't... there are a couple of options you can do - 1. delay triggering the restart until the end of the chef run, 2. save the node state with 'node.save' at the point you need to restart and set up chef-client to run again after the restart to redo the converge (and this time not restart) 10:20
subraminion delay might be the key that works for me.. Why didn't I think of it in the first place?? 10:21
Please kick me 10:21
gokr Arghh.... anyone has a trick for large files? I have a 400Mb file that I have in a cookbook and now I can't upload it to our chef server, sigh. 10:22
subraminion Why not make a dropbox link and call it in attributes? 10:23
gokr The file needs to be secure - I can't just put it on a public URL 10:24
mc_fail hi guys, if i'm using a notifies directive in cookbook_file section, it will do something only if file on host is different than file in chef? 10:30
i'm right? 10:30
ghghz srenatus: whitelist attr solved my problem 11:01
thank you 11:01
brianwebb01 anyone know of a good job board to post chef jobs? We're looking for a senior devops engineer. 12:52
zeroXten hi. just having a play around with Chef Development Kit... should I expect test-kitchen to work out of the box in a chef generate'd cookbook? doesn't seem to find the vagrant driver 12:57
and generate doesn't seem to create a gemfile to bundle isntall 12:57
whiteadam zerxten: meh, nah 12:58
zeroXten: I think I would recommend following something like this: http://misheska.com/blog/2013/06/16/getting-started-writing-chef-cookbooks-the-berkshelf-way/ 12:59
It's probably the most helpful thing you'll find for writing cookbooks properly... and it goes through test-kitchen and vagrant 12:59
aujt74 Hi everyone, what would be the Chef way to change permissions on a unix socket? The File resource fails with "File ... exists, but is a socket, set force_unlink to true to remove". Is my only option falling back to FileUtils::chown in a ruby block with a not_if guard? Thanks! 13:01
zeroXten whiteadam: thanks, but that is currently how i'm doing it :) 13:01
we've got a new starter here and I was hoping CDK would make getting him set up a bit simpler 13:02
sarkis hey all, should include_recipe work exactly as adding recipe[] to the run_list? 13:02
whiteadam zeroXten: Ah, not sure. That link definitely helped me the most. 13:02
subraminion I am trying to give a custom delay to one of my code block like this: 13:16
notifies :run, "execute[install_openswan]", :delayed => 600 13:16
It gives me invalid timing error 13:17
can any body tell me how I can give a delay of 10 minutes or so? 13:17
aujt74 (Nevermind about the socket, approached the problem from a different angle :) 13:18
whiteadam subraminion: I know ruby has a sleep method 13:22
bixu subraminion: Are you configuring a host as an openswan vpn endpoint? 13:22
If 'yes', have you seen https://github.com/wanelo-chef/openswan ? 13:23
sarkis jtimberman: is logrotate cookbook supposed to be supported 13:24
whiteadam subraminion: there's also retry_delay: 13:24
subraminion @whiteadam and I suppose the syntax would be the same for that too right? Like retry_delay => VALUE 13:25
whiteadam subraminion: yeah 13:28
subraminion: http://docs.opscode.com/chef/resources.html under Attributes 13:28
sarkis so, what do you guys do to setup a vagrant box for testing chef with? i'm doing some hacky stuff right now like: knife solo cook vagrant@`vagrant ssh-config | sed -n 's/.*HostName \(.*\)/\1/p'` -p `vagrant ssh-config | sed -n 's/.*Port \(.*\)/\1/p'` -i `vagrant ssh-config | sed -n 's/.*IdentityFile \(.*\)/\1/p'` 13:55
zeroXten sarkis: I use test-kitchen... 13:57
whiteadam Anyone have good article recommendations for writing tests for cookbooks? 14:03
zanshin http://kitchen.ci and click on the "Get Started" button? 14:06
gnagno hello all 14:06
can someone please tell me how can I debug my recipe with pry? I am using vagrant 14:06
whiteadam zanshin: hah, yeah, that's what I'm reading now :) 14:07
zanshin whiteadam: There's this: https://engineering.aweber.com/test-driven-chef-cookbooks-with-test-kitchen/ 14:09
whiteadam zanshin: oooh thanks 14:10
zanshin whiteadam: And I highly recommend this book: http://shop.oreilly.com/product/0636920030973.do 14:11
whiteadam zanshin: I actually read through that one. I think the principles and philosophy were very helpful. 14:11
gnagno can someone please tell me how I can make pry work for debugging a chef recipe? 14:13
sarkis zeroXten: hmm interesting is that the community recommended way now? 14:14
i think berkshelf kind of pushes us in this direction as of 3.x as well right? 14:15
zanshin whiteadam: I've only gotten part way through it. Need to polish it off and put it to good use. 14:15
whiteadam zanshin: Yeah, after half-way it gets a little dicey. Some of the commands have changed and repos haven't been updated. 14:15
sarkis im trying to override the attributes here: https://github.com/RiotGames/rbenv-cookbook#rbenv 14:43
i do this in my attributes/default.rb : default['rbenv 14:44
oops... default['rbenv']['install_path'] = '/usr/local', but it's not getting picked up and still installs in /opt 14:44
what am i doing wrong? 14:44
juliancdunn sarkis: which attributes/default.rb are you changing that in? your own cookbook? 14:45
sarkis yes the application cookbook 14:47
where the recipe exists that calls the include_recipe rbenv::default 14:47
oh wait a minute 14:48
ok yea i said install_path in here but i really have the proper 'install_prefix' 14:48
ah i see the problem i think 14:49
default[:rbenv][:install_prefix] = "/opt" 14:49
im doing default['rbenv']['install_prefix'] 14:50
symbols vs string 14:50
juliancdunn that shouldn't matter as Chef coerces everything to a string internally 14:52
sarkis trying it now to see 14:54
zts sarkis: you will need to override node[:rbenv][:root_path] as well as node[:rbenv][:install_prefix] 14:55
oh wait, you said you were doing it in your attributes file. I may be wrong. 14:56
sarkis i think you are right 15:00
default[:rbenv][:root_path] = "#{node[:rbenv][:install_prefix]}/rbenv" 15:00
i think that gets set and then it never uses my override 15:00
strange 15:00
zts The issue is that you need to have your override to :install_prefix in place before that's evaluated 15:01
sarkis yea 15:01
makes sense, thanks for catching that :) 15:01
saved me a lot of time 15:01
zts No problem, it's a common issue when working with wrapper cookbooks. If you override that attribute in a role or environment, it should Just Work - I'm not sure what the "best practice" pattern is for doing the same with wrapper cookbooks 15:02