cloud_name: MYOS

results:
        instance_file: INSTANCE_FILE
        instance_type_file: INSTANCE_TYPE_FILE
        net_file:      NET_FILE
        image_file:   IMAGE_FILE
        user_file:    USER_FILE
        tenant_file:  TENANT_FILE
        apiendpoint_file: APIENDPOINT_FILE
        block_storage_file: BLOCKSTORAGE_FILE
        quota_file:  QUOTA_FILE
        hypervisor_file:  HYPERVISOR_FILE
        results_dir: HOMEDIR/results

        support_evidence:

            instance_user: cbuser
            instance_keypath: BASE_CB_PATH/credentials/cbtool_rsa
            support_script: BASE_OSG_PATH/driver/support_script/collect_support_data.sh
            cloud_config_script_dir: HOMEDIR/osgcloud/driver/support_script/cloud_config/

            ###########################################
            # START
            # instance_support_evidence flag must be set
            # to true for public and private clouds
            # cloud_config_support_evidence flag can be
            # set to true private clouds. It is not required
            # to be set for a compliant run.
            # host_support_evidence flag can be set to
            # true for private cloud testing. It is not
            # required to be set for a compliant run.
            ###########################################
            instance_support_evidence: true
            cloud_config_support_evidence: true
            host_support_evidence: false
            ###########################################
            # END
            ###########################################

# processed by OsgcloudCommon::setCommonConfig() function
common:
        # delete logs if an experiment id changes
        logstore:
            expid_change_restart: true

        vm_defaults:
            # for a compliant run, the update_attempts is recalculated
            # during scale-out phase based on the maximum of the average
            # baseline AI provisioning time for YCSB and KMeans.
            # set update_attempts to a large value, if provisioning
            # in baseline takes a long time.

            # these parameters impact how provisioning failure is calculated.

            update_attempts: 60
            update_frequency: 5

            # if SLA is violated, a sticky bit is set on an AI
            sticky_app_status: true

            # Instructing Instances (VMs) to publish messages whenever they arrive, depart
            notification: true
            notification_channel: EXPERIMENT

            ###############################################
            # START: these parameters cannot be changed in
            # vm_defaults.
            ###############################################
            # sla_provisioning_abort will fail all instances
            # belonging to an application instance, if the AI
            # fails to provision within a target.
            # in CSV, an 'abort' column indicates whether an
            # AI was failed due to provisioning QoS violation.
            sla_provisioning_abort: true

            # if during an AI deployment, any of the instances fail,
            # retry to create the instance that failed instead of
            # failing the whole AI. In SPEC Cloud, an instance
            # failure implies an AI failure. No retries are permitted.
            # name is a bit misnomer, since the first creation attempt
            # is determined from recreate_attempts
            recreate_attempts: 1
            ###########################################
            # END
            ###########################################

        vm_templates:
            CASSANDRA: login=cbuser, remote_dir_name=cbtool
            SEED: login=cbuser, remote_dir_name=cbtool
            YCSB: login=cbuser, remote_dir_name=cbtool
            HADOOPMASTER: login=cbuser, remote_dir_name=cbtool
            HADOOPSLAVE: login=cbuser, remote_dir_name=cbtool
        ###############################################
        #  START cannot be changed for a compliant run
        #  EXCEPT FOR: timeserver
        #              no space between servers
        #              separated by commas
        #  set it to cbtool (for testing)
        ##############################################
        mon_defaults:
           collect_from_guest: false
           collect_from_host: false
           extra_app_m: read_99_latency,insert_99_latency,read_operations,insert_operations,sla_runtime
           timeserver: 100.127.162.201
        ###########################################
        # END
        ###########################################

        ###############################################
        # CAUTION: start, Changing these parameters
        # may cause CBTOOL to hold off issusing AIs.
        # Consequently, the interarrival time between
        # AIs may exceed 600s.
        # Such results will be considered non-compliant.
        ###############################################
        aidrs_defaults:
           # number of parallel AIs that can be concurrently in flight (issued
           # but not yet provisioned). This parameter may
           # need to be changed for clouds depending on the provisioning speed
           # of a cloud.
           daemon_parallelism: 20
        ai_defaults:
           # number of parallel VMs (within an AI) that can be concurrently in flight
           attach_parallelism: 10
        ###############################################
        # CAUTION: end
        ###############################################

