from lib import util from deployment import common from deployment.executor import Executor # config file path config_file = "../etc/global.conf" # clone the repo locally git_repo_location = util.read_config(config_file).get("DEFAULT", "git_repo_location") my_local_folder = util.clone_git_repo(git_repo_location) # we fill a dict with our stages git_repo_home = util.read_config(config_file).get("DEFAULT", "git_repo_home") stages = common.get_stages("client", my_local_folder, git_repo_home) # remove the directory since it is not needed anymore shutil.rmtree(my_local_folder, ignore_errors=True) # clone the repo to the vm ssh_priv_key = util.read_config(config_file).get("DEFAULT", "ssh_priv_key") cmd = "git clone %s %s" % (git_repo_location, git_repo_home) remote_clone_result = util.RemoteCommand("vm-148-120.uc.futuregrid.org", ssh_priv_key, cmd).execute() # initiate executor class with the stages exec_obj = Executor("vm-148-120.uc.futuregrid.org", ssh_priv_key, stages) # loop over all available stages that has a script with execution bit
""" import shutil from lib import util from deployment import common from deployment.executor import Executor # config file path config_file = "../etc/global.conf" # clone the repo locally my_local_folder = util.clone_git_repo(util.read_config(config_file).get("DEFAULT","git_repo_location")) # we fill a dict with our stages stages = common.get_stages("client", my_local_folder, util.read_config(config_file).get("DEFAULT","git_repo_home")) # remove the directory since it is not needed anymore shutil.rmtree(my_local_folder,ignore_errors=True) # clone the repo to the vm remote_clone_result = util.RemoteCommand("vm-148-120.uc.futuregrid.org",\ util.read_config(config_file).get("DEFAULT", "ssh_priv_key"), "git clone %s %s" % (util.read_config(config_file).get("DEFAULT","git_repo_location") , util.read_config(config_file).get("DEFAULT","git_repo_home"))).execute() # initiate executor class with the stages exec_obj = Executor("vm-148-120.uc.futuregrid.org", util.read_config(config_file).get("DEFAULT", "ssh_priv_key"), stages)
import shutil from lib import util from deployment import common from deployment.executor import Executor # config file path config_file = "../etc/global.conf" # clone the repo locally my_local_folder = util.clone_git_repo( util.read_config(config_file).get("DEFAULT", "git_repo_location")) # we fill a dict with our stages stages = common.get_stages( "client", my_local_folder, util.read_config(config_file).get("DEFAULT", "git_repo_home")) # remove the directory since it is not needed anymore shutil.rmtree(my_local_folder, ignore_errors=True) # clone the repo to the vm remote_clone_result = util.RemoteCommand("vm-148-120.uc.futuregrid.org",\ util.read_config(config_file).get("DEFAULT", "ssh_priv_key"), "git clone %s %s" % (util.read_config(config_file).get("DEFAULT","git_repo_location") , util.read_config(config_file).get("DEFAULT","git_repo_home"))).execute() # initiate executor class with the stages exec_obj = Executor( "vm-148-120.uc.futuregrid.org", util.read_config(config_file).get("DEFAULT", "ssh_priv_key"), stages)