Skip to content

Commit eb6b92e

Browse files
authored
Merge pull request #12807 from ahardin-rh/cluster-loader-v4
Added Cluster Loader content to 4.0
2 parents 610f780 + 4ab745a commit eb6b92e

File tree

5 files changed

+332
-10
lines changed

5 files changed

+332
-10
lines changed

_topic_map.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,33 +52,33 @@ Dir: authentication
5252
Distros: openshift-*
5353
Topics:
5454
- Name: Understanding authentication
55-
File: understanding-authentication
55+
File: understanding-authentication
5656
- Name: Configuring the internal OAuth server
57-
File: configuring-internal-oauth
57+
File: configuring-internal-oauth
5858
- Name: Using RBAC to define and apply permissions
59-
File: using-rbac
60-
- Name: Configuring LDAP failover
59+
File: using-rbac
60+
- Name: Configuring LDAP failover
6161
File: configuring-ldap-failover
6262
- Name: Configuring the user agent
6363
File: configuring-user-agent
6464
- Name: Understanding and creating service accounts
6565
File: understanding-and-creating-service-accounts
6666
- Name: Using service accounts in applications
67-
File: using-service-accounts-in-applications
67+
File: using-service-accounts-in-applications
6868
- Name: Using a service account as an OAuth client
69-
File: using-service-accounts-as-oauth-client
69+
File: using-service-accounts-as-oauth-client
7070
---
7171
Name: Users and roles
7272
Dir: users_and_roles
7373
Distros: openshift-*
7474
Topics:
7575
- Name: Impersonating the system:admin user
7676
File: impersonating-system-admin
77-
Distros: openshift-enterprise,openshift-origin
77+
Distros: openshift-enterprise,openshift-origin
7878
- Name: Creating a project as another user
7979
File: creating-project-other-user
80-
Distros: openshift-enterprise,openshift-origin
81-
---
80+
Distros: openshift-enterprise,openshift-origin
81+
---
8282
Name: Installing clusters
8383
Dir: installation
8484
Distros: openshift-origin, openshift-enterprise
@@ -89,7 +89,7 @@ Topics:
8989
File: installing-customizations-cloud
9090
- Name: Installing a cluster on existing hosts
9191
File: installing-existing-hosts
92-
- Name: Uninstalling a cluster from existing hosts
92+
- Name: Uninstalling a cluster from existing hosts
9393
File: uninstalling-existing-hosts
9494
---
9595
Name: Networking
@@ -105,6 +105,8 @@ Distros: openshift-origin, openshift-enterprise
105105
Topics:
106106
- Name: Using the node tuning Operator
107107
File: using-node-tuning-operator
108+
- Name: Using Cluster Loader
109+
File: using-cluster-loader
108110
- Name: Scaling the cluster monitoring Operator
109111
File: scaling-cluster-monitoring-operator
110112
- Name: Planning your environment according to object limits
Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
// Module included in the following assemblies:
2+
//
3+
// scalability_and_performance/using-cluster-loader.adoc
4+
5+
[id='configuring_cluster_loader_{context}']
6+
= Configuring Cluster Loader
7+
8+
The tool creates multiple namespaces (projects), which contain multiple templates or pods.
9+
10+
Locate the configuration files for Cluster Loader in the `config/` subdirectory.
11+
The pod files and template files referenced in these configuration examples are
12+
found in the `content/` subdirectory.
13+
14+
== Example Cluster Loader configuration file
15+
16+
Cluster Loader’s configuration file is a basic YAML file:
17+
18+
----
19+
provider: local <1>
20+
ClusterLoader:
21+
cleanup: true
22+
projects:
23+
- num: 1
24+
basename: clusterloader-cakephp-mysql
25+
tuning: default
26+
ifexists: reuse
27+
templates:
28+
- num: 1
29+
file: ./examples/quickstarts/cakephp-mysql.json
30+
31+
- num: 1
32+
basename: clusterloader-dancer-mysql
33+
tuning: default
34+
ifexists: reuse
35+
templates:
36+
- num: 1
37+
file: ./examples/quickstarts/dancer-mysql.json
38+
39+
- num: 1
40+
basename: clusterloader-django-postgresql
41+
tuning: default
42+
ifexists: reuse
43+
templates:
44+
- num: 1
45+
file: ./examples/quickstarts/django-postgresql.json
46+
47+
- num: 1
48+
basename: clusterloader-nodejs-mongodb
49+
tuning: default
50+
ifexists: reuse
51+
templates:
52+
- num: 1
53+
file: ./examples/quickstarts/nodejs-mongodb.json
54+
55+
- num: 1
56+
basename: clusterloader-rails-postgresql
57+
tuning: default
58+
templates:
59+
- num: 1
60+
file: ./examples/quickstarts/rails-postgresql.json
61+
62+
tuningset: <2>
63+
- name: default
64+
pods:
65+
stepping: <3>
66+
stepsize: 5
67+
pause: 0 s
68+
rate_limit: <4>
69+
delay: 0 ms
70+
----
71+
<1> Optional setting for end-to-end tests. Set to `local` to avoid extra log messages.
72+
<2> The tuning sets allow rate limiting and stepping, the ability to create several
73+
batches of pods while pausing in between sets. Cluster Loader monitors
74+
completion of the previous step before continuing.
75+
<3> Stepping will pause for `M` seconds after each `N` objects are created.
76+
<4> Rate limiting will wait `M` milliseconds between the creation of objects.
77+
78+
== Configuration fields
79+
80+
.Top-level Cluster Loader Fields
81+
|===
82+
|Field |Description
83+
84+
|`cleanup`
85+
|Set to `true` or `false`. One definition per configuration. If set to `true`,
86+
`cleanup` deletes all namespaces (projects) created by Cluster Loader at the
87+
end of the test.
88+
89+
|`projects`
90+
|A sub-object with one or many definition(s). Under `projects`, each
91+
namespace to create is defined and `projects` has several mandatory subheadings.
92+
93+
|`tuningset`
94+
|A sub-object with one definition per configuration. `tuningset` allows the user
95+
to define a tuning set to add configurable timing to project or object creation
96+
(pods, templates, and so on).
97+
98+
|`sync`
99+
|An optional sub-object with one definition per configuration. Adds synchronization
100+
possibilities during object creation.
101+
|===
102+
103+
.Fields under `projects`
104+
|===
105+
|Field |Description
106+
107+
|`num`
108+
|An integer. One definition of the count of how many projects to create.
109+
110+
|`basename`
111+
|A string. One definition of the base name for the project. The count of
112+
identical namespaces will be appended to `Basename` to prevent collisions.
113+
114+
|`tuning`
115+
|A string. One definition of what tuning set you want to apply to the objects,
116+
which you deploy inside this namespace.
117+
118+
|`ifexists`
119+
|A string containing either `reuse` or `delete`. Defines what the tool does if
120+
it finds a project or namespace that has the same name of the project or
121+
namespace it creates during execution.
122+
123+
|`configmaps`
124+
|A list of key-value pairs. The key is the ConfigMap name and the value is a
125+
path to a file from which you create the ConfigMap.
126+
127+
|`secrets`
128+
|A list of key-value pairs. The key is the secret name and the value is a path to
129+
a file from which you create the secret.
130+
131+
|`pods`
132+
|A sub-object with one or many definition(s) of pods to deploy.
133+
134+
|`templates`
135+
|A sub-object with one or many definition(s) of templates to deploy.
136+
|===
137+
138+
.Fields under `pods` and `templates`
139+
|===
140+
|Field |Description
141+
142+
|`num`
143+
|An integer. The number of pods or templates to deploy.
144+
145+
|`image`
146+
|A string. The docker image URL to a repository where it can be pulled.
147+
148+
|`basename`
149+
| A string. One definition of the base name for the template (or pod) that you want to create.
150+
151+
|`file`
152+
|A string. The path to a local file, which is either a PodSpec or template to be created.
153+
154+
|`parameters`
155+
|Key-value pairs. Under `parameters`, you can specify a list of values to
156+
override in the pod or template.
157+
|===
158+
159+
.Fields under `tuningset`
160+
|===
161+
|Field |Description
162+
163+
|`name`
164+
|A string. The name of the tuning set which will match the name specified when
165+
defining a tuning in a project.
166+
167+
|`pods`
168+
|A sub-object identifying the `tuningset` that will apply to pods.
169+
170+
|`templates`
171+
|A sub-object identifying the `tuningset` that will apply to templates.
172+
|===
173+
174+
.Fields under `tuningset` `pods` or `tuningset` `templates`
175+
|===
176+
|Field |Description
177+
178+
|`stepping`
179+
|A sub-object. A stepping configuration used if you want to create an object in a
180+
step creation pattern.
181+
182+
|`rate_limit`
183+
|A sub-object. A rate-limiting tuning set configuration to limit the object
184+
creation rate.
185+
|===
186+
187+
.Fields under `tuningset` `pods` or `tuningset` `templates`, `stepping`
188+
|===
189+
|Field |Description
190+
191+
|`stepsize`
192+
|An integer. How many objects to create before pausing object creation.
193+
194+
|`pause`
195+
|An integer. How many seconds to pause after creating the number of objects
196+
defined in `stepsize`.
197+
198+
|`timeout`
199+
|An integer. How many seconds to wait before failure if the object creation is
200+
not successful.
201+
202+
|`delay`
203+
|An integer. How many milliseconds (ms) to wait between creation requests.
204+
|===
205+
206+
.Fields under `sync`
207+
|===
208+
|Field |Description
209+
210+
|`server`
211+
|A sub-object with `enabled` and `port` fields. The boolean `enabled` defines
212+
whether to start a HTTP server for pod synchronization. The integer `port`
213+
defines the HTTP server port to listen on (`9090` by default).
214+
215+
|`running`
216+
|A boolean. Wait for pods with labels matching `selectors` to go into `Running`
217+
state.
218+
219+
|`succeeded`
220+
|A boolean. Wait for pods with labels matching `selectors` to go into `Completed`
221+
state.
222+
223+
|`selectors`
224+
|A list of selectors to match pods in `Running` or `Completed` states.
225+
226+
|`timeout`
227+
|A string. The synchronization timeout period to wait for pods in `Running` or
228+
`Completed` states. For values that are not `0`, use units:
229+
[ns\|us\|ms\|s\|m\|h].
230+
|===
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Module included in the following assemblies:
2+
//
3+
// scalability_and_performance/using-cluster-loader.adoc
4+
5+
[id='installing_cluster_loader_{context}']
6+
= Installing Cluster Loader
7+
Cluster Loader is included in the `atomic-openshift-tests` package.
8+
9+
.Procedure
10+
11+
. Edit the `/etc/yum.conf` file, removing `atomic-openshift-tests` from the
12+
`exclude=` line.
13+
14+
. Install the package:
15+
+
16+
----
17+
$ yum install atomic-openshift-tests
18+
----
19+
+
20+
After installation, the test executable `extended.test` is located in
21+
`/usr/libexec/atomic-openshift/extended.test`.

modules/running-cluster-loader.adoc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Module included in the following assemblies:
2+
//
3+
// scalability_and_performance/using-cluster-loader.adoc
4+
5+
[id='running_cluster_loader_{context}']
6+
= Running Cluster Loader
7+
8+
.Procedure
9+
10+
. Set the `KUBECONFIG` variable to the location of the administrator `kubeconfig`:
11+
+
12+
----
13+
$ export KUBECONFIG=${KUBECONFIG-$HOME/.kube/config}
14+
----
15+
16+
. Execute Cluster Loader using the built-in test configuration, which deploys five
17+
template builds and waits for them to complete:
18+
+
19+
----
20+
$ cd /usr/libexec/atomic-openshift/
21+
$ ./extended.test --ginkgo.focus="Load cluster"
22+
----
23+
+
24+
Alternatively, execute Cluster Loader with a user-defined configuration by
25+
adding the flag for `--viper-config`:
26+
+
27+
----
28+
$ ./extended.test --ginkgo.focus="Load cluster" --viper-config=config/test <1>
29+
----
30+
<1> In this example, there is a subdirectory called *_config/_* with a configuration
31+
file called *_test.yml_*. In the command line, exclude the extension of the
32+
configuration file, as the tool will automatically determine the file type and
33+
extension.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[id='using_cluster_loader{context}']
2+
= Using cluster loader
3+
include::modules/common-attributes.adoc[]
4+
:context:
5+
6+
toc::[]
7+
8+
9+
10+
Cluster Loader is a tool that deploys large numbers of various objects to a
11+
cluster, which creates user-defined cluster objects. Build, configure, and run
12+
Cluster Loader to measure performance metrics of your {product-title} deployment
13+
at various cluster states.
14+
15+
include::modules/installing-cluster-loader.adoc[leveloffset=+1]
16+
17+
include::modules/running-cluster-loader.adoc[leveloffset=+1]
18+
19+
include::modules/configuring-cluster-loader.adoc[leveloffset=+1]
20+
21+
22+
== Known issues
23+
24+
If the `IDENTIFIER` parameter is not defined in user templates, template
25+
creation fails with `error: unknown parameter name "IDENTIFIER"`. If you deploy
26+
templates, add this parameter to your template to avoid this error:
27+
28+
----
29+
{
30+
"name": "IDENTIFIER",
31+
"description": "Number to append to the name of resources",
32+
"value": "1"
33+
}
34+
----
35+
36+
If you deploy pods, adding the parameter is unnecessary.

0 commit comments

Comments
 (0)