项目作者: openshift-scale

项目描述 :
Tool an OpenShift cluster and Run OpenShift Performance and Scale Workloads
高级语言: HTML
项目地址: git://github.com/openshift-scale/workloads.git
创建时间: 2019-05-22T17:43:50Z
项目社区:https://github.com/openshift-scale/workloads

开源协议:Apache License 2.0

下载


workloads

Tool an OpenShift cluster and run OpenShift Performance and Scale Workloads.

NOTE: The pbench integration in this repository is not being actively maintained/supported but can be used as is if it serves the need and works without any issues. All the workloads in the repository are being actively maintained/supported. It’s recommended to use metrics captured by Prometheus to analyze the results.

Documentation, Usage and Examples

See docs directory

Usage

  1. Git clone the repo
  2. Configure inventory file
  3. Configure workload variables
  4. Run the workload playbook(s)
  1. $ git clone https://github.com/openshift-scale/workloads.git
  2. $ cd workloads
  3. $ cp workloads/inventory.example inventory
  4. $ # Edit inventory and add your expected orchestration host
  5. $ # Edit workload variables Ex vi workloads/vars/tooling.yml or define env variables
  6. $ ansible-playbook -v -i inventory workloads/$workload.yml # Where $workload is the intended workload (Ex tooling.yml)

You can configure workload variables either by editing each workload’s specific vars file found in workloads/vars/$workload.yml where $workload is intended workload or define the associated environment variables for each workload. Each variable is documented in the docs directory of this repo

Usage in Continuous Integration (CI)

For Jenkins setups, each workload has a Jenkins job implemented in scale-ci-pipeline

To implement in your own CI, use an SCM plugin/module to clone the code into a build step. Each workload variable in the docs should be implemented as a parameter for each job. The build step can utilize additional variables in order to perform additional work such as login via a username and password. An example build step for NodeVertical implemented in Jenkins would look like:

  1. set -o pipefail
  2. set -eux
  3. # Disable logging
  4. set +x
  5. oc login -u ${CLUSTER_USER} -p ${CLUSTER_PASSWORD} ${CLUSTER_API_URL}
  6. # Re-enable logging
  7. set -x
  8. echo "[orchestration]" > inventory
  9. echo "${ORCHESTRATION_HOST}" >> inventory
  10. time ansible-playbook -vv -i inventory workloads/nodevertical.yml
  11. oc logs --timestamps -n scale-ci-tooling -f job/scale-ci-nodevertical
  12. oc get job -n scale-ci-tooling scale-ci-nodevertical -o json | jq -e '.status.succeeded==1'

For Pass/Fail functionality, jobs will not have a succeeded status and thus have failed in CI due to the last statement in the above build job.