SysAdmin

Instance

Tasks related to a Tamr instance

tamr_toolbox.sysadmin.instance.start_tamr(*, tamr_install_dir, include_dependencies=True, remote_client=None, impersonation_username=None, impersonation_password=None, verbose=False)[source]

Starts the Tamr software and the Tamr dependencies if include_dependencies is true.

Runs in a remote environment if an ssh client is specified otherwise runs in the local shell. If an impersonation_username is provided, the command is run as the provided user. If an impersonation_password is provided, password authentication is used for impersonation, otherwise sudo is used.

Parameters
  • tamr_install_dir (str) – Full path to directory where Tamr is installed

  • include_dependencies (bool) – Whether Tamr dependencies should be started

  • remote_client (Optional[SSHClient]) – An ssh client providing a remote connection

  • impersonation_username (Optional[str]) – A bash user to run the command as, this should be the tamr install user

  • impersonation_password (Optional[str]) – The password for the impersonation_username

  • verbose – Whether the full command, stdout, and stderr should be logged at INFO level

Return type

None

Returns

None

Raises

RuntimeError – Raised if Tamr start script(s) fail

tamr_toolbox.sysadmin.instance.stop_tamr(*, tamr_install_dir, include_dependencies=True, remote_client=None, impersonation_username=None, impersonation_password=None, verbose=False)[source]

Stops the Tamr software and the Tamr dependencies if include_dependencies is true.

Runs in a remote environment if an ssh client is specified otherwise runs in the local shell. If an impersonation_username is provided, the command is run as the provided user. If an impersonation_password is provided, password authentication is used for impersonation, otherwise sudo is used.

Parameters
  • tamr_install_dir (str) – Full path to directory where Tamr is installed

  • include_dependencies (bool) – Whether Tamr dependencies should be stopped

  • remote_client (Optional[SSHClient]) – An ssh client providing a remote connection

  • impersonation_username (Optional[str]) – A bash user to run the command as, this should be the tamr install user

  • impersonation_password (Optional[str]) – The password for the impersonation_username

  • verbose – Whether the full command, stdout, and stderr should be logged at INFO level

Return type

None

Returns

None

Raises

RuntimeError – Raised if Tamr stop script(s) fail

tamr_toolbox.sysadmin.instance.restart_tamr(*, tamr_install_dir, include_dependencies=True, remote_client=None, impersonation_username=None, impersonation_password=None, verbose=False)[source]

Restarts the Tamr software and the Tamr dependencies if include_dependencies is true.

Runs in a remote environment if an ssh client is specified otherwise runs in the local shell. If an impersonation_username is provided, the command is run as the provided user. If an impersonation_password is provided, password authentication is used for impersonation, otherwise sudo is used.

Parameters
  • tamr_install_dir (str) – Full path to directory where Tamr is installed

  • include_dependencies (bool) – Whether Tamr dependencies should be restarted

  • remote_client (Optional[SSHClient]) – An ssh client providing a remote connection

  • impersonation_username (Optional[str]) – A bash user to run the command as, this should be the tamr install user

  • impersonation_password (Optional[str]) – The password for the impersonation_username

  • verbose – Whether the full command, stdout, and stderr should be logged at INFO level

Return type

None

Returns

None

Raises

RuntimeError – Raised if Tamr start or stop script(s) fail

tamr_toolbox.sysadmin.instance.get_configs(*, config_names=None, config_search_regex=None, user_defined_only=False, tamr_install_dir, remote_client=None, impersonation_username=None, impersonation_password=None)[source]

Retrieves configuration values from a Tamr instance.

Runs in a remote environment if an ssh client is specified otherwise runs in the local shell. If an impersonation_username is provided, the command is run as the provided user. If an impersonation_password is provided, password authentication is used for impersonation, otherwise sudo is used.

Parameters
  • config_names (Optional[List[str]]) – A list of configuration names to fetch the value for, when None all configurations will be fetched

  • config_search_regex (Optional[str]) – A regular expression used to filter the names of the configurations to return

  • user_defined_only (bool) – Whether to filter to only user defined config

  • tamr_install_dir (str) – Full path to directory where Tamr is installed

  • remote_client (Optional[SSHClient]) – An ssh client providing a remote connection

  • impersonation_username (Optional[str]) – A bash user to run the command as, this should be the tamr install user

  • impersonation_password (Optional[str]) – The password for the impersonation_username

Return type

Dict[str, Any]

Returns

A dictionary of Tamr configuration variables and their values

tamr_toolbox.sysadmin.instance.get_config(*, config_name, tamr_install_dir, remote_client=None, impersonation_username=None, impersonation_password=None)[source]

Retrieves a configuration value from a Tamr instance.

Runs in a remote environment if an ssh client is specified otherwise runs in the local shell. If an impersonation_username is provided, the command is run as the provided user. If an impersonation_password is provided, password authentication is used for impersonation, otherwise sudo is used.

Parameters
  • config_name (str) – The configuration names to fetch the value for

  • tamr_install_dir (str) – Full path to directory where Tamr is installed

  • remote_client (Optional[SSHClient]) – An ssh client providing a remote connection

  • impersonation_username (Optional[str]) – A bash user to run the command as, this should be the tamr install user

  • impersonation_password (Optional[str]) – The password for the impersonation_username

Return type

Any

Returns

A dictionary of Tamr configuration variables and their values

tamr_toolbox.sysadmin.instance.set_configs(*, configs, tamr_install_dir, remote_client=None, impersonation_username=None, impersonation_password=None)[source]

Sets configuration values in a Tamr instance.

Runs in a remote environment if an ssh client is specified otherwise runs in the local shell. If an impersonation_username is provided, the command is run as the provided user. If an impersonation_password is provided, password authentication is used for impersonation, otherwise sudo is used.

Parameters
  • configs (Dict[str, Any]) – A dictionary of configuration variables and their desired values

  • tamr_install_dir (str) – Full path to directory where Tamr is installed

  • remote_client (Optional[SSHClient]) – An ssh client providing a remote connection

  • impersonation_username (Optional[str]) – A bash user to run the command as, this should be the tamr install user

  • impersonation_password (Optional[str]) – The password for the impersonation_username

Return type

Dict[str, Any]

Returns

A dictionary of Tamr configuration variables and their values for any configuration values that were changed by running this command

tamr_toolbox.sysadmin.instance.set_config(*, config_name, config_value, tamr_install_dir, remote_client=None, impersonation_username=None, impersonation_password=None)[source]

Sets configuration values in a Tamr instance.

Runs in a remote environment if an ssh client is specified otherwise runs in the local shell. If an impersonation_username is provided, the command is run as the provided user. If an impersonation_password is provided, password authentication is used for impersonation, otherwise sudo is used.

Parameters
  • config_name (str) – The name of the configuration variable to update

  • config_value (Any) – The desired value for the configuration variable

  • tamr_install_dir (str) – Full path to directory where Tamr is installed

  • remote_client (Optional[SSHClient]) – An ssh client providing a remote connection

  • impersonation_username (Optional[str]) – A bash user to run the command as, this should be the tamr install user

  • impersonation_password (Optional[str]) – The password for the impersonation_username

Return type

Dict[str, Any]

Returns

A dictionary of Tamr configuration variables and their values for any configuration values that were changed by running this command