Пример #1
0
def main():
    usage = '%prog -v version -c cluster-spec'
    parser = OptionParser(usage)
    parser.add_option('-v', '--version', dest='version')
    parser.add_option('-c', dest='cluster_spec_fname',
                      help='path to cluster specification file',
                      metavar='cluster.spec')
    parser.add_option('--verbose', dest='verbose', action='store_true',
                      help='enable verbose logging')
    parser.add_option('-o', dest='toy',
                      help='optional toy build ID', metavar='couchstore')

    parser.add_option('-t', dest='test_config_fname',
                      help='path to test configuration file',
                      metavar='my_test.test')

    parser.add_option('-e', '--edition', dest='cluster_edition', default='enterprise',
                      help='the cluster edition (community or enterprise)')
    parser.add_option('--url', dest='url', default=None,
                      help='The http URL to a Couchbase RPM that should be'
                           ' installed.  This overrides the URL to be installed.')
    options, args = parser.parse_args()
    cluster_spec = ClusterSpec()
    cluster_spec.parse(options.cluster_spec_fname, args)

    test_config = TestConfig()
    test_config.parse(options.test_config_fname, args)

    cm = ClusterManager(cluster_spec, test_config, options.verbose)

    installer = CouchbaseInstaller(cluster_spec, options)
    if True:
        installer.install()
        if cm.remote:
            cm.tune_logging()
            cm.restart_with_sfwi()
            cm.restart_with_alternative_num_vbuckets()
            cm.restart_with_alternative_num_cpus()
            cm.restart_with_tcmalloc_aggressive_decommit()
            cm.disable_moxi()
        cm.configure_internal_settings()
        cm.set_data_path()
        cm.set_services()
        cm.set_mem_quota()
        cm.set_index_mem_quota()
        cm.set_auth()
        time.sleep(30)
        """host = cluster_spec.yield_masters().next()"""
    host_ip = cluster_spec.yield_masters().next().split(':')[0]
    URL = 'http://' + host_ip + ':8093'
    logger.info('logging the URL: {}'.format(URL))
    conn = urllib3.connection_from_url(URL)
    rest = RestHelper(cluster_spec)
    airline_result = do_airline_benchmarks(conn, rest, host_ip, installer.remote, cluster_spec)
    beer_result = do_beer_queries(conn, rest, host_ip, installer.remote)
    print 'beer_result is', beer_result

    sys.exit(not (airline_result and beer_result))
Пример #2
0
def main():
    usage = '%prog -v version -c cluster-spec'
    parser = OptionParser(usage)
    parser.add_option('-v', '--version', dest='version')
    parser.add_option('-c', dest='cluster_spec_fname',
                      help='path to cluster specification file',
                      metavar='cluster.spec')
    parser.add_option('--verbose', dest='verbose', action='store_true',
                      help='enable verbose logging')
    parser.add_option('-o', dest='toy',
                      help='optional toy build ID', metavar='couchstore')

    parser.add_option('-t', dest='test_config_fname',
                      help='path to test configuration file',
                      metavar='my_test.test')

    parser.add_option('-e', '--edition', dest='cluster_edition', default='enterprise',
                      help='the cluster edition (community or enterprise)')
    parser.add_option('--url', dest='url', default=None,
                      help='The http URL to a Couchbase RPM that should be'
                           ' installed.  This overrides the URL to be installed.')
    options, args = parser.parse_args()
    cluster_spec = ClusterSpec()
    cluster_spec.parse(options.cluster_spec_fname)

    test_config = TestConfig()
    test_config.parse(options.test_config_fname)

    cm = ClusterManager(cluster_spec, test_config, options.verbose)

    installer = CouchbaseInstaller(cluster_spec, options)
    if True:
        installer.install()
        if cm.remote:
            cm.tune_logging()
            cm.restart_with_sfwi()
            cm.restart_with_alternative_num_vbuckets()
            cm.restart_with_alternative_num_cpus()
            cm.restart_with_tcmalloc_aggressive_decommit()
            cm.disable_moxi()
        cm.configure_internal_settings()
        cm.set_data_path()
        cm.set_services()
        cm.set_mem_quota()
        cm.set_index_mem_quota()
        cm.set_auth()
        time.sleep(30)
        """host = cluster_spec.yield_masters().next()"""
    host_ip = cluster_spec.yield_masters().next().split(':')[0]
    URL = 'http://' + host_ip + ':8093'
    logger.info('logging the URL: {}'.format(URL))
    conn = urllib3.connection_from_url(URL)
    rest = RestHelper(cluster_spec)
    airline_result = do_airline_benchmarks(conn, rest, host_ip, installer.remote, cluster_spec)
    beer_result = do_beer_queries(conn, rest, host_ip, installer.remote)
    print 'beer_result is', beer_result

    sys.exit(not (airline_result and beer_result))
