Esempio n. 1
0
import sdk_install
import sdk_utils

PACKAGE_NAME = sdk_utils.get_package_name("beta-kafka")
SERVICE_NAME = sdk_utils.get_service_name(PACKAGE_NAME.lstrip("beta-"))

DEFAULT_BROKER_COUNT = 3
DEFAULT_PARTITION_COUNT = 1
DEFAULT_REPLICATION_FACTOR = 1
DEFAULT_PLAN_NAME = "deploy"
DEFAULT_PHASE_NAME = "Deployment"
DEFAULT_POD_TYPE = "kafka"
DEFAULT_TASK_NAME = "broker"
DEFAULT_KAFKA_TIMEOUT = 10 * 60
DEFAULT_TOPIC_NAME = "topic1"

EPHEMERAL_TOPIC_NAME = "topic_2"


def install(package_name,
            service_name,
            expected_running_tasks,
            additional_options={},
            package_version=None,
            timeout_seconds=25 * 60,
            wait_for_deployment=True):

    test_options = {"brokers": {"cpus": 0.5}}

    sdk_install.install(package_name=package_name,
                        expected_running_tasks=expected_running_tasks,
Esempio n. 2
0
import json
import logging
import retrying
import uuid

import sdk_cmd
import sdk_hosts
import sdk_plan
import sdk_tasks
import sdk_utils

log = logging.getLogger(__name__)

PACKAGE_NAME = sdk_utils.get_package_name("hdfs")
SERVICE_NAME = sdk_utils.get_service_name(PACKAGE_NAME.lstrip("beta-"))
FOLDERED_SERVICE_NAME = sdk_utils.get_foldered_name(SERVICE_NAME)

DEFAULT_TASK_COUNT = 10  # 3 data nodes, 3 journal nodes, 2 name nodes, 2 zkfc nodes

TEST_CONTENT_SMALL = "This is some test data"
DEFAULT_HDFS_TIMEOUT = 5 * 60
HDFS_POD_TYPES = {"journal", "name", "data"}
KEYTAB = "hdfs.keytab"
HADOOP_VERSION = "hadoop-2.6.0-cdh5.9.1"

DOCKER_IMAGE_NAME = "mesosphere/hdfs-testing-client:6972ea3833c9449111aceaa998e3e093a9c8dcee"
CLIENT_APP_NAME = "hdfs-client"


def hadoop_command(command):
    return "/{}/bin/hdfs {}".format(HADOOP_VERSION, command)
Esempio n. 3
0
import sdk_install
import sdk_utils

# allow overriding these names via envvars, for confluent tests:
PACKAGE_NAME = sdk_utils.get_package_name("kafka")
SERVICE_NAME = sdk_utils.get_service_name(PACKAGE_NAME.lstrip("beta-"))

ZOOKEEPER_PACKAGE_NAME = "kafka-zookeeper"
ZOOKEEPER_SERVICE_NAME = "kafka-zookeeper"
ZOOKEEPER_TASK_COUNT = 6

DEFAULT_BROKER_COUNT = 3
DEFAULT_PARTITION_COUNT = 1
DEFAULT_REPLICATION_FACTOR = 1
DEFAULT_POD_TYPE = "kafka"
DEFAULT_TASK_NAME = "broker"
DEFAULT_KAFKA_TIMEOUT = 10 * 60
DEFAULT_TOPIC_NAME = "topic1"

EPHEMERAL_TOPIC_NAME = "topic_2"


def install(
        package_name,
        service_name,
        expected_running_tasks,
        additional_options={},
        package_version=None,
        timeout_seconds=25*60,
        wait_for_deployment=True):