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 installedinclude_dependencies (
bool
) – Whether Tamr dependencies should be startedremote_client (
Optional
[SSHClient
]) – An ssh client providing a remote connectionimpersonation_username (
Optional
[str
]) – A bash user to run the command as, this should be the tamr install userimpersonation_password (
Optional
[str
]) – The password for the impersonation_usernameverbose – Whether the full command, stdout, and stderr should be logged at INFO level
- Return type
- 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 installedinclude_dependencies (
bool
) – Whether Tamr dependencies should be stoppedremote_client (
Optional
[SSHClient
]) – An ssh client providing a remote connectionimpersonation_username (
Optional
[str
]) – A bash user to run the command as, this should be the tamr install userimpersonation_password (
Optional
[str
]) – The password for the impersonation_usernameverbose – Whether the full command, stdout, and stderr should be logged at INFO level
- Return type
- 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 installedinclude_dependencies (
bool
) – Whether Tamr dependencies should be restartedremote_client (
Optional
[SSHClient
]) – An ssh client providing a remote connectionimpersonation_username (
Optional
[str
]) – A bash user to run the command as, this should be the tamr install userimpersonation_password (
Optional
[str
]) – The password for the impersonation_usernameverbose – Whether the full command, stdout, and stderr should be logged at INFO level
- Return type
- 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 fetchedconfig_search_regex (
Optional
[str
]) – A regular expression used to filter the names of the configurations to returnuser_defined_only (
bool
) – Whether to filter to only user defined configtamr_install_dir (
str
) – Full path to directory where Tamr is installedremote_client (
Optional
[SSHClient
]) – An ssh client providing a remote connectionimpersonation_username (
Optional
[str
]) – A bash user to run the command as, this should be the tamr install userimpersonation_password (
Optional
[str
]) – The password for the impersonation_username
- Return type
- 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 fortamr_install_dir (
str
) – Full path to directory where Tamr is installedremote_client (
Optional
[SSHClient
]) – An ssh client providing a remote connectionimpersonation_username (
Optional
[str
]) – A bash user to run the command as, this should be the tamr install userimpersonation_password (
Optional
[str
]) – The password for the impersonation_username
- Return type
- 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 valuestamr_install_dir (
str
) – Full path to directory where Tamr is installedremote_client (
Optional
[SSHClient
]) – An ssh client providing a remote connectionimpersonation_username (
Optional
[str
]) – A bash user to run the command as, this should be the tamr install userimpersonation_password (
Optional
[str
]) – The password for the impersonation_username
- Return type
- 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 updateconfig_value (
Any
) – The desired value for the configuration variabletamr_install_dir (
str
) – Full path to directory where Tamr is installedremote_client (
Optional
[SSHClient
]) – An ssh client providing a remote connectionimpersonation_username (
Optional
[str
]) – A bash user to run the command as, this should be the tamr install userimpersonation_password (
Optional
[str
]) – The password for the impersonation_username
- Return type
- Returns
A dictionary of Tamr configuration variables and their values for any configuration values that were changed by running this command