def _install_node_agent() -> bool: # Install Thundra Node agent NPM package if not os.path.exists(THUNDRA_NODE_AGENT_LOCAL_PATH): install.log_install_msg("Thundra Node agent", verbatim=True) try: install_thundra_cmd = "npm install --prefix %s @thundra/core@%s --no-save" % ( THUNDRA_NODE_AGENT_LOCAL_PATH, THUNDRA_NODE_AGENT_VERSION, ) common.run(install_thundra_cmd.split()) except Exception as e: print("Unable to install Thundra Node agent: %s" % e) return False return True
def _install_python_agent() -> bool: # Install Thundra Python agent PIP package if not os.path.exists(THUNDRA_PYTHON_AGENT_LOCAL_PATH): install.log_install_msg("Thundra Python agent", verbatim=True) try: install_thundra_cmd = "pip install --target=%s thundra==%s --no-warn-conflicts" % ( THUNDRA_PYTHON_AGENT_LOCAL_PATH, THUNDRA_PYTHON_AGENT_VERSION, ) common.run(install_thundra_cmd.split()) except Exception as e: print("Unable to install Thundra Python agent: %s" % e) return False return True
def _install_java_agent(): # Install Thundra Java agent JAR file if not os.path.exists(THUNDRA_JAVA_AGENT_LOCAL_PATH): install.log_install_msg("Thundra Java agent", verbatim=True) install.download(THUNDRA_JAVA_AGENT_REMOTE_URL, THUNDRA_JAVA_AGENT_LOCAL_PATH)