Пример #3
0
def main():
    usage = '%prog -v version -c cluster-spec -f conffile -b build -t tag'
    parser = OptionParser(usage)

    parser.add_option('-v', '--version', dest='version')
    parser.add_option('-c', dest='cluster_spec_fname',
                      help='path to cluster specification file',
                      metavar='cluster.spec')
    parser.add_option('--verbose', dest='verbose', action='store_true',
                      help='enable verbose logging')
    parser.add_option('-o', dest='toy',
                      help='optional toy build ID', metavar='couchstore')

    parser.add_option('-t', dest='test_config_fname',
                      help='path to test configuration file',
                      metavar='my_test.test')

    parser.add_option('-e', '--edition', dest='cluster_edition', default='enterprise',
                      help='the cluster edition (community or enterprise)')
    parser.add_option('--url', dest='url', default=None,
                      help='The http URL to a Couchbase RPM that should be'
                           ' installed.  This overrides the URL to be installed.')

    parser.add_option('-f', '--filename', dest='filename')
    parser.add_option('-b','--build',dest='build')
    parser.add_option('-n','--number',dest='number')

    options, args = parser.parse_args()
    test_id=options.number + '_'+options.build

    data=None
    try:
        with open(options.filename) as data_file:
            data = json.load(data_file)
    except (OSError, IOError,ValueError) as e:
        raise e
    mng_data = manage_test_result(['beer_queries','travel_queries'])
    mng_data.create_cb_instance(data["couchbase_server"],data["couchbase_query_bucket"])

    options, args = parser.parse_args()
    cluster_spec = ClusterSpec()
    cluster_spec.parse(options.cluster_spec_fname, args)

    test_config = TestConfig()
    test_config.parse(options.test_config_fname, args)

    cm = ClusterManager(cluster_spec, test_config, options.verbose)

    installer = CouchbaseInstaller(cluster_spec, options)
    if True:
        installer.install()
        if cm.remote:
            cm.tune_logging()
            cm.restart_with_sfwi()
            cm.restart_with_alternative_num_vbuckets()
            cm.restart_with_alternative_num_cpus()
            cm.restart_with_tcmalloc_aggressive_decommit()
            cm.disable_moxi()
        cm.configure_internal_settings()
        cm.set_data_path()
        cm.set_services()
        cm.set_mem_quota()
        cm.set_index_mem_quota()
        cm.set_auth()
        time.sleep(30)
        """host = cluster_spec.yield_masters().next()"""
    host_ip = cluster_spec.yield_masters().next().split(':')[0]
    URL = 'http://' + host_ip + ':8093'
    logger.info('logging the URL: {}'.format(URL))
    conn = urllib3.connection_from_url(URL)
    rest = RestHelper(cluster_spec)
    airline_result = do_airline_benchmarks(mng_data,conn, rest, host_ip, installer.remote, cluster_spec)
    beer_result = do_beer_queries(mng_data,conn, rest, host_ip, installer.remote)
    print 'beer_result is', beer_result


    #mng_data.cb_load_test(data["couchbase_query_bucket"],beer_result)
    mng_data.load_data_query_benchmark(data["couchbase_query_bucket"],'query_benchmark',test_id,options.version)
    mng_data.show_data_query_benchmark(data["couchbase_query_bucket"],'query_benchmark',test_id)
    sys.exit(not (airline_result and beer_result))
