def instance(): inst = load_jmx_config() # Add presto coordinator to the configuration inst.get('instances').append(deepcopy(inst.get('instances')[0])) inst['instances'][0]['port'] = 9997 return inst
def dd_environment(): with docker_run(os.path.join(get_here(), 'docker', 'docker-compose.yml'), mount_logs=True): instance = load_jmx_config() instance['instances'][0]['host'] = HOST instance['instances'][0]['port'] = 18983 yield instance, {'use_jmx': True}
def dd_environment(): compose_file = os.path.join(common.HERE, 'docker', 'docker-compose.yaml') with docker_run( compose_file, build=True, mount_logs=True, conditions=[ CheckDockerLogs( compose_file, [ # Management Center 'Hazelcast Management Center successfully started', r'Members \[2', # Members connected to each other r'Members \{size:2', ], matches='all', attempts=120, ) ], ): config = load_jmx_config() config['instances'] = [ common.INSTANCE_MEMBER_JMX, common.INSTANCE_MC_JMX, common.INSTANCE_MC_PYTHON ] yield config, {'use_jmx': True}
def instance(): inst = load_jmx_config() # Add trino coordinator to the configuration inst.get("instances").append(deepcopy(inst.get("instances")[0])) inst["instances"][0]["port"] = 9997 return inst
def dd_environment(): with docker_run( os.path.join(HERE, 'compose', 'docker-compose.yaml'), log_patterns=['ActiveMQ Jolokia REST API available'], conditions=[ WaitForPortListening(HOST, TEST_PORT), populate_server ], ): yield load_jmx_config(), {'use_jmx': True}
def instance(): inst = load_jmx_config() # Add managed servers to the configuration inst.get('instances').append(deepcopy(inst.get('instances')[0])) inst['instances'][0]['port'] = 9091 inst.get('instances').append(deepcopy(inst.get('instances')[0])) inst['instances'][0]['port'] = 9092 return inst
def dd_environment(): compose_file = os.path.join(HERE, 'docker', 'docker-compose.yml') with docker_run(compose_file, conditions=[ CheckDockerLogs(compose_file, 'Resin/4.0.62 started -server') ]): instance = load_jmx_config() yield instance, {'use_jmx': True}
def dd_environment(): compose_file = os.path.join(HERE, 'compose', 'docker-compose.yml') with docker_run(compose_file, conditions=[ CheckDockerLogs(compose_file, [r'\[KafkaServer id=\d+\] started'], matches="all") ]): yield load_jmx_config(), {'use_jmx': True}
def dd_environment(): with docker_run( os.path.join(HERE, 'compose', 'docker-compose.yaml'), log_patterns=[ r'datanode:\(\d+\) is available', 'Starting Hive Metastore Server', 'Starting HiveServer2' ], sleep=2, ): yield load_jmx_config(), {'use_jmx': True}
def dd_environment(): compose_file = os.path.join(common.HERE, 'docker', 'docker-compose.yaml') with docker_run(compose_file, mount_logs=True, conditions=[ CheckDockerLogs(compose_file, ['Started HiveMQ in'], matches='all') ]): config = load_jmx_config() config['instances'] = [common.INSTANCE] yield config, {'use_jmx': True}
def dd_environment(): with docker_run(os.path.join(HERE, 'docker', 'docker-compose.yml')): instance = load_jmx_config() instance['init_config']['custom_jar_paths'] = [ '/opt/jboss/jboss-client.jar' ] instance['instances'][0][ 'jmx_url'] = 'service:jmx:remote+http://{}:9990'.format( get_docker_hostname()) instance['instances'][0]['user'] = '******' instance['instances'][0]['password'] = '******' yield instance, E2E_METADATA
def dd_environment(): envs = {'JMX_PORT': str(JMX_PORT)} compose_file = os.path.join(HERE, 'compose', 'docker-compose.yaml') with docker_run( compose_file, log_patterns=['ActiveMQ Jolokia REST API available'], conditions=[WaitForPortListening(HOST, TEST_PORT), populate_server], env_vars=envs, ): config = load_jmx_config() config['instances'][0].update({'port': str(JMX_PORT), 'host': HOST}) yield config, {'use_jmx': True}
def dd_environment(): compose_file = os.path.join(HERE, 'compose', 'docker-compose.yml') patterns = [ 'Component type: CHANNEL, name: memchannel started', 'Component type: CHANNEL, name: kafka-memchannel started', 'Component type: SINK, name: hdfs-write started', 'Component type: SINK, name: kafka-sink started', 'Component type: SOURCE, name: hdfs-source started', 'Component type: SOURCE, name: kafka-source started', ] with docker_run(compose_file, log_patterns=patterns): instance = load_jmx_config() yield instance, {'use_jmx': True}
def dd_environment(): with TempDir('log') as log_dir: with docker_run( os.path.join(get_here(), 'compose', 'docker-compose.yml'), env_vars={'LOG_DIR': log_dir}, conditions=[WaitFor(setup_ignite)], log_patterns="Ignite node started OK", ): instance = load_jmx_config() instance['instances'][0]['port'] = 49112 instance['instances'][0]['host'] = get_docker_hostname() metadata = E2E_METADATA.copy() metadata['docker_volumes'] = ['{}:/var/log/ignite'.format(log_dir)] yield instance, metadata
def dd_environment(): envs = {'JMX_PORT': str(JMX_PORT)} log_pattern = 'ActiveMQ Jolokia REST API available' if IS_ARTEMIS: log_pattern = 'HTTP Server started at http://0.0.0.0:8161' with docker_run( os.path.join(HERE, 'compose', COMPOSE_FILE), log_patterns=[log_pattern], conditions=[ WaitForPortListening(HOST, TEST_PORT), populate_server ], env_vars=envs, ): config = load_jmx_config() config['instances'][0].update({'port': str(JMX_PORT), 'host': HOST}) yield config, {'use_jmx': True}
def dd_environment(): compose_file = os.path.join(common.HERE, 'docker', 'docker-compose.yaml') with docker_run( compose_file, build=True, mount_logs=True, conditions=[ CheckDockerLogs('hazelcast_management_center', ['Hazelcast Management Center successfully started']), CheckDockerLogs('hazelcast_management_center', ['Started communication with member']), CheckDockerLogs('hazelcast2', [r'Hazelcast JMX agent enabled']), CheckDockerLogs('hazelcast2', [r'is STARTED']), WaitFor(trigger_some_tcp_data), ], attempts=5, attempts_wait=5, ): config = load_jmx_config() config['instances'] = common.INSTANCE_MEMBERS + [common.INSTANCE_MC_JMX, common.INSTANCE_MC_PYTHON] yield config, {'use_jmx': True}
def dd_environment(): with TempDir('log') as log_dir: docker_volumes = ['{}:/var/log/ignite'.format(log_dir)] conditions = [] jvm_opts = '' if common.IS_PRE_2_9: # Activate JMX through 'control.sh' and functions made available to 'ignite.sh'. functions_sh = os.path.join(common.HERE, 'compose', 'functions.sh') docker_volumes.append( '{}:/opt/ignite/apache-ignite/bin/include/functions.sh'.format( functions_sh)) conditions.append(WaitFor(control_sh_activate)) else: # On 2.9.0 and above, the Ignite Docker image calls the JVM directly, # so JMX configuration should be set via JVM options. # See: https://ignite.apache.org/docs/latest/installation/installing-using-docker jvm_opts = ('-Dcom.sun.management.jmxremote ' '-Dcom.sun.management.jmxremote.port=49112 ' '-Dcom.sun.management.jmxremote.rmi.port=49112 ' '-Dcom.sun.management.jmxremote.authenticate=false ' '-Dcom.sun.management.jmxremote.ssl=false') env_vars = { 'IGNITE_IMAGE': common.IGNITE_IMAGE, 'JVM_OPTS': jvm_opts, 'LOG_DIR': log_dir, } with docker_run( os.path.join(get_here(), 'compose', 'docker-compose.yml'), env_vars=env_vars, conditions=conditions, log_patterns="Ignite node started OK", attempts=2, ): instance = load_jmx_config() instance['instances'][0]['port'] = 49112 instance['instances'][0]['host'] = get_docker_hostname() metadata = E2E_METADATA.copy() metadata['docker_volumes'] = docker_volumes yield instance, metadata
def dd_environment(): compose_file = os.path.join(HERE, 'compose', 'docker-compose.yaml') with docker_run( compose_file, conditions=[ CheckDockerLogs( compose_file, [ r'datanode:\d+ is available', 'Starting Hive Metastore Server', 'Starting HiveServer2' ], matches='all', ) ], ): instance_metastore = {'host': HOST, 'port': METASTORE_PORT} instance_server = {'host': HOST, 'port': SERVER_PORT} config = load_jmx_config() config['instances'] = [instance_metastore, instance_server] yield config, {'use_jmx': True}
def dd_environment(): USE_MULTIPLE_BROKERS = is_affirmative(os.environ['USE_MULTIPLE_BROKERS']) if USE_MULTIPLE_BROKERS: compose_file = os.path.join(HERE, 'compose', 'multiple-brokers.yaml') else: compose_file = os.path.join(HERE, 'compose', 'single-broker.yaml') with docker_run( compose_file, conditions=[ CheckDockerLogs(compose_file, [r'\[KafkaServer id=\d+\] started'], matches="all") ], env_vars= { # Advertising the hostname doesn't work on docker:dind so we manually # resolve the IP address. This seems to also work outside docker:dind # so we got that goin for us. 'KAFKA_HOST': HOST_IP }, ): yield load_jmx_config(), {'use_jmx': True}
def dd_environment(): compose_file = os.path.join(HERE, 'compose', 'docker-compose.yml') with docker_run(compose_file, log_patterns=['Server startup']): yield load_jmx_config(), {'use_jmx': True}
def dd_environment(): with docker_run(os.path.join(HERE, 'docker', 'docker-compose.yml')): instance = load_jmx_config() time.sleep( 15) # TODO: use better strategy, e.g. waiting for specific logs yield instance, {'use_jmx': True}
def dd_environment(): with docker_run(os.path.join(HERE, 'compose', 'docker-compose.yml')): yield load_jmx_config(), {'use_jmx': True}
def dd_environment(): with docker_run(os.path.join(HERE, 'docker', 'docker-compose.yml')): instance = load_jmx_config() yield instance, {'use_jmx': True}
def instance(): return load_jmx_config()