| popularity | question | answers | views | user | |
|---|---|---|---|---|---|
| 0 |
How to define before_symlink callback using application cookbook?
I am developing a cookbook to deploy simple jekyll based blog. I use ‘application’ cookbook as a base. Everything works smoothly except chef simply ignore my defined callbacks. Chef log contains entries about my callback, but I see no errors or outcomes of the callback execution. Here is recipes/default.rb file: <!— language: ruby —>
Here is the log where chef-client says it executes before_deploy callback:
I also try to define callback using string, but the result is the same. Chef shows error when there is no file with callback definition and simply ignores the file if it is the right place. Update 1 After digging deeper inside Chef sources I realized that callbacks are executed in separate chef runner and this happens not instantly. When code in application cookbook calls recipe_eval to evaluate callback body Chef creates separate runner and the code does not executed until something call converge method. So, I modified application cookbook a bit. I added call converge just after recipe_eval and everything starts works. I think this is a bug and I am going to create an issue in official Opscode tracker. However, any comments are very welcome! Here is modifed version of application/libraries/default.rb: <!— language: ruby —>
|
1 | 185 | ||
| 0 |
application cookbook with node js
I have modified that opscode application cookbook to include support for node servers and applications. So far things have worked out pretty well and I only have one issue. When I get to the point where the recipe should clone the repository from git I am prompted to enter the passphrase for the deploy key. The odd thing about this is no passphrase was created for this deploy key. This is what I am seeing during provisioning:
This is the current state of my recipe: https://gist.github.com/2423774 This is the current state of my data bag(deploy_key/repository removed): https://gist.github.com/2423781 |
0 | 259 |
