|
| 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 | +|=== |
0 commit comments