in pytest_rally/elasticsearch.py [0:0]
def install(self):
cmd = (f"esrally install --quiet "
f"--http-port={self.http_port} --node={self.node_name} "
f"--master-nodes={self.node_name} --car={self.car} "
f'--seed-hosts="127.0.0.1:{self.transport_port}"')
if self.distribution_version is not None:
cmd += f" --distribution-version={self.distribution_version}"
else:
cmd += f" --revision={self.revision}"
self.logger.debug("Installing Elasticsearch: [%s]", cmd)
if self.debug:
return
else:
try:
self.wait_until_port_is_free()
self.logger.info("Installing Elasticsearch: [%s]", cmd)
output = process.run_command_with_output(cmd)
self.installation_id = json.loads("".join(output))["installation-id"]
except subprocess.CalledProcessError as e:
raise AssertionError(f"Failed to install Elasticsearch", e)