Skip to content

Instantly share code, notes, and snippets.

@danielsdeleo
Created July 31, 2014 19:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielsdeleo/9659725b399a9d12f8ef to your computer and use it in GitHub Desktop.
Save danielsdeleo/9659725b399a9d12f8ef to your computer and use it in GitHub Desktop.
How to Run Custom Apps in ChefDK

Firstly, the primary apps in ChefDK use executables generated by appbundler:

  • chef (chef-client/knife/etc.)
  • berks
  • chef-dk (the chef tool)
  • TK

The appbundler code is here: https://github.com/opscode/appbundler/ and the README explains what it does and why. You can see the executables that appbundler generates in /opt/chefdk/bin (there are other executables in there, but the executables for the primary apps are the appbundler ones).

The primary apps in ChefDK all live in the "apps" directory, in /opt/chefdk/embedded/apps.

So, how do you run a custom fork/branch/whatever of one of these apps? The exact steps depend on how much you've changed.

In any case, blow away the code in /opt/chefdk/embedded/apps/$APP, and replace it with the code you want to use. If you have not modified any of the app's dependencies, then this should just work. If you have modified the dependencies, then you need to bundle install and then re-run appbundler. Here's how omnibus does it when it creates the package: https://github.com/opscode/omnibus-chef/blob/bcb11dedec46e62c833ab55871434b2ba62d1ce1/config/software/chefdk.rb#L83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment