Chapter 09/circuit-oneops-1-master/components/cookbooks/supervisord/libraries/supervisord_helper.rb
# Install supervisord using configured command
# e.g. easy_install supervisor
# this can be substitute with any valid commands,
# scripts, or system packing
# 
# Make sure pip is installed before proceed to
# install supervisord
Install supervisord using configured command
e.g. easy_install supervisor
this can be substitute with any valid commands,
scripts, or system packing

Make sure pip is installed before proceed to
install supervisord
Install supervisord using configured command e . g . easy_install supervisor this can be substitute with any valid commands scripts or system packing Make sure pip is installed before proceed to install supervisord
def install
		install_pip()
		begin
			cmd = Mixlib::ShellOut.new('pip install supervisor')
			output = cmd.run_command
			if cmd.exitstatus != 0
				puts "***FAULT:FATAL=Failed to install supervisor using pip"
				e = Exception.new("no backtrace")
				e.set_backtrace("")
				raise e
			end
		rescue Exception => e
			puts e.inspect
			puts "***FAULT:FATAL=Failed to install supervisor using pip"
			raise e
		end
	end
def install install_pip ( ) begin cmd = Mixlib :: ShellOut . new ( 'pip install supervisor' ) output = cmd . run_command if cmd . exitstatus != 0 puts "***FAULT:FATAL=Failed to install supervisor using pip" e = Exception . new ( "no backtrace" ) e . set_backtrace ( "" ) raise e end rescue Exception => e puts e . inspect puts "***FAULT:FATAL=Failed to install supervisor using pip" raise e end end
Install supervisord using configured command
e.g.
Install supervisord using configured command e . g .