Last active
October 16, 2015 23:30
-
-
Save EdHurtig/9f257ff87386c7f5db62 to your computer and use it in GitHub Desktop.
Adds fun chef shorthands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CDPATH="$CDPATH:$CHEF_REPO/cookbooks" | |
# Manually converge nodes matching the hostname expresion like "converge stage-*logs*" | |
function converge() { | |
knife ssh "name:$1" "sudo chef-client" | |
} | |
# Run kitchen with different config files (.kitchen.cloud.yml, .kitchen.local.yml) | |
kitchen() { | |
if [[ -f ".kitchen.$1.yml" ]]; then | |
echo "Starting kitchen with configuration file '.kitchen.$1.yml'" | |
command export KITCHEN_YAML=".kitchen.$1.yml" | |
shift 1 | |
command kitchen "$@" | |
else | |
echo "Running kitchen with default configuration" | |
command unset KITCHEN_YAML | |
command kitchen "$@" | |
fi | |
} | |
# Wrapper for my custom publishing program: https://github.com/edhurtig/publish | |
alias publish="publish --berks --tag" | |
# For when the things are too f'cked up | |
alias sourcetree='open -a SourceTree' | |
# ChefDK binaries | |
export PATH="/opt/chefdk/embedded/bin:/opt/chefdk/bin:$PATH" | |
# use chef's internal ruby and its gems | |
export PATH="$HOME/.chefdk/gem/ruby/2.1.0/bin:$PATH" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment