Skip to content

Instantly share code, notes, and snippets.

@ono
Created May 16, 2012 12:12
Show Gist options
  • Select an option

  • Save ono/2709890 to your computer and use it in GitHub Desktop.

Select an option

Save ono/2709890 to your computer and use it in GitHub Desktop.

Workflow

Edit cookbooks, role

Edit cookbook or role on your chef repo. Don't forget update its version.

Upload them to a Chef server

% knife cookbook upload [cookbook]
% knife role from file [file e.g. roles/ssh_known_hosts.rb]

Apply changes to environment (when you update version of cookbook)

Dry run at first:

% knife environment from file environments/prod.rb --dry-run

Then do it:

% knife environment from file environments/prod.rb

Add role to node

% knife node run_list add node_name "role[rolename]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment