Skip to content

Instantly share code, notes, and snippets.

View ovaistariq's full-sized avatar

Ovais Tariq ovaistariq

View GitHub Profile
@ovaistariq
ovaistariq / migration.sh
Last active August 26, 2015 22:17 — forked from stephenlauck/migration.sh
Migrate node across hosted chef servers
# update gems
sudo gem update --no-rdoc --no-ri
# edit client.rb with correct validation key and chef server
# also set the environment
log_level :info
log_location STDOUT
chef_server_url "https://api.opscode.com/organizations/modcloth-comments"
validation_client_name "modcloth-comments-validator"
node_name "comments-standalone-01.demo.modcloth.com"
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr']
def human_log(res):
if type(res) == type(dict()):
for field in FIELDS:
if field in res.keys():
print '\n{0}:\n{1}'.format(field, res[field])
class CallbackModule(object):