kmeans:
        # name of the workload in cbtool
        workload: hadoop
        vapp_pattern: simplehd
        ###############################################
        #  START cannot be changed for a compliant run
        ###############################################
        sut: hadoopmaster->5_x_hadoopslave
        load_profile: kmeans
        load_level: 1 # implies that load_factor is used
        load_factor: 1000000
        samples_per_inputfile: 500000
        num_of_clusters: 5
        dimensions: 20
        max_iteration: 5
        regenerate_data: true
        ###########################################
        # END
        ###########################################

        java_home: /usr/lib/jvm/java-8-openjdk-amd64
        hadoop_home: /usr/local/hadoop
        dfs_name_dir: /hadoopstore/hdfs/namenode
        hadoopslave_data_dir: /hadoopstore/hdfs/datanode
        hadoopmaster_data_dir: /hadoopstore/hdfs/datanode 
        # num_maps and num_reds have no effect with Yarn
        num_maps: 8
        num_reds: 4
ycsb:
        # name of the workload in cbtool
        workload: cassandra_ycsb
        vapp_pattern: simpleyc
        ##############################################
        #  START cannot be changed for a compliant run
        ##############################################
        sut: ycsb->6_x_seed
        input_records: 1000000
        operation_count: 4000000
        thread_count: 40
        load_profile: workloadd
        regenerate_data: true
        app_collection: eager
        load_duration: 300
        replication_factor: 3
        ###########################################
        # END
        ###########################################
        cassandra_data_dir: /dbstore
        seed_data_dir: /dbstore
        drop_keyspace: 1
        #uncomment this for centos images
        cassandra_conf_path: /etc/cassandra/conf/cassandra.yaml


##############################################################
#  START iteration_count CANNOT be less than 5 
#  destroy_ai_upon_completion CANNOT be changed for a compliant run
#  completion_time can be changed
#  run_counts cannot be less than 5 for a compliant run
##############################################################
baseline:
    # Optional: This option provides tolerance to errors in the baseline phase.
    # It doesn't have any bearing on the result calculation of the benchmark,
    # but if set to high can hide errors in your cloud if too many errors occur.
    # Changing it is compliant and does not affect the results of the benchmark.
    # If too many errors occur, the benchmark will self-terminate and not produce
    # a result and never proceed to the main scale-out phase of the benchmark.
    app_error_tolerance: 20 # percentage of iteration_count. Optional. -1 Disables

    iteration_count: 5 # must be at least 5 for a compliant run
    ycsb_run_count: 5 # must be at least 5 for a compliant run 
    kmeans_run_count: 5 # must be at least 5 for a compliant run 
    destroy_ai_upon_completion: true
        #application instances are destroyed after baseline iteration. Change it to false for debugging. Must be true for a compliant run.
    qos:
      ycsb:
        completion_time: -1 # time in minutes. -1 indicates that we should
                            # wait forever until baseline completes.
                            # Recommended. Can be any reasonable amount of time
                            # expected that the baseline should terminate.
      kmeans:
        completion_time: -1 # time in minutes. -1 indicates that we should
                            # wait forever until baseline completes.
                            # Recommended. Can be any reasonable amount of time
                            # expected that the baseline should terminate.

