$ yum install atomic-openshift-tests
Cluster Loader is a tool that deploys large numbers of various objects to a cluster, which creates user-defined cluster objects. Build, configure, and run Cluster Loader to measure performance metrics of your OKD deployment at various cluster states.
Cluster Loader is included in the atomic-openshift-tests package. To install it, run:
$ yum install atomic-openshift-tests
After installation, the test executable extended.test is located in /usr/libexec/atomic-openshift/extended.test.
Set the KUBECONFIG
variable to the location of the administrator kubeconfig
:
$ export KUBECONFIG=${KUBECONFIG-$HOME/.kube/config}
Execute Cluster Loader using the built-in test configuration, which deploys five template builds and waits for them to complete:
$ cd /usr/libexec/atomic-openshift/
$ ./extended.test --ginkgo.focus="Load cluster"
Alternatively, execute Cluster Loader with a user-defined configuration by
adding the flag for --viper-config
:
$ ./extended.test --ginkgo.focus="Load cluster" --viper-config=config/test (1)
1 | In this example, there is a subdirectory called config/ with a configuration file called test.yml. In the command line, exclude the extension of the configuration file, as the tool will automatically determine the file type and extension. |
Create multiple namespaces (projects), which contain multiple templates or pods.
Locate the configuration files for Cluster Loader in the config/ subdirectory. The pod files and template files referenced in these configuration examples are found in the content/ subdirectory.
Field | Description |
---|---|
|
Set to |
|
A sub-object with one or many definition(s). Under |
|
A sub-object with one definition per configuration. |
|
An optional sub-object with one definition per configuration. Adds synchronization possibilities during object creation. |
Field | Description |
---|---|
|
An integer. One definition of the count of how many projects to create. |
|
A string. One definition of the base name for the project. The count of
identical namespaces will be appended to |
|
A string. One definition of what tuning set you want to apply to the objects, which you deploy inside this namespace. |
|
A string containing either |
|
A list of key-value pairs. The key is the configmap name and the value is a path to a file from which you create the configmap. |
|
A list of key-value pairs. The key is the secret name and the value is a path to a file from which you create the secret. |
|
A sub-object with one or many definition(s) of pods to deploy. |
|
A sub-object with one or many definition(s) of templates to deploy. |
Field | Description |
---|---|
|
This field is not used. |
|
An integer. The number of pods or templates to deploy. |
|
A string. The container image URL to a repository where it can be pulled. |
|
A string. One definition of the base name for the template (or pod) that you want to create. |
|
A string. The path to a local file, which is either a PodSpec or template to be created. |
|
Key-value pairs. Under |
Field | Description |
---|---|
|
A string. The name of the tuning set which will match the name specified when defining a tuning in a project. |
|
A sub-object identifying the |
|
A sub-object identifying the |
Field | Description |
---|---|
|
A sub-object. A stepping configuration used if you want to create an object in a step creation pattern. |
|
A sub-object. A rate-limiting tuning set configuration to limit the object creation rate. |
Field | Description |
---|---|
|
An integer. How many objects to create before pausing object creation. |
|
An integer. How many seconds to pause after creating the number of objects
defined in |
|
An integer. How many seconds to wait before failure if the object creation is not successful. |
|
An integer. How many milliseconds (ms) to wait between creation requests. |
Field | Description |
---|---|
|
A sub-object with |
|
A boolean. Wait for pods with labels matching |
|
A boolean. Wait for pods with labels matching |
|
A list of selectors to match pods in |
|
A string. The synchronization timeout period to wait for pods in |
Cluster Loader’s configuration file is a basic YAML file:
provider: local (1)
ClusterLoader:
cleanup: true
projects:
- num: 1
basename: clusterloader-cakephp-mysql
tuning: default
ifexists: reuse
templates:
- num: 1
file: ./examples/quickstarts/cakephp-mysql.json
- num: 1
basename: clusterloader-dancer-mysql
tuning: default
ifexists: reuse
templates:
- num: 1
file: ./examples/quickstarts/dancer-mysql.json
- num: 1
basename: clusterloader-django-postgresql
tuning: default
ifexists: reuse
templates:
- num: 1
file: ./examples/quickstarts/django-postgresql.json
- num: 1
basename: clusterloader-nodejs-mongodb
tuning: default
ifexists: reuse
templates:
- num: 1
file: ./examples/quickstarts/nodejs-mongodb.json
- num: 1
basename: clusterloader-rails-postgresql
tuning: default
templates:
- num: 1
file: ./examples/quickstarts/rails-postgresql.json
tuningsets: (2)
- name: default
pods:
stepping: (3)
stepsize: 5
pause: 0 s
rate_limit: (4)
delay: 0 ms
1 | Optional setting for end-to-end tests. Set to local to avoid extra log messages. |
2 | The tuning sets allow rate limiting and stepping, the ability to create several batches of pods while pausing in between sets. Cluster Loader monitors completion of the previous step before continuing. |
3 | Stepping will pause for M seconds after each N objects are created. |
4 | Rate limiting will wait M milliseconds between the creation of objects. |
If the IDENTIFIER
parameter is not defined in user templates, template
creation fails with error: unknown parameter name "IDENTIFIER"
. If you deploy
templates, add this parameter to your template to avoid this error:
{ "name": "IDENTIFIER", "description": "Number to append to the name of resources", "value": "1" }
If you deploy pods, adding the parameter is unnecessary.