Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions helm/adelphi/templates/nosqlbench-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ spec:
"/workspace/nosqlbench_source.yaml",
"source",
"scenarioname=source",
"rampup-cycles={{ .Values.nosqlbench_cycles }}",
"main-cycles={{ .Values.nosqlbench_cycles }}",
"hosts={{ .Values.source.clusterName }}-{{ .Values.source.dc }}-service",
"username={{ .Values.source.clusterName }}-superuser",
"passfile=/secret/password"
Expand All @@ -39,7 +41,7 @@ spec:
command: ["sh", "-c", "-e"]
args:
- pip install adelphi;
adelphi --hosts="{{ .Values.source.clusterName }}-{{ .Values.source.dc }}-service" --username="{{ .Values.source.clusterName }}-superuser" --password="`cat /secret/password`" --keyspaces="{{ .Values.gemini_schema_keyspace }}" --no-anonymize export-nb --rampup-cycles="{{ .Values.nosqlbench_cycles }}" --main-cycles="{{ .Values.nosqlbench_cycles }}" > /workspace/nosqlbench_source.yaml;
adelphi --hosts="{{ .Values.source.clusterName }}-{{ .Values.source.dc }}-service" --username="{{ .Values.source.clusterName }}-superuser" --password="`cat /secret/password`" --keyspaces="{{ .Values.gemini_schema_keyspace }}" --no-anonymize export-nb > /workspace/nosqlbench_source.yaml;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I get the change here, but I think I probably need to understand a bit more about what the python tooling spits out for the template.

Maybe and first question... why were these two parameters provided for within the python tooling to begin with? And why is not having them there the "right" way to do this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal here is to separate execution parameters from the template generation parameters.
The number of cycles is something that matters only at runtime, so once you have the workload YAML generated, you can tweak the number of cycles as you wish without generating the YAML all over again (which requires a connection to the cluster).

Another benefit is keeping the adelphi cli slim and relying on the existing variable replacement feature in NoSQLBench instead.

cat /workspace/nosqlbench_source.yaml;
volumeMounts:
- name: workspace
Expand Down Expand Up @@ -69,6 +71,8 @@ spec:
"/workspace/nosqlbench_target.yaml",
"target",
"scenarioname=target",
"rampup-cycles={{ .Values.nosqlbench_cycles }}",
"main-cycles={{ .Values.nosqlbench_cycles }}",
"hosts={{ .Values.target.clusterName }}-{{ .Values.target.dc }}-service",
"username={{ .Values.target.clusterName }}-superuser",
"passfile=/secret/password",
Expand All @@ -92,7 +96,7 @@ spec:
command: ["sh", "-c", "-e"]
args:
- pip install adelphi;
adelphi --hosts="{{ .Values.target.clusterName }}-{{ .Values.target.dc }}-service" --username="{{ .Values.target.clusterName }}-superuser" --password="`cat /secret/password`" --keyspaces="{{ .Values.gemini_schema_keyspace }}" --no-anonymize export-nb --rampup-cycles="{{ .Values.nosqlbench_cycles }}" --main-cycles="{{ .Values.nosqlbench_cycles }}" > /workspace/nosqlbench_target.yaml;
adelphi --hosts="{{ .Values.target.clusterName }}-{{ .Values.target.dc }}-service" --username="{{ .Values.target.clusterName }}-superuser" --password="`cat /secret/password`" --keyspaces="{{ .Values.gemini_schema_keyspace }}" --no-anonymize export-nb > /workspace/nosqlbench_target.yaml;
cat /workspace/nosqlbench_target.yaml;
volumeMounts:
- name: workspace
Expand Down
4 changes: 2 additions & 2 deletions python/adelphi/adelphi/nb.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from adelphi.export import BaseExporter

MAX_NUMERIC_VAL = 1000 ** 3
RAMPUP_SCENARIO = "run driver=cql tags=phase:rampup cycles={} threads=auto"
MAIN_SCENARIO = "run driver=cql tags=phase:main cycles={} threads=auto"
RAMPUP_SCENARIO = "run driver=cql tags=phase:rampup cycles=TEMPLATE(rampup-cycles,{}) threads=auto"
MAIN_SCENARIO = "run driver=cql tags=phase:main cycles=TEMPLATE(main-cycles,{}) threads=auto"

CQL_TYPES={}
CQL_TYPES["text"] = "Mod({}); ToString() -> String"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ blocks:
type: write
scenarios:
TEMPLATE(scenarioname,default):
- run driver=cql tags=phase:rampup cycles=1000 threads=auto
- run driver=cql tags=phase:main cycles=1000 threads=auto
- run driver=cql tags=phase:rampup cycles=TEMPLATE(rampup-cycles,1000) threads=auto
- run driver=cql tags=phase:main cycles=TEMPLATE(main-cycles,1000) threads=auto
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ blocks:
type: write
scenarios:
TEMPLATE(scenarioname,default):
- run driver=cql tags=phase:rampup cycles=1000 threads=auto
- run driver=cql tags=phase:main cycles=1000 threads=auto
- run driver=cql tags=phase:rampup cycles=TEMPLATE(rampup-cycles,1000) threads=auto
- run driver=cql tags=phase:main cycles=TEMPLATE(main-cycles,1000) threads=auto
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ blocks:
type: write
scenarios:
TEMPLATE(scenarioname,default):
- run driver=cql tags=phase:rampup cycles=1000 threads=auto
- run driver=cql tags=phase:main cycles=1000 threads=auto
- run driver=cql tags=phase:rampup cycles=TEMPLATE(rampup-cycles,1000) threads=auto
- run driver=cql tags=phase:main cycles=TEMPLATE(main-cycles,1000) threads=auto
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ blocks:
type: write
scenarios:
TEMPLATE(scenarioname,default):
- run driver=cql tags=phase:rampup cycles=1000 threads=auto
- run driver=cql tags=phase:main cycles=1000 threads=auto
- run driver=cql tags=phase:rampup cycles=TEMPLATE(rampup-cycles,1000) threads=auto
- run driver=cql tags=phase:main cycles=TEMPLATE(main-cycles,1000) threads=auto
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ blocks:
type: write
scenarios:
TEMPLATE(scenarioname,default):
- run driver=cql tags=phase:rampup cycles=1000 threads=auto
- run driver=cql tags=phase:main cycles=1000 threads=auto
- run driver=cql tags=phase:rampup cycles=TEMPLATE(rampup-cycles,1000) threads=auto
- run driver=cql tags=phase:main cycles=TEMPLATE(main-cycles,1000) threads=auto