def get_docker_instances_by_testid(self): instances = list_instances_gce({"TestId": self.test_id}, running=True) filtered_instances = filter_gce_instances_by_type(instances) for instance in filtered_instances['db_nodes']: self.db_cluster.append( CollectingNode(name=instance.name, ssh_login_info={ "hostname": instance.public_ips[0], "user": '******', "key_file": self.params['user_credentials_path'] }, instance=instance, global_ip=instance.public_ips[0], tags={ **self.tags, "NodeType": "scylla-db", })) self.monitor_set.append( CollectingNode(name=f"monitor-node-{self.test_id}-0", global_ip='127.0.0.1', grafana_ip=get_docker_bridge_gateway( LocalCmdRunner()), tags={ **self.tags, "NodeType": "monitor", })) for instance in filtered_instances['loader_nodes']: self.loader_set.append( CollectingNode(name=instance.name, ssh_login_info={ "hostname": instance.public_ips[0], "user": '******', "key_file": self.params['user_credentials_path'] }, instance=instance, global_ip=instance.public_ips[0], tags={ **self.tags, "NodeType": "loader", }))
def grafana_address(self): # Grafana starts in port mapping mode under Docker and we can't use 127.0.0.1 because it'll be used by # RemoteWebDriver from RemoteWebDriverContainer. We can use a gateway from a bridge network instead, # because port mapping works on the gateway address too. return get_docker_bridge_gateway(self.remoter)