distributed-system-analysis/run-perf

View on GitHub
docs/source/jenkins/jobs.yaml

Summary

Maintainability
Test Coverage
##############################################################################
# Default configuration
##############################################################################
- defaults:
    name: "global"
    mailto: ""
    wrappers:
        - ansicolor
        - timestamps
        - workspace-cleanup
    build-discarder:
        days-to-keep: 365
        artifact-num-to-keep: 60
    # Default runperf params
    param-distro: ''
    param-guest-distro: ''
    param-tests: "'fio:{{\"targets\": \"/fio\"}}' 'uperf:{{\"protocols\": \"tcp\"}}' 'uperf:{{\"protocols\": \"udp\", \"test-types\": \"rr\"}}'"
    param-profiles: "Localhost DefaultLibvirt TunedLibvirt"
    param-src-build: '1'
    param-cmp-tolerance: 5
    param-cmp-stddev-tolerance: 10
    param-cmp-model-job: ''
    param-cmp-model-build: ''
    param-host-rpm-from-urls: ''
    param-no-reference-builds: 14
    param-fio-nbd-setup: false
    param-upstream-qemu-commit: ''
    param-github-publisher: ''
    param-metadata: ''
    param-host-script: ''
    param-worker-script: ''
    param-job: "{name}-run"
    trigger-on: "H 17 * * *"
    disabled: false


##############################################################################
# Definition for the run-perf execution job
##############################################################################
- job-template:
    name: "{name}-run"
    triggers:
        - timed: "{trigger-on}"
    project-type: pipeline
    parameters:
        - string:
            name: DISTRO
            description: 'Distribution to be installed/is installed (Fedora-31), when empty latest el8 nightly build is obtained from bkr'
            default: "{param-distro}"
        - string:
            name: GUEST_DISTRO
            description: 'Distribution to be installed on guest, when empty "distro" is used'
            default: "{param-guest-distro}"
        - string:
            name: MACHINE
            description: 'Machine to be provisioned and tested'
            default: "{param-machine}"
        - string:
            name: ARCH
            description: 'Target machine architecture'
            default: "{param-arch}"
        - string:
            name: TESTS
            description: 'Space separated list of tests to be executed (WARNING: fio-nbd test requires the FIO_NBD_SETUP checkbox enabled!)'
            default: "{param-tests}"
        - string:
            name: PROFILES
            description: 'Space separated list of profiles to be applied'
            default: "{param-profiles}"
        - string:
            name: SRC_BUILD
            description: 'Base build to compare with'
            default: "{param-src-build}"
        - string:
            name: CMP_MODEL_JOB
            description: 'Job to copy linear "model.json" from'
            default: "{param-cmp-model-job}"
        - string:
            name: CMP_MODEL_BUILD
            description: 'Build to copy linear "model.json" from (-1 means lastSuccessful)'
            default: "{param-cmp-model-build}"
        - string:
            name: CMP_TOLERANCE
            description: Tolerance for mean values
            default: "{param-cmp-tolerance}"
        - string:
            name: CMP_STDDEV_TOLERANCE
            description: Tolerance for standard deviation values
            default: "{param-cmp-stddev-tolerance}"
        - string:
            name: HOST_KERNEL_ARGS
            description: Add custom kernel arguments on host
            default: ""
        - text:
            name: HOST_RPM_FROM_URLS
            description: 'Specify pages to query for links to RPMs to be installed on host. Works well with koji/brew links to package or build page as well as individually published list of pkgs, also tries to find "$arch/" link and search pkgs there.\n\nThe format is:\n$pkgFilter;$rpmFilter;$urlList\nkernel-[^"]*fc38;!debug|bpftool|kernel-tools|perf|kernel-selftests|kernel-doc;https://koji.fedoraproject.org/koji//packageinfo?packageID=8\nhttps://koji.fedoraproject.org/koji//buildinfo?buildID=2110910\n(\d+);;http://example.com/repos/test/MyRepo/?C=M\\;O=D'
            default: "{param-host-rpm-from-urls}"
        - string:
            name: GUEST_KERNEL_ARGS
            description: Add custom kernel argsuments on workers/guests
            default: ""
        - text:
            name: GUEST_RPM_FROM_URLS
            description: 'Specify pages to query for links to RPMs to be installed on guest. Works well with koji/brew links to package or build page as well as individually published list of pkgs, also tries to find "$arch/" link and search pkgs there.\n\nThe format is:\n$pkgFilter;$rpmFilter;$urlList\nkernel-[^"]*fc38;!debug|bpftool|kernel-tools|perf|kernel-selftests|kernel-doc;https://koji.fedoraproject.org/koji//packageinfo?packageID=8\nhttps://koji.fedoraproject.org/koji//buildinfo?buildID=2110910\n(\d+);;http://example.com/repos/test/MyRepo/?C=M\\;O=D'
            default: ""
        - bool:
            name: PBENCH_PUBLISH
            description: 'Push the pbench results to company pbench server'
            default: "{param-pbench-publish}"
        - string:
            name: GITHUB_PUBLISHER_PROJECT
            description: 'Github publisher project ID (when you want to publish your results)'
            default: "{param-github-publisher}"
        - bool:
            name: FIO_NBD_SETUP
            description: 'Compile and install fio with nbd ioengine enabled before test execution'
            default: "{param-fio-nbd-setup}"
        - string:
            name: UPSTREAM_QEMU_COMMIT
            description: 'Compile and install qemu using provided commit/tag from the upstream git. Use it by using $PROFILE:{{"qemu_bin": "/usr/local/bin/qemu-system-$ARCH"}} when specifying profiles.'
            default: "{param-upstream-qemu-commit}"
        - bool:
            name: FEDORA_LATEST_KERNEL
            description: 'Install the latest kernel from koji (Fedora rpm)'
            default: false
        - string:
            name: METADATA
            description: 'Additional run-perf --metadata arguments'
            default: "{param-metadata}"
        - text:
            name: HOST_SCRIPT
            description: 'Host script to be executed on all --servers'
            default: "{param-host-script}"
        - text:
            name: WORKER_SCRIPT
            description: 'Worker script to be executed on all runperf workers'
            default: "{param-worker-script}"
        - string:
            name: DESCRIPTION_PREFIX
            description: Description prefix (describe the difference from default)
            default: ""
        - string:
            name: NO_REFERENCE_BUILDS
            description: "Number of reference builds for comparison"
            default: "{param-no-reference-builds}"
    sandbox: true
    pipeline-scm:
        scm:
            - git:
                url: git://PATH_TO_YOUR_REPO_WITH_PIPELINES.git
                branches:
                    - main
        script-path: "runperf.groovy"
        lightweight-checkout: true


##############################################################################
# Definition for the upstream qemu bisect job
##############################################################################
- job-template:
    name: "{name}-bisect-qemu"
    project-type: pipeline
    parameters:
        - string:
            name: DISTRO
            description: 'Distribution to be installed/is installed (Fedora-31), when empty latest el8 nightly build is obtained from bkr'
            default: "{param-distro}"
        - string:
            name: GUEST_DISTRO
            description: 'Distribution to be installed on guest, when empty "distro" is used'
            default: "{param-guest-distro}"
        - string:
            name: MACHINE
            description: 'Machine to be provisioned and tested'
            default: "{param-machine}"
        - string:
            name: ARCH
            description: 'Target machine architecture'
            default: "{param-arch}"
        - string:
            name: TESTS
            description: 'Space separated list of tests to be executed (WARNING: fio-nbd test requires the FIO_NBD_SETUP checkbox enabled!)'
            default: "{param-tests}"
        - string:
            name: PROFILES
            description: 'Space separated list of profiles to be applied'
            default: "{param-profiles}"
        - text:
            name: HOST_SCRIPT
            description: 'Host script to be executed on all --servers'
            default: "{param-host-script}"
        - text:
            name: WORKER_SCRIPT
            description: 'Worker script to be executed on all runperf workers'
            default: "{param-worker-script}"
        - string:
            name: HOST_KERNEL_ARGS
            description: Add custom kernel arguments on host
            default: ""
        - text:
            name: HOST_RPM_FROM_URLS
            description: 'Specify pages to query for links to RPMs to be installed on host. Works well with koji/brew links to package or build page as well as individually published list of pkgs, also tries to find "$arch/" link and search pkgs there.\n\nThe format is:\n$pkgFilter;$rpmFilter;$urlList\nkernel-[^"]*fc38;!debug|bpftool|kernel-tools|perf|kernel-selftests|kernel-doc;https://koji.fedoraproject.org/koji//packageinfo?packageID=8\nhttps://koji.fedoraproject.org/koji//buildinfo?buildID=2110910\n(\d+);;http://example.com/repos/test/MyRepo/?C=M\\;O=D'
            default: "{param-host-rpm-from-urls}"
        - string:
            name: GUEST_KERNEL_ARGS
            description: Add custom kernel argsuments on workers/guests
            default: ""
        - text:
            name: GUEST_RPM_FROM_URLS
            description: 'Specify pages to query for links to RPMs to be installed on guest. Works well with koji/brew links to package or build page as well as individually published list of pkgs, also tries to find "$arch/" link and search pkgs there.\n\nThe format is:\n$pkgFilter;$rpmFilter;$urlList\nkernel-[^"]*fc38;!debug|bpftool|kernel-tools|perf|kernel-selftests|kernel-doc;https://koji.fedoraproject.org/koji//packageinfo?packageID=8\nhttps://koji.fedoraproject.org/koji//buildinfo?buildID=2110910\n(\d+);;http://example.com/repos/test/MyRepo/?C=M\\;O=D'
            default: ""
        - bool:
            name: PBENCH_PUBLISH
            description: 'Push the pbench results to company pbench server'
            default: "{param-pbench-publish}"
        - bool:
            name: FIO_NBD_SETUP
            description: 'Compile and install fio with nbd ioengine enabled before test execution'
            default: "{param-fio-nbd-setup}"
        - bool:
            name: TWO_OUT_OF_THREE
            description: 'Use 2 out of 3 result evaluation (longer duration, better stability for jittery results)'
            default: true
        - string:
            name: UPSTREAM_QEMU_GOOD
            description: 'SHA of the last good (older) upstream qemu.'
            default: "{param-upstream-qemu-commit}"
        - string:
            name: UPSTREAM_QEMU_BAD
            description: 'SHA of the last bad (newer) upstream qemu.'
            default: "{param-upstream-qemu-commit}"
        - string:
            name: DESCRIPTION_PREFIX
            description: Description prefix (describe the difference from default)
            default: ""
    sandbox: true
    pipeline-scm:
        scm:
            - git:
                url: git://PATH_TO_YOUR_REPO_WITH_PIPELINES.git
                branches:
                    - main
        script-path: "upstream_bisect.groovy"
        lightweight-checkout: true


