Esempio n. 1
0
def install_service():
	print("Install here...")
	sh = Shell('demo-files')
	version = '2.4'
	sh.set_cwd('.') # Sets cwd to directory where python was called
	cmd = 'cp -r . /var/lib/ambari-server/resources/stacks/HDP/%s/services/DEMOSERVICE' % version
	print(sh.run(cmd))
	cmd = 'ambari-server restart'
	print(sh.run(cmd))
Esempio n. 2
0
	def install(self, env):
		# Fill me in!
		print 'Install the Sample Srv Master';
		self.configure(env)
		conf_dir = '/root/devicemanagerdemo/'
		sh = Shell()
		print("WORKING DIR")
		print(sh.run('pwd'))
		sh.set_cwd(conf_dir)
		sh.run('bash demo-files/install.sh')