###############################################
#  START cannot be changed for a compliant run
###############################################
elasticity:
    # Scale-out Phase
    #ycsb and kmeans workloads. Their corresponding cbtool VApp
    #names are picked from the respective workloads
    workloads: [ ycsb, kmeans ]

    workload_common:

        #interarrival time of AI. between 5 and 10 minutes
        iait: uniformIXIXI300I600

        #lifetime of an AI. set to "infinite" value in seconds
        lifetime: 10000000000000

    qos:
        ycsb:
            throughput_factor: 0.30003     # factor 1/3.333
            read_99_latency_factor: 20     # factor
            insert_99_latency_factor: 20   # factor

        kmeans:
            completion_time_factor: 3.333  # factor

    stopping_condition:
        prov_latency_threshold_factor: 3  #prov latency threshold factor
        minimum_ais: 4            #min number of AIs that must be provisioned for a compliant run
        failed_ais_pct: 20        #failed AIs percentrage
        qos_violated_ais_pct: 50  #qos violation
        app_errors_ais_pct: 10    #runtime errors
        airun_noresult_reported_factor: 4  #wait factor before an AI run is considered to have failed on account of no reporting
###########################################
# END cannot be changed for a compliant run
###########################################
        # set maximum ai. This value indicates when the benchmark
        # stops after maximum_ais have been issued. The ais set in maximum_ai
        # will not likely be provisioned when the setting is reached.
        # It is recommended to set this value greater than 6, otherwise,
        # the likelihood of a non-compliant run increases, that is,
        # no AIs of any workload reporting result, or provisioned AIs
        # being less than four.
        # assuming other stopping conditions have not yet been encountered,
        # the benchmark
        # will stop when either of maximum_ais or reported_ais is reached.
        maximum_ais:  54

        # see FAQ titled, "What is the difference between max_ais and reported_ais in the benchmark configuration file osgcloud_rules.yaml
        # in summary, the benchmark stops when number of AIs in reported_ais
        # have reported results for one or more AI runs, assuming other
        # stopping conditions have not yet been encountered.
        reported_ais: 54

        # ignore qos when max_ais and reported_ais is set. Must be false
        # for a compliant run
        ignore_qos_when_max_is_set: false

        # delete instances after scale-out phase. the Hadoop and
        # Cassandra logs are not collected from instances.
        # set to true if you do not want to delete instances at the end
        # of scale-out phase. A similar option for the baseline is
        # available above called "destroy_ai_upon_completion"
        keep_instances_alive: false


############################################################
# Reference platform - Cannot be changed for a compliant run
############################################################

ref_platform:
    ycsb:
       # 2018 YCSB Reference Values
        throughput: 33448.21
        insert_99_response_time: 2.19
        read_99_response_time: 4.01

    kmeans:
        completion_time:
        # 2018 Kmeans Weighted Competion Time for Reference Platform (for reference only):
            0: 145.1
        # 2018 values 
            1: 76.0
            2: 102.0
            3: 128.0
            4: 154.0
            5: 180.0

###########################################
# Reference platform - END
###########################################


simulated:

    common:
        ai_defaults:
            create_performance_emitter: true
        vm_defaults:
            check_boot_complete: wait_for_0
        load_duration: 120  # 5 seconds of simulated time

    workload_common:
        iait: 90          # a new vapp arrives every 20 seconds
        errors_value: 0   # set the errors value to 0 for workloads

    ycsb:
        completion_time: uniform|X|X|100|150
        insert_operations: uniform|X|X|198000|202000
        read_operations: uniform|X|X|3762000|3838000
        read_99_latency: uniform|X|X|4|20
        insert_99_latency: uniform|X|X|1|10
        throughput: uniform|X|X|16000|26000
        deployment_time: uniform|X|X|200|400
        datagen_time: uniform|X|X|74|86
    kmeans:
        deployment_time: uniform|X|X|90|220
        completion_time: uniform|X|X|108|188
        datagen_time: uniform|X|X|30|50
        throughput: uniform|X|X|100000|140000
        latency: uniform|X|X|100000|300000
        iterations: uniform|X|X|1|5.9999
