There are several options to run recipes:
- using chef-client with -z option
- using chef-apply
- using chef-solo
Before running Chef recipes on the machine, it should be prepared:
# Script Name: powerssh | |
# Version: 1.1.0 (9. July, 2014) | |
# Author: Sveinn Steinarsson | |
# Description: Use Powershell to connect to a remote server via SSH and run a shell script/command | |
# Prerequisite: | |
# plink.exe in script path (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) | |
# Examples: | |
# With key file (*.ppk) and script file |
knife[:chef_repo_path] = "#{ENV['HOME']}/.chef" | |
current_dir = File.dirname(__FILE__) | |
log_level :info | |
log_location STDOUT | |
node_name ENV['USER'] | |
client_key "#{knife[:chef_repo_path]}/#{ENV['USER']}.pem" | |
validation_client_name "chef-validator" | |
validation_key "#{knife[:chef_repo_path]}/chef-validator.pem" | |
chef_server_url "https://chef.example.com/organizations/#{ENV['ORGNAME']}" |
#!/bin/bash | |
# Author Ryan Kulla (rkulla@gmail.com) | |
# | |
# A shell script (in Bash) that allows you to do SVN checkouts | |
# with a shorter command than the default subversion command. | |
# Handy if your repos have long, hard to remember URLs. | |
# | |
# Put this script in your PATH (e.g., ~/bin/) | |
# Make sure it's executable: | |
# $ chmod u+x ~/bin/co |
rem | |
rem Please download curl from https://curl.haxx.se/download.html and add it to your path. | |
rem | |
@echo on | |
rem if command fails, exit and do not ping | |
if %errorlevel% neq 0 goto ERROR | |
set URL_STRING=http://pshmn.com/eaFnY | |
curl %URL_STRING% |
export PS1="\[\033[00m\]\u@\h\[\033[00m\]:\[\033[00m\]\w\[\033[00m\] \`ruby -e \"print (%x{git branch 2> /dev/null}.split(%r{\n}).grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`\[\033[00m\]$\[\033[00m\] " | |
PS1="\$(~/.rvm/bin/rvm-prompt) $PS1" | |