##############################################################################
# Definition for a multi-run-perf execution job
##############################################################################
- job-template:
    name: "{name}-multi"
    project-type: pipeline
    parameters:
        - string:
            name: JOB_NAME
            description: 'Name of the run-perf job to be used for triggering the tests.\nWarning: there might be concurrency issues in case one attempts to concurrently schedule jobs!'
            default: "{param-job}"
        - string:
            name: MACHINE
            description: 'Machine to be provisioned and tested'
            default: "{param-machine}"
        - string:
            name: ARCH
            description: 'Target machine architecture'
            default: "{param-arch}"
        - string:
            name: TESTS
            description: 'Space separated list of tests to be executed (WARNING: fio-nbd test requires the FIO_NBD_SETUP checkbox enabled!)'
            default: "{param-tests}"
        - string:
            name: PROFILES
            description: 'Space separated list of profiles to be applied'
            default: "{param-profiles}"
        - string:
            name: CMP_MODEL_JOB
            description: 'Job to copy linear "model.json" from'
            default: "{param-cmp-model-job}"
        - string:
            name: CMP_MODEL_BUILD
            description: 'Build to copy linear "model.json" from (-1 means lastSuccessful)'
            default: "{param-cmp-model-build}"
        - string:
            name: CMP_TOLERANCE
            description: Tolerance for mean values
            default: "{param-cmp-tolerance}"
        - string:
            name: CMP_STDDEV_TOLERANCE
            description: Tolerance for standard deviation values
            default: "{param-cmp-stddev-tolerance}"
        - bool:
            name: FIO_NBD_SETUP
            description: 'Compile and install fio with nbd ioengine enabled before test execution'
            default: "{param-fio-nbd-setup}"
        - string:
            name: DESCRIPTION_PREFIX
            description: Description prefix (describe the difference from default)
            default: ""
        - bool:
            name: PBENCH_PUBLISH
            description: 'Push the pbench results to company pbench server'
            default: "{param-pbench-publish}"
        - string:
            name: GITHUB_PUBLISHER_PROJECT
            description: 'Github publisher project ID (when you want to publish your results)'
            default: ""
        - text:
            name: HOST_SCRIPT
            description: 'Host script to be executed on all --servers'
            default: "{param-host-script}"
        - text:
            name: WORKER_SCRIPT
            description: 'Worker script to be executed on all runperf workers'
            default: "{param-worker-script}"

        - string:
            name: NO_ITERATIONS
            description: 'How many times to run each iteration'
            default: ''
        - string:
            name: DISTROS
            description: '`;` separated list of distributions to be installed/is installed (Fedora-31), when empty latest el8 nightly build is obtained from bkr, when `..` is used it uses bkr to fill all available versions in between the specified versions'
            default: "{param-distro}"
        - string:
            name: GUEST_DISTROS
            description: '`;` separated list of distribution to be installed on guest, when empty "distro" is used, when `..` is used it uses bkr to fill all available versions in between the specified versions'
            default: "{param-guest-distro}"
        - string:
            name: HOST_KERNEL_ARGSS
            description: '`;` separated list of Add custom kernel arguments on host'
            default: ""
        - text:
            name: HOST_RPM_FROM_URLSS
            description: 'Double enter (\\n\\n) separated list of Single enter (\\n) separated list of pages to query for links to RPMs to be installed on host. Works well with koji/brew links to package or build page as well as individually published list of pkgs, also tries to find "$arch/" link and search pkgs there.\n\nThe format is:\n$pkgFilter;$rpmFilter;$urlList\nkernel-[^"]*fc38;!debug|bpftool|kernel-tools|perf|kernel-selftests|kernel-doc;https://koji.fedoraproject.org/koji//packageinfo?packageID=8\nhttps://koji.fedoraproject.org/koji//buildinfo?buildID=2110910\n(\d+);;http://example.com/repos/test/MyRepo/?C=M\\;O=D'
            default: "{param-host-rpm-from-urls}"
        - string:
            name: GUEST_KERNEL_ARGSS
            description: '`;` separated list of custom kernel argsuments on workers/guests'
            default: ""
        - text:
            name: GUEST_RPM_FROM_URLSS
            description: 'Double enter (\\n\\n) separated list of Single enter (\\n) separated list of pages to query for links to RPMs to be installed on guest. Works well with koji/brew links to package or build page as well as individually published list of pkgs, also tries to find "$arch/" link and search pkgs there.\n\nThe format is:\n$pkgFilter;$rpmFilter;$urlList\nkernel-[^"]*fc38;!debug|bpftool|kernel-tools|perf|kernel-selftests|kernel-doc;https://koji.fedoraproject.org/koji//packageinfo?packageID=8\nhttps://koji.fedoraproject.org/koji//buildinfo?buildID=2110910\n(\d+);;http://example.com/repos/test/MyRepo/?C=M\\;O=D'
            default: ""
        - string:
            name: UPSTREAM_QEMU_COMMITS
            description: '`;` separated list of qemu commit/tags to be deployed from the upstream git. Use it by using $PROFILE:{{"qemu_bin": "/usr/local/bin/qemu-system-$ARCH"}} when specifying profiles.'
            default: "{param-upstream-qemu-commit}"
    sandbox: true
    pipeline-scm:
        scm:
            - git:
                url: git://PATH_TO_YOUR_REPO_WITH_PIPELINES.git
                branches:
                    - main
        script-path: "multi_runperf.groovy"
        lightweight-checkout: true


##############################################################################
# Definition of the analyze-perf job
##############################################################################
- job-template:
    name: "rp-analysis-{user}"
    project-type: pipeline
    concurrent: false
    description: |
        This job allows to cherry-pick results from runperf job and redo the analysis. It is
        not thread-safe, therefor it is advised to copy this job with user-suffix and run
        the analysis in series storing the graphs manually before submitting next comparison.
    parameters:
        - string:
            name: SRC_JOB
            default: "{param-src-job}"
            desciption: Source jenkins job
        - string:
            name: BUILDS
            default: ""
            description: "List of space separated build numbers to be analyzed, first build is used as source build (not included in graphs)"
        - string:
            name: DESCRIPTION
            default: ""
            description: Description of this analysis
        - string:
            name: CMP_MODEL_JOB
            description: 'Job to copy linear "model.json" from'
            default: "{param-cmp-model-job}"
        - string:
            name: CMP_MODEL_BUILD
            description: 'Build to copy linear "model.json" from (-1 means lastSuccessful)'
            default: "{param-cmp-model-build}"
        - string:
            name: CMP_TOLERANCE
            description: Tolerance for mean values
            default: "{param-cmp-tolerance}"
        - string:
            name: CMP_STDDEV_TOLERANCE
            description: Tolerance for standard deviation values
            default: "{param-cmp-stddev-tolerance}"
    sandbox: true
    pipeline-scm:
        scm:
            - git:
                url: git://PATH_TO_YOUR_REPO_WITH_PIPELINES.git
                branches:
                    - main
        script-path: "compareperf.groovy"
        lightweight-checkout: true


##############################################################################
# Definition of the analyze-perf job
##############################################################################
- job-template:
    name: "{name}-identify"
    project-type: pipeline
    description: |
        This job uses analyze-perf script to create model that can be used to better
        evaluate run-perf results.
    parameters:
        - string:
            name: SRC_JOB
            default: "{name}-run"
            desciption: Source jenkins job
        - string:
            name: BUILDS
            default: ""
            description: "List of space separated build numbers to be used"
        - string:
            name: DESCRIPTION
            default: ""
            description: Free-form description
        - string:
            name: EXTRA_ARGS
            default: ""
            description: Additional analyze-perf arguments, for example -t to override default tolerance
        - string:
            name: REBASE_MODEL_BUILD
            description: 'Build number of this job to be used as "--rebase-model" argument'
            default: ""
    sandbox: true
    pipeline-scm:
        scm:
            - git:
                url: git://PATH_TO_YOUR_REPO_WITH_PIPELINES.git
                branches:
                    - main
        script-path: "identify.groovy"
        lightweight-checkout: true


##############################################################################
# Definition of the prune artifacts job
##############################################################################
- job-template:
    name: "rp-prune-artifacts"
    node: master
    description: |
        Remove the big tar.xz files from oldish results not tagged
        as keep-forewer.
    triggers:
        - timed: "H 06 * * *"
    parameters:
        - string:
            name: JOB
            default: "{list,your,runperf,jobs,here,to,clean,them,daily}"
            description: Name of the job to be pruned
        - string:
            name: AGE
            default: "{param-age}"
            description: How old results should be pruned
    builders:
        - python:
            !include-raw-escape: ../scripts/prune_artifacts.py


##############################################################################
# Definition of the git-publisher job
##############################################################################
- job-template:
    name: "rp-publish-results-git"
    description: |
        Publish the build result in git so it can be viewed eg. in github
        pages
    project-type: pipeline
    parameters:
        - string:
            name: JOB
            default: ""
            description: "Job containing the result"
        - string:
            name: BUILD
            default: ""
            description: "Build of the job with the result"
        - bool:
            name: STATUS
            default: false
            description: "Status of the comparison (GOOD=true/BAD=false)"
        - string:
            name: NOTES
            default: ""
            description: "Notes to be added as description to the result entry"
        - string:
            name: PROJECT
            default: ""
            description: "Owner of the results (usually a group/company name + project/machine)"
        - string:
            name: TAG
            default: "all"
            description: "Version tag used to split results of different versions/tags"
        - bool:
            name: STRIP_RESULTS
            default: true
            description: "Publish stripped results (MB->KB)"
        - string:
            name: OS_VERSION
            default: ""
            description: "Override the os version"
        - string:
            name: QEMU_SHA
            defalut: ""
            description: "Override the qemu SHA"
    pipeline-scm:
        scm:
            - git:
                url: git://PATH_TO_YOUR_REPO_WITH_PIPELINES.git
                branches:
                    - main
        script-path: "publish-results-git.groovy"
        lightweight-checkout: true

###############################################################################
## Project to define jobs for automated regression jobs on example.org machine
###############################################################################
#- project:
#    name: rp-example
#    param-machine: "example.org"
#    param-arch: "x86_64"
#    param-src-build: 1
#    param-cmp-model-job: "{name}-identify"
#    param-cmp-model-build: -1
#    param-pbench-publish: true
#    jobs:
#        - "{name}-run"
#        - "{name}-identify"
#
#
###############################################################################
## Project to define manual jobs for example.org machine
###############################################################################
#- project:
#    name: rp-example-manual
#    param-machine: "example.org"
#    param-arch: "x86_64"
#    param-distro: "YOUR STABLE RELEASE"
#    param-src-build: 1
#    param-cmp-model-job: "rp-example-manual-identify"
#    param-cmp-model-build: 1
#    param-pbench-publish: false
#    trigger-on: ""
#    jobs:
#        - "{name}-run"
#        - "{name}-identify"
#        - "{name}-multi":
#            param-cmp-model-job: ''
#            param-cmp-model-build: ''
#
#
###############################################################################
## Project to allow users to run custom queries out of existing results
###############################################################################
#- project:
#    name: rp-analysis
#    user:
#        - virt
#    param-src-job: "rp-example-manual"
#    param-cmp-model-job: "rp-example-manual-identify"
#    param-cmp-model-build: 1
#    jobs:
#        - "rp-analysis-{user}"
#
###############################################################################
## Prune artifacts after 14 days, hopefully we would notice and mark/move
## them when full details are needed.
###############################################################################
#- project:
#    name: rp-prune-artifacts
#    param-age: 14
#    jobs:
#        - "rp-prune-artifacts"