Пример #1
0
def deploy(host_data):
	if not is_deploy(host_data, g_app_data['name']):
		env.host_string = 'root@' + host_data['name']
		env.password = host_data['password']
		basename = path.basename(full_path),
		fabric_op.put(g_app_data['archive'], host_data['deploy_path'])
		with fabric_op.cd(host_data['deploy_path']):
			run('tar xzf ' + basename)
	else:
		print("already deployed, host data: %s" % host_data)
Пример #2
0
def start(host_data):
	env.host_string = 'root@' + host_data['name']
	env.password = host_data['password']
	with fabric_op.cd(host_data['deploy_path'] + g_app_data['app_name'] + 'script'):
		run(host_data['run_script'])