grid.deploy.base_deployment

Module Contents

class grid.deploy.base_deployment.BaseDeployment(env_vars, verbose: bool = True)

Bases: abc.ABC

Abstract Class used to instantiate generic attributes for other deployment classes.

deploy(self)

Method used to deploy component.

_check_dependency(self, lib='git', check='usage:', error_msg='Error: please install git.', verbose=False)

This method checks if the environment has a specific dependency. :param dependency_lib: Libs that will be verified. :param check: Specific string to check if app was installed. :param error_msg: If not installed, raise an Exception with this. :param verbose: Used to define level of verbosity.

Raises:RuntimeError – If not installed, raise a RuntimeError Exception.
_execute(self, cmd)

Execute a specific bash command and return the result. :param cmd: Specific bash command.

Raises:subprocess_exception – Raises an specific subprocess exception
_run_commands_in(self, commands, logs, tmp_dir='tmp', cleanup=True, verbose=False)

Run sequentially all commands and logs stored in our list of commands/logs. :param commands: List of commands. :param logs: List of logs. :param tmp_dir: Directory used execute these commands. :param cleanup: Flag to choose if tmp_dir will be maintained. :param verbose: Used to define level of verbosity.

Returns:Output message for each command.
Return type:outputs