def main():
    usage = '%prog -v version -c cluster-spec -f conffile -b build -t tag'
    parser = OptionParser(usage)

    parser.add_option('-v', '--version', dest='version')
    parser.add_option('-c',
                      dest='cluster_spec_fname',
                      help='path to cluster specification file',
                      metavar='cluster.spec')
    parser.add_option('--verbose',
                      dest='verbose',
                      action='store_true',
                      help='enable verbose logging')
    parser.add_option('-o',
                      dest='toy',
                      help='optional toy build ID',
                      metavar='couchstore')

    parser.add_option('-t',
                      dest='test_config_fname',
                      help='path to test configuration file',
                      metavar='my_test.test')

    parser.add_option('-e',
                      '--edition',
                      dest='cluster_edition',
                      default='enterprise',
                      help='the cluster edition (community or enterprise)')
    parser.add_option('--url',
                      dest='url',
                      default=None,
                      help='The http URL to a Couchbase RPM that should be'
                      ' installed.  This overrides the URL to be installed.')

    parser.add_option('-f', '--filename', dest='filename')
    parser.add_option('-b', '--build', dest='build')
    parser.add_option('-n', '--number', dest='number')

    options, args = parser.parse_args()
    test_id = options.number + '_' + options.build

    data = None
    try:
        with open(options.filename) as data_file:
            data = json.load(data_file)
    except (OSError, IOError, ValueError) as e:
        raise e
    mng_data = manage_test_result(['beer_queries', 'travel_queries'])
    mng_data.create_cb_instance(data["couchbase_server"],
                                data["couchbase_query_bucket"])

    options, args = parser.parse_args()
    cluster_spec = ClusterSpec()
    cluster_spec.parse(options.cluster_spec_fname, args)

    test_config = TestConfig()
    test_config.parse(options.test_config_fname, args)

    cm = ClusterManager(cluster_spec, test_config, options.verbose)

    installer = CouchbaseInstaller(cluster_spec, options)
    if True:
        installer.install()
        if cm.remote:
            cm.tune_logging()
            cm.restart_with_sfwi()
            cm.restart_with_alternative_num_vbuckets()
            cm.restart_with_alternative_num_cpus()
            cm.restart_with_tcmalloc_aggressive_decommit()
            cm.disable_moxi()
        cm.configure_internal_settings()
        cm.set_data_path()
        cm.set_services()
        cm.set_mem_quota()
        cm.set_index_mem_quota()
        cm.set_auth()
        time.sleep(30)
        """host = cluster_spec.yield_masters().next()"""
    host_ip = cluster_spec.yield_masters().next().split(':')[0]
    URL = 'http://' + host_ip + ':8093'
    logger.info('logging the URL: {}'.format(URL))
    conn = urllib3.connection_from_url(URL)
    rest = RestHelper(cluster_spec)
    airline_result = do_airline_benchmarks(mng_data, conn, rest, host_ip,
                                           installer.remote, cluster_spec)
    beer_result = do_beer_queries(mng_data, conn, rest, host_ip,
                                  installer.remote)
    print 'beer_result is', beer_result

    #mng_data.cb_load_test(data["couchbase_query_bucket"],beer_result)
    mng_data.load_data_query_benchmark(data["couchbase_query_bucket"],
                                       'query_benchmark', test_id,
                                       options.version)
    mng_data.show_data_query_benchmark(data["couchbase_query_bucket"],
                                       'query_benchmark', test_id)
    sys.exit(not (airline_result and beer_result))