Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

Add --no-sync option to skip syncing and only run Chef #284

Merged
merged 3 commits into from
Sep 4, 2013

Conversation

makern
Copy link
Contributor

@makern makern commented Sep 1, 2013

This option skips preparation and syncing of the kitchen and only runs chef solo on the node.

Our use case for this is to quickly run single recipes on the node via the -o option. Syncing adds a significant delay which is unnecessary in this case since no changes to the kitchen were actually made. Typical runtime reductions for us are from 45s to 17s.

I can see you are working on ssh session caching which is great and will probably reduce overall runtimes a lot but this might still be a useful option.

librarian_install if config_value(:librarian, true)
sync_kitchen
generate_solorb
if config[:sync]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use config_value(:sync, true) helper here. Otherwise there are problems with knife bootstrap integration (and maybe with knife solo bootstrap too). Then you can also drop the :default attribute in the option definition to be consistent with other options.

@tmatilai
Copy link
Collaborator

tmatilai commented Sep 2, 2013

@makern Thanks for the pull request!

Other than the above comment, I'm fine with this. Mat?

Some test would be nice, though. But we can add it ourselves, too.

@makern
Copy link
Contributor Author

makern commented Sep 2, 2013

Changed to use config_value and added a test.

matschaffer added a commit that referenced this pull request Sep 4, 2013
Add --no-sync option to skip syncing and only run Chef
@matschaffer matschaffer merged commit f0460a2 into matschaffer:master Sep 4, 2013
@matschaffer
Copy link
Owner

Thanks!

@makern
Copy link
Contributor Author

makern commented Sep 4, 2013

Awesome, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants