-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamically add more workers for tests. Also increased the amount of workers Prometheus scans for to 40.
- Loading branch information
Showing
3 changed files
with
226 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
# This is a Jinja template file with dynamic worker count. | ||
# You can generate a valid YAML config with this for example with j2cli https://github.com/kolypto/j2cli | ||
# NUMWORKERS=3 j2 k8s/gosbench_template.yaml.j2 > /tmp/gosbench.yaml | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
data: | ||
config.yml: |- | ||
s3_config: | ||
- access_key: 8MKI7yLHF2L5Z07rabTZ | ||
secret_key: Y7quDBT3az/emhiDOiQR18hZLKzFaKUjOU4YyPCP | ||
region: eu-central-1 | ||
endpoint: https://172.30.196.58:443 | ||
skipSSLverify: true | ||
|
||
# For generating annotations when we start/stop testcases | ||
# https://grafana.com/docs/http_api/annotations/#create-annotation | ||
grafana_config: | ||
endpoint: http://grafana | ||
username: admin | ||
password: grafana | ||
|
||
tests: | ||
- name: EverythingWorks | ||
read_weight: 20 | ||
write_weight: 80 | ||
delete_weight: 0 | ||
list_weight: 0 | ||
objects: | ||
size_min: 5 | ||
size_max: 100 | ||
part_size: 0 | ||
# distribution: constant, random, sequential | ||
size_distribution: random | ||
unit: KB | ||
number_min: 100 | ||
number_max: 100 | ||
# distribution: constant, random, sequential | ||
number_distribution: constant | ||
buckets: | ||
number_min: 1 | ||
number_max: 10 | ||
# distribution: constant, random, sequential | ||
number_distribution: constant | ||
# Name prefix for buckets and objects | ||
bucket_prefix: gosbench1- | ||
object_prefix: obj | ||
# End after a set amount of time | ||
# Runtime in time.Duration - do not forget the unit please | ||
# stop_with_runtime: 60s # Example with 60 seconds runtime | ||
stop_with_runtime: | ||
# End after a set amount of operations (per worker) | ||
stop_with_ops: 3000 | ||
# Number of s3 performance test servers to run in parallel | ||
workers: {{ NUMWORKERS }} | ||
# Set wheter workers share the same buckets or not | ||
# If set to True - bucket names will have the worker # appended | ||
workers_share_buckets: True | ||
# Number of requests processed in parallel by each worker | ||
parallel_clients: 3 | ||
# Remove all generated buckets and its content after run | ||
clean_after: True | ||
- name: EverythingWorksAgain | ||
read_weight: 20 | ||
write_weight: 80 | ||
delete_weight: 0 | ||
list_weight: 0 | ||
objects: | ||
size_min: 5 | ||
size_max: 100 | ||
part_size: 0 | ||
# distribution: constant, random, sequential | ||
size_distribution: random | ||
unit: KB | ||
number_min: 100 | ||
number_max: 100 | ||
# distribution: constant, random, sequential | ||
number_distribution: constant | ||
buckets: | ||
number_min: 1 | ||
number_max: 10 | ||
# distribution: constant, random, sequential | ||
number_distribution: constant | ||
# Name prefix for buckets and objects | ||
bucket_prefix: gosbench1- | ||
object_prefix: obj | ||
# End after a set amount of time | ||
# Runtime in time.Duration - do not forget the unit please | ||
# stop_with_runtime: 60s # Example with 60 seconds runtime | ||
stop_with_runtime: | ||
# End after a set amount of operations (per worker) | ||
stop_with_ops: 3000 | ||
# Number of s3 performance test servers to run in parallel | ||
workers: {{ NUMWORKERS }} | ||
# Set wheter workers share the same buckets or not | ||
# If set to True - bucket names will have the worker # appended | ||
workers_share_buckets: True | ||
# Number of requests processed in parallel by each worker | ||
parallel_clients: 3 | ||
# Remove all generated buckets and its content after run | ||
clean_after: True | ||
metadata: | ||
name: gosbench-config | ||
labels: | ||
app: gosbench-monitoring | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: gosbench-server | ||
labels: | ||
app: gosbench | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: gosbench | ||
template: | ||
metadata: | ||
labels: | ||
app: gosbench | ||
spec: | ||
containers: | ||
- name: server | ||
image: quay.io/mulbc/gosbench-server | ||
imagePullPolicy: Always | ||
command: ['./main', '-c', '/app/config/config.yml'] | ||
ports: | ||
- containerPort: 2000 | ||
volumeMounts: | ||
- name: gosbench-config | ||
mountPath: /app/config | ||
volumes: | ||
- name: gosbench-config | ||
configMap: | ||
name: gosbench-config | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: gosbench-server | ||
labels: | ||
app: gosbench | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 2000 | ||
targetPort: 2000 | ||
selector: | ||
app: gosbench | ||
{% for worker in range(NUMWORKERS | int) %} | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: gosbench-worker{{ worker+1 }} | ||
labels: | ||
app: gosbench-worker{{ worker+1 }} | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: gosbench | ||
spec: | ||
containers: | ||
- name: gosbench-worker | ||
image: quay.io/mulbc/gosbench-worker | ||
imagePullPolicy: Always | ||
command: ['./main', '-d', '-s', 'gosbench-server:2000'] | ||
ports: | ||
- containerPort: 8888 | ||
restartPolicy: Never | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: gosbench-worker{{ worker+1 }} | ||
labels: | ||
app: gosbench-worker{{ worker+1 }} | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 8888 | ||
targetPort: 8888 | ||
selector: | ||
job-name: gosbench-worker{{ worker+1 }} | ||
{% endfor %} | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters