From bc3d859eb7863e1bed4e4a4f3ef971a2ef5d0d0d Mon Sep 17 00:00:00 2001 From: Fotis Nikolaidis Date: Sun, 25 Jun 2023 04:40:08 +0300 Subject: [PATCH] Bump version --- CHANGELOG.md | 2 + VERSION | 2 +- .../system/templates/chaos/network-delay.yml | 2 +- .../templates/chaos/network-duplicate.yml | 2 +- .../system/templates/chaos/network-loss.yml | 2 +- .../templates/chaos/network-partition.yml | 2 +- charts/system/templates/chaos/pod-kill.yml | 2 +- .../templates/telemetry/cadvisor/cadvisor.yml | 4 +- .../telemetry/dataviewer/dataviewer.yml | 2 +- .../templates/telemetry/grafana/grafana.yml | 2 +- .../telemetry/prometheus/prometheus.yml | 2 +- .../commands/tests/validate.go | 20 +-- .../examples/5.scaleup-scheduled.yml | 6 +- .../examples/6.scaleup-conditional.yml | 6 +- .../examples/7.scaledown-delete.yml | 8 +- .../cockroachdb/examples/8.scaledown-stop.yml | 6 +- .../cockroachdb/examples/9.scaledown-kill.yml | 8 +- .../apps/cockroachdb/templates/server.yml | 6 +- .../apps/cockroachdb/templates/telemetry.yml | 4 +- .../apps/debugger}/tools/debugger.yml | 0 .../apps/debugger}/tools/docker.yml | 0 .../apps/fedbed/examples/all_combined.yml | 6 +- .../apps/fedbed/examples/cached-dataset.yml | 4 +- .../fedbed/examples/resource-distribution.yml | 4 +- .../templates/client-with-annotations.yaml | 4 +- .../templates/client-with-shared-dataset.yaml | 4 +- examples/apps/fedbed/templates/client.yaml | 4 +- examples/apps/fedbed/templates/server.yaml | 4 +- examples/apps/fio/examples/0.no-storage.yml | 2 +- .../apps/fio/examples/1.ephemeral-volume.yml | 2 +- .../apps/fio/examples/2.formatted-device.yml | 2 +- examples/apps/fio/examples/3.raw-device.yml | 2 +- examples/apps/fio/examples/4.shared-fs.yml | 2 +- examples/apps/fio/templates/0.default.yml | 4 +- .../apps/fio/templates/0.ephemeral-volume.yml | 4 +- .../fio/templates/2.blockdevice-formatted.yml | 6 +- .../apps/fio/templates/3.blockdevice-raw.yml | 6 +- examples/apps/fio/templates/4.shared-fs.yml | 4 +- examples/apps/fio/templates/telemetry.yml | 4 +- .../examples/13.scaled-with-logs.yml | 2 +- .../examples/4a.partition-server-init.yml | 2 +- .../examples/4b.partition-server-progress.yml | 2 +- .../examples/5.partition-client.yml | 2 +- .../examples/6.partition-p2p.yml | 2 +- .../flower-custom/examples/7.network-loss.yml | 2 +- .../examples/8.network-duplicates.yml | 2 +- .../examples/9.network-delay.yml | 2 +- .../templates/client-with-coverage.yml | 2 +- .../templates/client-with-logs.yml | 2 +- .../apps/flower-custom/templates/client.yml | 2 +- .../apps/flower-custom/templates/datasets.yml | 2 +- .../templates/server-with-logs.yml | 2 +- .../apps/flower-custom/templates/server.yml | 2 +- examples/apps/flower/example.yaml | 2 +- .../flower/templates/advanced_pytorch.yaml | 4 +- .../flower/templates/advanced_tensorflow.yaml | 4 +- .../apps/h5py/templates/concatenation.yml | 2 +- .../apps/iperf2/examples/0.server-client.yml | 4 +- .../iperf2/examples/1.scheduled-clients.yml | 4 +- .../examples/10.metrics-driven-partition.yml | 6 +- .../iperf2/examples/11.time-driven-delay.yml | 6 +- .../iperf2/examples/2.advanced-placement.yml | 6 +- .../apps/iperf2/examples/3.create-until.yml | 4 +- .../apps/iperf2/examples/4.create-when.yml | 6 +- .../apps/iperf2/examples/5.assertions.yml | 4 +- examples/apps/iperf2/examples/6.deletions.yml | 4 +- .../iperf2/examples/7.failure-toleration.yml | 6 +- .../examples/8.time-driven-partition.yml | 6 +- .../examples/9.state-driven-partition.yml | 6 +- examples/apps/iperf2/templates/benchmark.yml | 55 -------- examples/apps/iperf2/templates/client.yml | 29 ++++ examples/apps/iperf2/templates/server.yml | 24 ++++ examples/apps/iperf2/templates/telemetry.yml | 4 +- .../apps/iperf3/examples/0.server-client.yml | 4 +- .../templates/{benchmark.yml => client.yml} | 26 +--- examples/apps/iperf3/templates/server.yml | 18 +++ ...{benchmark-telemetry.yml => telemetry.yml} | 4 +- .../examples/plan.baseline.replicated.yml | 16 +-- .../templates/{cluster.yml => master.yml} | 67 +--------- examples/apps/mongodb/templates/slave.yml | 60 +++++++++ examples/apps/mongodb/templates/telemetry.yml | 6 +- .../apps/parallax/templates/benchmark.yml | 2 +- .../apps/redis/examples/1.baseline-single.yml | 16 +-- .../10.availability-failover-single.yml | 2 +- .../2.baseline-cluster-deterministic.yml | 16 +-- ...eline-cluster-deterministic-outoforder.yml | 16 +-- .../4.baseline-cluster-nondeterministic.yml | 16 +-- .../redis/examples/5.scaleup-scheduled.yml | 2 +- .../redis/examples/6.scaleup-conditional.yml | 2 +- .../redis/examples/7.scaledown-delete.yml | 2 +- .../apps/redis/examples/8.scaledown-stop.yml | 4 +- .../apps/redis/examples/9.scaledown-kill.yml | 4 +- examples/apps/redis/templates/cluster.yml | 2 +- examples/apps/redis/templates/single.yml | 4 +- examples/apps/tebis/templates/services.yml | 10 +- examples/apps/tikv/examples/baseline.yml | 20 +-- .../tikv/examples/plan.baseline.coverage.yml | 20 +-- .../apps/tikv/examples/plan.elasticity.yml | 10 +- .../apps/tikv/examples/plan.localhost.yml | 20 +-- .../apps/tikv/examples/plan.saturation.yml | 30 ++--- examples/apps/tikv/examples/plan.scaleout.yml | 6 +- examples/apps/tikv/examples/saturation.yml | 12 +- examples/apps/tikv/templates/coverage.yml | 6 +- examples/apps/tikv/templates/database.yml | 125 ------------------ .../apps/tikv/templates/placement-driver.yml | 55 ++++++++ examples/apps/tikv/templates/telemetry.yml | 8 +- examples/apps/tikv/templates/worker.yml | 68 ++++++++++ .../apps/virtual-slurm/templates/services.yml | 2 +- examples/apps/ycsb/templates/cockroach.yml | 12 +- examples/apps/ycsb/templates/mongo.yml | 12 +- examples/apps/ycsb/templates/redis.yml | 12 +- examples/apps/ycsb/templates/telemetry.yml | 4 +- examples/apps/ycsb/templates/tikv.yml | 12 +- .../databases/elasticity/manifest.yml | 8 +- .../databases/network-partition/manifest.yml | 8 +- .../normal-load/manifest-by-time.yml | 6 +- .../databases/normal-load/manifest.yml | 6 +- .../databases/sstable-bitrot/manifest.yml | 6 +- .../databases/ycsb-sequence/manifest.yml | 18 +-- .../4.dataset-distribution.yml | 4 +- .../crash-on-epoch/manifest.yml | 6 +- .../ml-backend/manifest.yml | 4 +- .../node-placement/manifest.yml | 10 +- .../parallel-workflows/manifest.yml | 10 +- .../resource-distribution/manifest.yml | 4 +- .../14b.delete-cluster-with-tolerance.yml | 2 +- .../tutorial/15.performance-monitoring.yml | 6 +- examples/tutorial/16.single-chaos.yml | 8 +- examples/tutorial/17.multi-chaos.yml | 6 +- examples/tutorial/18.revoke-failures.yml | 6 +- examples/tutorial/19.sla-assertions.yml | 4 +- examples/tutorial/20.testdata.yml | 4 +- examples/tutorial/21.shared-storage.yml | 4 +- go.mod | 3 +- go.sum | 6 +- pkg/configuration/references.go | 6 +- 136 files changed, 626 insertions(+), 622 deletions(-) rename {charts/system/templates => examples/apps/debugger}/tools/debugger.yml (100%) rename {charts/system/templates => examples/apps/debugger}/tools/docker.yml (100%) delete mode 100644 examples/apps/iperf2/templates/benchmark.yml create mode 100644 examples/apps/iperf2/templates/client.yml create mode 100644 examples/apps/iperf2/templates/server.yml rename examples/apps/iperf3/templates/{benchmark.yml => client.yml} (61%) create mode 100644 examples/apps/iperf3/templates/server.yml rename examples/apps/iperf3/templates/{benchmark-telemetry.yml => telemetry.yml} (93%) rename examples/apps/mongodb/templates/{cluster.yml => master.yml} (52%) create mode 100644 examples/apps/mongodb/templates/slave.yml delete mode 100644 examples/apps/tikv/templates/database.yml create mode 100644 examples/apps/tikv/templates/placement-driver.yml create mode 100644 examples/apps/tikv/templates/worker.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 4871622a..b1fcb70c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ ### Changed defaults / behaviours - Moved charts from `charts/{category}` to `examples/apps`. This allows to have the apps and the test-cases on the same directory. Additionally, that means that chart releasing is no longer part of the frisbee release -- which shouldn't have been the case in the first place. +- Renamed template to be in the format 'frisbee.system...' and 'frisbee.apps'. This, however, warrants a new release because + the renamed systems templates affect the controller. - ... ### New Features & Functionality diff --git a/VERSION b/VERSION index 4f45e65a..84b50637 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v1.0.41 +v1.0.42 diff --git a/charts/system/templates/chaos/network-delay.yml b/charts/system/templates/chaos/network-delay.yml index 186d7d59..9663318d 100644 --- a/charts/system/templates/chaos/network-delay.yml +++ b/charts/system/templates/chaos/network-delay.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: system.chaos.network.delay + name: frisbee.system.chaos.network.delay spec: inputs: parameters: diff --git a/charts/system/templates/chaos/network-duplicate.yml b/charts/system/templates/chaos/network-duplicate.yml index eecc88b2..e8039e16 100644 --- a/charts/system/templates/chaos/network-duplicate.yml +++ b/charts/system/templates/chaos/network-duplicate.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: system.chaos.network.duplicate + name: frisbee.system.chaos.network.duplicate spec: inputs: parameters: diff --git a/charts/system/templates/chaos/network-loss.yml b/charts/system/templates/chaos/network-loss.yml index f5807788..49a467ca 100644 --- a/charts/system/templates/chaos/network-loss.yml +++ b/charts/system/templates/chaos/network-loss.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: system.chaos.network.loss + name: frisbee.system.chaos.network.loss spec: inputs: parameters: diff --git a/charts/system/templates/chaos/network-partition.yml b/charts/system/templates/chaos/network-partition.yml index 62936edd..a796ef28 100644 --- a/charts/system/templates/chaos/network-partition.yml +++ b/charts/system/templates/chaos/network-partition.yml @@ -4,7 +4,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: system.chaos.network.partition.partial + name: frisbee.system.chaos.network.partition.partial spec: inputs: parameters: diff --git a/charts/system/templates/chaos/pod-kill.yml b/charts/system/templates/chaos/pod-kill.yml index 14f1543c..4759de28 100644 --- a/charts/system/templates/chaos/pod-kill.yml +++ b/charts/system/templates/chaos/pod-kill.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: system.chaos.pod.kill + name: frisbee.system.chaos.pod.kill spec: inputs: parameters: diff --git a/charts/system/templates/telemetry/cadvisor/cadvisor.yml b/charts/system/templates/telemetry/cadvisor/cadvisor.yml index 24dfeba2..055d4ed6 100644 --- a/charts/system/templates/telemetry/cadvisor/cadvisor.yml +++ b/charts/system/templates/telemetry/cadvisor/cadvisor.yml @@ -10,7 +10,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: system.telemetry.resources + name: frisbee.system.telemetry.resources spec: service: decorators: @@ -76,5 +76,5 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: system.telemetry.resources.config + name: frisbee.system.telemetry.resources.config data: {{(.Files.Glob "dashboards/*.json").AsConfig | nindent 2}} diff --git a/charts/system/templates/telemetry/dataviewer/dataviewer.yml b/charts/system/templates/telemetry/dataviewer/dataviewer.yml index f8db9bae..494ee01e 100644 --- a/charts/system/templates/telemetry/dataviewer/dataviewer.yml +++ b/charts/system/templates/telemetry/dataviewer/dataviewer.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: system.telemetry.dataviewer.template + name: frisbee.system.telemetry.dataviewer spec: service: decorators: diff --git a/charts/system/templates/telemetry/grafana/grafana.yml b/charts/system/templates/telemetry/grafana/grafana.yml index 7a082347..cd2b8ea4 100644 --- a/charts/system/templates/telemetry/grafana/grafana.yml +++ b/charts/system/templates/telemetry/grafana/grafana.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: system.telemetry.grafana.template + name: frisbee.system.telemetry.grafana spec: service: decorators: diff --git a/charts/system/templates/telemetry/prometheus/prometheus.yml b/charts/system/templates/telemetry/prometheus/prometheus.yml index 9629e25e..87aefb83 100644 --- a/charts/system/templates/telemetry/prometheus/prometheus.yml +++ b/charts/system/templates/telemetry/prometheus/prometheus.yml @@ -39,7 +39,7 @@ subjects: apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: system.telemetry.prometheus.template + name: frisbee.system.telemetry.prometheus spec: inputs: scenario: "default" diff --git a/cmd/kubectl-frisbee/commands/tests/validate.go b/cmd/kubectl-frisbee/commands/tests/validate.go index 3fa25b3a..ba722c7d 100644 --- a/cmd/kubectl-frisbee/commands/tests/validate.go +++ b/cmd/kubectl-frisbee/commands/tests/validate.go @@ -17,6 +17,7 @@ limitations under the License. package tests import ( + "github.com/jaytaylor/go-find" "os" "path/filepath" @@ -67,18 +68,21 @@ func NewValidateTestCmd() *cobra.Command { return } - // Helm charts (and therefore templates) are validated by Helm - if _, err := os.Stat(testFile + "/Chart.yaml"); err == nil { - err = validateChart(testFile) + // search for all the directories that container Chart.yaml files. + // this file indicates that it's a helm chart that needs to be validated + finder := find.NewFind(testFile).Name("Chart.yaml") + hits, err := finder.Evaluate() + ui.ExitOnError("Unable to walk directory:"+testFile, err) - ui.ExitOnError("Chart Validation ...", err) + for _, hit := range hits { + // we only need the chart directory, not the path to Chart.yaml. + hit = filepath.Dir(hit) - ui.Success("Chart validated.", testFile) + err = validateChart(hit) + ui.ExitOnError("Chart Validation failed: "+hit, err) - return + ui.Success("Chart validated.", hit) } - - ui.Failf("Validation path should point to a Helm Chart or to an Examples directory.") } else { err := validateScenario(testFile) ui.ExitOnError("Validating ...", err) diff --git a/examples/apps/cockroachdb/examples/5.scaleup-scheduled.yml b/examples/apps/cockroachdb/examples/5.scaleup-scheduled.yml index 9c70199c..e97b9fbc 100644 --- a/examples/apps/cockroachdb/examples/5.scaleup-scheduled.yml +++ b/examples/apps/cockroachdb/examples/5.scaleup-scheduled.yml @@ -9,7 +9,7 @@ spec: - action: Cluster name: masters cluster: - templateRef: cockroach.cluster.master + templateRef: frisbee.apps.cockroach.server instances: 3 inputs: - { join: "masters-1:26257,masters-2:26257,masters-3:26257" } @@ -28,7 +28,7 @@ spec: depends: { success: [ boot ] } name: loader service: - templateRef: ycsb.cockroach.loader + templateRef: frisbee.apps.ycsb.cockroach.loader inputs: - { server: .cluster.masters.one , workload: workloada, recordcount: "100000000", threads: "40" } @@ -38,7 +38,7 @@ spec: name: more-servers depends: { running: [ loader ] } cluster: - templateRef: cockroach.cluster.master + templateRef: frisbee.apps.cockroach.server instances: 10 inputs: - { join: "masters-1:26257" } diff --git a/examples/apps/cockroachdb/examples/6.scaleup-conditional.yml b/examples/apps/cockroachdb/examples/6.scaleup-conditional.yml index 0c0bce62..30455b91 100644 --- a/examples/apps/cockroachdb/examples/6.scaleup-conditional.yml +++ b/examples/apps/cockroachdb/examples/6.scaleup-conditional.yml @@ -9,7 +9,7 @@ spec: - action: Cluster name: masters cluster: - templateRef: cockroach.cluster.master + templateRef: frisbee.apps.cockroach.server instances: 3 inputs: - { join: "masters-1:26257,masters-2:26257,masters-3:26257" } @@ -27,7 +27,7 @@ spec: name: loaders depends: { success: [ boot ] } cluster: - templateRef: ycsb.cockroach.loader + templateRef: frisbee.apps.ycsb.cockroach.loader instances: 100 inputs: - { server: .cluster.masters.one, workload: workloada, recordcount: "100000000", threads: "40", delay: "15" } @@ -40,7 +40,7 @@ spec: name: more-servers depends: { success: [ boot ] } cluster: - templateRef: cockroach.cluster.master + templateRef: frisbee.apps.cockroach.server instances: 10 inputs: - { join: "masters-1:26257" } diff --git a/examples/apps/cockroachdb/examples/7.scaledown-delete.yml b/examples/apps/cockroachdb/examples/7.scaledown-delete.yml index f89d9846..9b96a6a3 100644 --- a/examples/apps/cockroachdb/examples/7.scaledown-delete.yml +++ b/examples/apps/cockroachdb/examples/7.scaledown-delete.yml @@ -9,7 +9,7 @@ spec: - action: Cluster name: masters cluster: - templateRef: cockroach.cluster.master + templateRef: frisbee.apps.cockroach.server instances: 3 inputs: - { join: "masters-1:26257,masters-2:26257,masters-3:26257" } @@ -29,7 +29,7 @@ spec: depends: { success: [ boot ] } name: loader service: - templateRef: ycsb.cockroach.loader + templateRef: frisbee.apps.ycsb.cockroach.loader inputs: - { server: .cluster.masters.one , workload: workloada, recordcount: "100000000", threads: "4", delay: "15" } @@ -39,7 +39,7 @@ spec: name: groupa depends: { running: [ loader ] } cluster: - templateRef: cockroach.cluster.master + templateRef: frisbee.apps.cockroach.server instances: 5 inputs: - { join: "masters-1:26257" } @@ -49,7 +49,7 @@ spec: name: groupb depends: { running: [ groupa ] } cluster: - templateRef: cockroach.cluster.master + templateRef: frisbee.apps.cockroach.server instances: 5 inputs: - { join: "masters-1:26257" } diff --git a/examples/apps/cockroachdb/examples/8.scaledown-stop.yml b/examples/apps/cockroachdb/examples/8.scaledown-stop.yml index 469816d9..55f78538 100644 --- a/examples/apps/cockroachdb/examples/8.scaledown-stop.yml +++ b/examples/apps/cockroachdb/examples/8.scaledown-stop.yml @@ -9,7 +9,7 @@ spec: - action: Cluster name: masters cluster: - templateRef: cockroach.cluster.master + templateRef: frisbee.apps.cockroach.server instances: 3 inputs: - { join: "masters-1:26257,masters-2:26257,masters-3:26257" } @@ -30,7 +30,7 @@ spec: depends: { success: [ boot ] } name: loader service: - templateRef: ycsb.cockroach.loader + templateRef: frisbee.apps.ycsb.cockroach.loader inputs: - { server: masters-1 , workload: workloada, recordcount: "100000000", threads: "4", delay: "15" } @@ -40,7 +40,7 @@ spec: name: more-servers depends: { running: [ loader ] } cluster: - templateRef: cockroach.cluster.master + templateRef: frisbee.apps.cockroach.server instances: 10 inputs: - { join: "masters-1:26257" } diff --git a/examples/apps/cockroachdb/examples/9.scaledown-kill.yml b/examples/apps/cockroachdb/examples/9.scaledown-kill.yml index 65063fd4..4edbf697 100644 --- a/examples/apps/cockroachdb/examples/9.scaledown-kill.yml +++ b/examples/apps/cockroachdb/examples/9.scaledown-kill.yml @@ -9,7 +9,7 @@ spec: - action: Cluster name: masters cluster: - templateRef: cockroach.cluster.master + templateRef: frisbee.apps.cockroach.server instances: 3 inputs: - { join: "masters-1:26257,masters-2:26257,masters-3:26257" } @@ -29,7 +29,7 @@ spec: depends: { success: [ boot ] } name: loader service: - templateRef: ycsb.cockroach.loader + templateRef: frisbee.apps.ycsb.cockroach.loader inputs: - { server: .cluster.masters.one , workload: workloada, recordcount: "100000000", threads: "4", delay: "15" } @@ -39,7 +39,7 @@ spec: name: more-servers depends: { running: [ loader ] } cluster: - templateRef: cockroach.cluster.master + templateRef: frisbee.apps.cockroach.server instances: 10 inputs: - { join: "masters-1:26257" } @@ -52,7 +52,7 @@ spec: name: killer depends: { running: [ more-servers ] } cascade: - templateRef: system.chaos.pod.kill + templateRef: frisbee.system.chaos.pod.kill inputs: - { target: more-servers-4 } - { target: more-servers-7 } diff --git a/examples/apps/cockroachdb/templates/server.yml b/examples/apps/cockroachdb/templates/server.yml index bb130e1f..70431cdc 100644 --- a/examples/apps/cockroachdb/templates/server.yml +++ b/examples/apps/cockroachdb/templates/server.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: cockroach.cluster.master + name: frisbee.apps.cockroach.server spec: inputs: parameters: @@ -11,8 +11,8 @@ spec: service: decorators: telemetry: - - cockroach.telemetry.server - - system.telemetry.resources + - frisbee.apps.cockroach.server.telemetry + - frisbee.system.telemetry.resources volumes: # Create an ephemeral volume, backed by a file - name: scratch-volume diff --git a/examples/apps/cockroachdb/templates/telemetry.yml b/examples/apps/cockroachdb/templates/telemetry.yml index 9f410ece..aaa459fb 100644 --- a/examples/apps/cockroachdb/templates/telemetry.yml +++ b/examples/apps/cockroachdb/templates/telemetry.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: cockroach.telemetry.server + name: frisbee.apps.cockroach.server.telemetry spec: service: decorators: @@ -46,5 +46,5 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: cockroach.telemetry.server.config + name: frisbee.apps.cockroach.server.telemetry.config data: {{(.Files.Glob "dashboards/*.json").AsConfig | nindent 2}} \ No newline at end of file diff --git a/charts/system/templates/tools/debugger.yml b/examples/apps/debugger/tools/debugger.yml similarity index 100% rename from charts/system/templates/tools/debugger.yml rename to examples/apps/debugger/tools/debugger.yml diff --git a/charts/system/templates/tools/docker.yml b/examples/apps/debugger/tools/docker.yml similarity index 100% rename from charts/system/templates/tools/docker.yml rename to examples/apps/debugger/tools/docker.yml diff --git a/examples/apps/fedbed/examples/all_combined.yml b/examples/apps/fedbed/examples/all_combined.yml index 350eea97..500f133e 100644 --- a/examples/apps/fedbed/examples/all_combined.yml +++ b/examples/apps/fedbed/examples/all_combined.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Scenario metadata: - name: all_combined + name: all-combined spec: actions: # Step 0: Cache the downloaded dataset to the host (for multi-host setups, the host may change across executions) @@ -17,7 +17,7 @@ spec: - action: Service name: server service: - templateRef: fedbed.server + templateRef: frisbee.apps.fedbed.server inputs: - { min_fit_clients: 3 } @@ -26,7 +26,7 @@ spec: name: clients depends: { running: [ server ], success: [ cifar10-download ] } cluster: - templateRef: fedbed.client-shared-dataset + templateRef: frisbee.apps.fedbed.client-shared-dataset inputs: - { fl_server: server, dataset: fl.datasets.cifar10, backend: "pytorch", total_nodes: 3, node_id: 0 } - { fl_server: server, dataset: fl.datasets.cifar10, backend: "pytorch", total_nodes: 3, node_id: 0 } diff --git a/examples/apps/fedbed/examples/cached-dataset.yml b/examples/apps/fedbed/examples/cached-dataset.yml index 98606473..38cb0a5a 100644 --- a/examples/apps/fedbed/examples/cached-dataset.yml +++ b/examples/apps/fedbed/examples/cached-dataset.yml @@ -17,7 +17,7 @@ spec: - action: Service name: server service: - templateRef: fedbed.server + templateRef: frisbee.apps.fedbed.server inputs: - { min_fit_clients: 3 } @@ -26,7 +26,7 @@ spec: name: clients depends: { running: [ server ], success: [ cifar10-download ] } cluster: - templateRef: fedbed.client-shared-dataset + templateRef: frisbee.apps.fedbed.client-shared-dataset inputs: - { fl_server: server, dataset: fl.datasets.cifar10, backend: "pytorch", total_nodes: 3, node_id: 0 } - { fl_server: server, dataset: fl.datasets.cifar10, backend: "pytorch", total_nodes: 3, node_id: 1 } diff --git a/examples/apps/fedbed/examples/resource-distribution.yml b/examples/apps/fedbed/examples/resource-distribution.yml index 4227b92d..a5290776 100644 --- a/examples/apps/fedbed/examples/resource-distribution.yml +++ b/examples/apps/fedbed/examples/resource-distribution.yml @@ -9,7 +9,7 @@ spec: - action: Service name: server service: - templateRef: fedbed.server + templateRef: frisbee.apps.fedbed.server inputs: - { min_fit_clients: 3 } @@ -18,7 +18,7 @@ spec: name: clients depends: { running: [ server ]} cluster: - templateRef: fedbed.client + templateRef: frisbee.apps.fedbed.client inputs: - { fl_server: server, dataset: "MNIST", backend: "pytorch", total_nodes: 3, node_id: 0 } - { fl_server: server, dataset: "MNIST", backend: "pytorch", total_nodes: 3, node_id: 1 } diff --git a/examples/apps/fedbed/templates/client-with-annotations.yaml b/examples/apps/fedbed/templates/client-with-annotations.yaml index 0b1f8aa8..a8e440c3 100644 --- a/examples/apps/fedbed/templates/client-with-annotations.yaml +++ b/examples/apps/fedbed/templates/client-with-annotations.yaml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: fedbed.client-annotation + name: frisbee.apps.fedbed.client-annotation spec: inputs: parameters: @@ -19,7 +19,7 @@ spec: service: # decorators: # telemetry: - # - system.telemetry.resources + # - frisbee.system.telemetry.resources volumes: - name: varlog diff --git a/examples/apps/fedbed/templates/client-with-shared-dataset.yaml b/examples/apps/fedbed/templates/client-with-shared-dataset.yaml index cb950cda..c99176a6 100644 --- a/examples/apps/fedbed/templates/client-with-shared-dataset.yaml +++ b/examples/apps/fedbed/templates/client-with-shared-dataset.yaml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: fedbed.client-shared-dataset + name: frisbee.apps.fedbed.client-shared-dataset spec: inputs: parameters: @@ -15,7 +15,7 @@ spec: service: decorators: telemetry: - - system.telemetry.resources + - frisbee.system.telemetry.resources volumes: - name: dataset diff --git a/examples/apps/fedbed/templates/client.yaml b/examples/apps/fedbed/templates/client.yaml index 238976b6..97b6fd2d 100644 --- a/examples/apps/fedbed/templates/client.yaml +++ b/examples/apps/fedbed/templates/client.yaml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: fedbed.client + name: frisbee.apps.fedbed.client spec: inputs: parameters: @@ -19,7 +19,7 @@ spec: service: decorators: telemetry: - - system.telemetry.resources + - frisbee.system.telemetry.resources containers: - name: main diff --git a/examples/apps/fedbed/templates/server.yaml b/examples/apps/fedbed/templates/server.yaml index dcbea3c7..af525ac9 100644 --- a/examples/apps/fedbed/templates/server.yaml +++ b/examples/apps/fedbed/templates/server.yaml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: fedbed.server + name: frisbee.apps.fedbed.server spec: inputs: parameters: @@ -17,7 +17,7 @@ spec: service: decorators: telemetry: - - system.telemetry.resources + - frisbee.system.telemetry.resources volumes: - name: logs diff --git a/examples/apps/fio/examples/0.no-storage.yml b/examples/apps/fio/examples/0.no-storage.yml index e4bf86eb..835aa8d3 100644 --- a/examples/apps/fio/examples/0.no-storage.yml +++ b/examples/apps/fio/examples/0.no-storage.yml @@ -8,7 +8,7 @@ spec: - action: Service name: fio service: - templateRef: fio.benchmark.default-fs + templateRef: frisbee.apps.fio.builtin inputs: - { direct: "0" } diff --git a/examples/apps/fio/examples/1.ephemeral-volume.yml b/examples/apps/fio/examples/1.ephemeral-volume.yml index 045c46b8..1d0ccc18 100644 --- a/examples/apps/fio/examples/1.ephemeral-volume.yml +++ b/examples/apps/fio/examples/1.ephemeral-volume.yml @@ -8,7 +8,7 @@ spec: - action: Service name: fio service: - templateRef: fio.benchmark.ephemeral + templateRef: frisbee.apps.fio.ephemeral inputs: - { direct: "1" } diff --git a/examples/apps/fio/examples/2.formatted-device.yml b/examples/apps/fio/examples/2.formatted-device.yml index edb19635..b9562670 100644 --- a/examples/apps/fio/examples/2.formatted-device.yml +++ b/examples/apps/fio/examples/2.formatted-device.yml @@ -8,7 +8,7 @@ spec: - action: Service name: fio service: - templateRef: fio.benchmark.formatted-device + templateRef: frisbee.apps.fio.formatted-device inputs: - { direct: "0" } diff --git a/examples/apps/fio/examples/3.raw-device.yml b/examples/apps/fio/examples/3.raw-device.yml index 5e9a3fa7..ed030b3a 100644 --- a/examples/apps/fio/examples/3.raw-device.yml +++ b/examples/apps/fio/examples/3.raw-device.yml @@ -8,7 +8,7 @@ spec: - action: Service name: fio service: - templateRef: fio.benchmark.raw-device + templateRef: frisbee.apps.fio.raw-device inputs: - { direct: "0" } diff --git a/examples/apps/fio/examples/4.shared-fs.yml b/examples/apps/fio/examples/4.shared-fs.yml index d998f01f..c9ac3b52 100644 --- a/examples/apps/fio/examples/4.shared-fs.yml +++ b/examples/apps/fio/examples/4.shared-fs.yml @@ -22,7 +22,7 @@ spec: - action: Cluster name: fio cluster: - templateRef: fio.benchmark.shared-fs + templateRef: frisbee.apps.fio.shared-fs instances: 2 inputs: - { direct: "0", claimName: fs } diff --git a/examples/apps/fio/templates/0.default.yml b/examples/apps/fio/templates/0.default.yml index b350fd14..f2d7bbf9 100644 --- a/examples/apps/fio/templates/0.default.yml +++ b/examples/apps/fio/templates/0.default.yml @@ -3,7 +3,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: fio.benchmark.default-fs + name: frisbee.apps.fio.builtin spec: inputs: parameters: @@ -13,7 +13,7 @@ spec: service: decorators: # decorators telemetry: - - system.telemetry.resources + - frisbee.system.telemetry.resources containers: # Container - name: main diff --git a/examples/apps/fio/templates/0.ephemeral-volume.yml b/examples/apps/fio/templates/0.ephemeral-volume.yml index c7225285..11eba75d 100644 --- a/examples/apps/fio/templates/0.ephemeral-volume.yml +++ b/examples/apps/fio/templates/0.ephemeral-volume.yml @@ -3,7 +3,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: fio.benchmark.ephemeral + name: frisbee.apps.fio.ephemeral spec: inputs: parameters: @@ -13,7 +13,7 @@ spec: service: decorators: # decorators telemetry: - - system.telemetry.resources + - frisbee.system.telemetry.resources volumes: # Create an ephemeral volume, backed by a file - name: scratch-volume diff --git a/examples/apps/fio/templates/2.blockdevice-formatted.yml b/examples/apps/fio/templates/2.blockdevice-formatted.yml index baba63df..d2d0db7e 100644 --- a/examples/apps/fio/templates/2.blockdevice-formatted.yml +++ b/examples/apps/fio/templates/2.blockdevice-formatted.yml @@ -3,7 +3,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: fio.benchmark.formatted-device + name: frisbee.apps.fio.formatted-device spec: inputs: parameters: @@ -13,8 +13,8 @@ spec: service: decorators: # decorators telemetry: - - system.telemetry.resources - - fio.telemetry.client + - frisbee.system.telemetry.resources + - frisbee.apps.fio.telemetry volumes: # Create an ephemeral volume, backed by a formatted block device - name: scratch-volume diff --git a/examples/apps/fio/templates/3.blockdevice-raw.yml b/examples/apps/fio/templates/3.blockdevice-raw.yml index 6f647e6d..c26affd3 100644 --- a/examples/apps/fio/templates/3.blockdevice-raw.yml +++ b/examples/apps/fio/templates/3.blockdevice-raw.yml @@ -3,7 +3,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: fio.benchmark.raw-device + name: frisbee.apps.fio.raw-device spec: inputs: parameters: @@ -14,8 +14,8 @@ spec: service: decorators: # decorators telemetry: - - system.telemetry.resources - - fio.telemetry.client + - frisbee.system.telemetry.resources + - frisbee.apps.fio.telemetry volumes: # Create an ephemeral volume, backed by a raw block device - name: scratch-volume diff --git a/examples/apps/fio/templates/4.shared-fs.yml b/examples/apps/fio/templates/4.shared-fs.yml index b681d0ae..5ed7c107 100644 --- a/examples/apps/fio/templates/4.shared-fs.yml +++ b/examples/apps/fio/templates/4.shared-fs.yml @@ -3,7 +3,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: fio.benchmark.shared-fs + name: frisbee.apps.fio.shared-fs spec: inputs: parameters: @@ -19,7 +19,7 @@ spec: claimName: {{"{{.inputs.parameters.claimName}}" | quote}} decorators: # decorators - telemetry: [ system.telemetry.resources, fio.telemetry.client ] + telemetry: [ frisbee.system.telemetry.resources, frisbee.apps.fio.telemetry ] containers: # Container - name: main diff --git a/examples/apps/fio/templates/telemetry.yml b/examples/apps/fio/templates/telemetry.yml index 36cf8b8a..a6136acd 100644 --- a/examples/apps/fio/templates/telemetry.yml +++ b/examples/apps/fio/templates/telemetry.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: fio.telemetry.client + name: frisbee.apps.fio.telemetry spec: service: decorators: @@ -50,5 +50,5 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: fio.telemetry.client.config + name: frisbee.apps.fio.telemetry.config data: {{(.Files.Glob "dashboards/fio.json").AsConfig | nindent 2}} diff --git a/examples/apps/flower-custom/examples/13.scaled-with-logs.yml b/examples/apps/flower-custom/examples/13.scaled-with-logs.yml index 49ef28cf..c66a540e 100644 --- a/examples/apps/flower-custom/examples/13.scaled-with-logs.yml +++ b/examples/apps/flower-custom/examples/13.scaled-with-logs.yml @@ -39,7 +39,7 @@ spec: - action: Service name: dataviewer service: - templateRef: system.telemetry.dataviewer.template + templateRef: frisbee.system.telemetry.dataviewer inputs: - { logClaimName: logs } diff --git a/examples/apps/flower-custom/examples/4a.partition-server-init.yml b/examples/apps/flower-custom/examples/4a.partition-server-init.yml index dde50e41..ebef9faa 100644 --- a/examples/apps/flower-custom/examples/4a.partition-server-init.yml +++ b/examples/apps/flower-custom/examples/4a.partition-server-init.yml @@ -52,7 +52,7 @@ spec: name: partition0 depends: { running: [ clients ] } chaos: - templateRef: system.chaos.network.partition.partial + templateRef: frisbee.system.chaos.network.partition.partial inputs: - { source: server, duration: 5m , direction: "both", dst: "clients-1,clients-2,clients-3" } diff --git a/examples/apps/flower-custom/examples/4b.partition-server-progress.yml b/examples/apps/flower-custom/examples/4b.partition-server-progress.yml index 8ab023e5..99684be5 100644 --- a/examples/apps/flower-custom/examples/4b.partition-server-progress.yml +++ b/examples/apps/flower-custom/examples/4b.partition-server-progress.yml @@ -51,7 +51,7 @@ spec: name: partition0 depends: { running: [ clients ], after: "4m" } chaos: - templateRef: system.chaos.network.partition.partial + templateRef: frisbee.system.chaos.network.partition.partial inputs: - { source: server, duration: 5m , direction: "both", dst: "clients-1,clients-2,clients-3" } diff --git a/examples/apps/flower-custom/examples/5.partition-client.yml b/examples/apps/flower-custom/examples/5.partition-client.yml index 6a317499..4210bc28 100644 --- a/examples/apps/flower-custom/examples/5.partition-client.yml +++ b/examples/apps/flower-custom/examples/5.partition-client.yml @@ -51,7 +51,7 @@ spec: name: partition0 depends: { running: [ clients ] } chaos: - templateRef: system.chaos.network.partition.partial + templateRef: frisbee.system.chaos.network.partition.partial inputs: - { source: clients-1, duration: 5m , direction: "both", dst: "server" } diff --git a/examples/apps/flower-custom/examples/6.partition-p2p.yml b/examples/apps/flower-custom/examples/6.partition-p2p.yml index e35b2385..a061ce8a 100644 --- a/examples/apps/flower-custom/examples/6.partition-p2p.yml +++ b/examples/apps/flower-custom/examples/6.partition-p2p.yml @@ -51,7 +51,7 @@ spec: name: partition0 depends: { running: [ clients ] } chaos: - templateRef: system.chaos.network.partition.partial + templateRef: frisbee.system.chaos.network.partition.partial inputs: - { source: clients-1, duration: 5m , direction: "both", dst: "clients-2,clients-3" } diff --git a/examples/apps/flower-custom/examples/7.network-loss.yml b/examples/apps/flower-custom/examples/7.network-loss.yml index 9851b6b5..1b579431 100644 --- a/examples/apps/flower-custom/examples/7.network-loss.yml +++ b/examples/apps/flower-custom/examples/7.network-loss.yml @@ -51,7 +51,7 @@ spec: name: packetloss depends: { running: [ clients ] } chaos: - templateRef: system.chaos.network.loss + templateRef: frisbee.system.chaos.network.loss inputs: - { source: server, duration: 5m } diff --git a/examples/apps/flower-custom/examples/8.network-duplicates.yml b/examples/apps/flower-custom/examples/8.network-duplicates.yml index 0dc0468d..9d3168f4 100644 --- a/examples/apps/flower-custom/examples/8.network-duplicates.yml +++ b/examples/apps/flower-custom/examples/8.network-duplicates.yml @@ -50,7 +50,7 @@ spec: name: duplicates depends: { running: [ clients ] } chaos: - templateRef: system.chaos.network.duplicate + templateRef: frisbee.system.chaos.network.duplicate inputs: - { source: server, duration: 5m } diff --git a/examples/apps/flower-custom/examples/9.network-delay.yml b/examples/apps/flower-custom/examples/9.network-delay.yml index 8c73c095..6678cc31 100644 --- a/examples/apps/flower-custom/examples/9.network-delay.yml +++ b/examples/apps/flower-custom/examples/9.network-delay.yml @@ -51,7 +51,7 @@ spec: name: delay depends: { running: [ clients ] } chaos: - templateRef: system.chaos.network.delay + templateRef: frisbee.system.chaos.network.delay inputs: - { source: server, duration: 5m, latency: "120ms", jitter: "50ms" } diff --git a/examples/apps/flower-custom/templates/client-with-coverage.yml b/examples/apps/flower-custom/templates/client-with-coverage.yml index 44dfda66..ba9f20fe 100644 --- a/examples/apps/flower-custom/templates/client-with-coverage.yml +++ b/examples/apps/flower-custom/templates/client-with-coverage.yml @@ -14,7 +14,7 @@ spec: name: coverage telemetry: - - system.telemetry.resources + - frisbee.system.telemetry.resources volumes: - name: dataset diff --git a/examples/apps/flower-custom/templates/client-with-logs.yml b/examples/apps/flower-custom/templates/client-with-logs.yml index 89fc0a6e..59f80d04 100644 --- a/examples/apps/flower-custom/templates/client-with-logs.yml +++ b/examples/apps/flower-custom/templates/client-with-logs.yml @@ -13,7 +13,7 @@ spec: service: decorators: telemetry: - - system.telemetry.resources + - frisbee.system.telemetry.resources volumes: - name: dataset diff --git a/examples/apps/flower-custom/templates/client.yml b/examples/apps/flower-custom/templates/client.yml index 1d598df2..d9873cc0 100644 --- a/examples/apps/flower-custom/templates/client.yml +++ b/examples/apps/flower-custom/templates/client.yml @@ -10,7 +10,7 @@ spec: dataClaimName: "" service: decorators: - telemetry: [ system.telemetry.resources ] + telemetry: [ frisbee.system.telemetry.resources ] volumes: - name: dataset diff --git a/examples/apps/flower-custom/templates/datasets.yml b/examples/apps/flower-custom/templates/datasets.yml index 60e8628d..fb99c198 100644 --- a/examples/apps/flower-custom/templates/datasets.yml +++ b/examples/apps/flower-custom/templates/datasets.yml @@ -10,7 +10,7 @@ spec: service: decorators: telemetry: - - system.telemetry.resources + - frisbee.system.telemetry.resources volumes: - name: dataset persistentVolumeClaim: diff --git a/examples/apps/flower-custom/templates/server-with-logs.yml b/examples/apps/flower-custom/templates/server-with-logs.yml index 65d86535..fb317a1f 100644 --- a/examples/apps/flower-custom/templates/server-with-logs.yml +++ b/examples/apps/flower-custom/templates/server-with-logs.yml @@ -11,7 +11,7 @@ spec: service: decorators: telemetry: - - system.telemetry.resources + - frisbee.system.telemetry.resources volumes: - name: logs diff --git a/examples/apps/flower-custom/templates/server.yml b/examples/apps/flower-custom/templates/server.yml index 3781a0d6..802c89bb 100644 --- a/examples/apps/flower-custom/templates/server.yml +++ b/examples/apps/flower-custom/templates/server.yml @@ -11,7 +11,7 @@ spec: service: decorators: telemetry: - - system.telemetry.resources + - frisbee.system.telemetry.resources containers: # Container - name: main diff --git a/examples/apps/flower/example.yaml b/examples/apps/flower/example.yaml index b4b29124..9d15135f 100644 --- a/examples/apps/flower/example.yaml +++ b/examples/apps/flower/example.yaml @@ -9,7 +9,7 @@ spec: - action: Service name: script service: - templateRef: flower.advanced-pytorch.standalone + templateRef: frisbee.apps.flower.advanced-pytorch # Teardown - action: Delete diff --git a/examples/apps/flower/templates/advanced_pytorch.yaml b/examples/apps/flower/templates/advanced_pytorch.yaml index 94091566..64b44d26 100644 --- a/examples/apps/flower/templates/advanced_pytorch.yaml +++ b/examples/apps/flower/templates/advanced_pytorch.yaml @@ -2,11 +2,11 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: flower.advanced-pytorch.standalone + name: frisbee.apps.flower.advanced-pytorch spec: service: decorators: - telemetry: [ system.telemetry.resources ] + telemetry: [ frisbee.system.telemetry.resources ] containers: - name: main diff --git a/examples/apps/flower/templates/advanced_tensorflow.yaml b/examples/apps/flower/templates/advanced_tensorflow.yaml index 0ddbbda6..70a50877 100644 --- a/examples/apps/flower/templates/advanced_tensorflow.yaml +++ b/examples/apps/flower/templates/advanced_tensorflow.yaml @@ -2,11 +2,11 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: flower.advanced-tensorflow.standalone + name: frisbee.apps.flower.advanced-tensorflow spec: service: decorators: - telemetry: [ system.telemetry.resources ] + telemetry: [ frisbee.system.telemetry.resources ] containers: - name: main diff --git a/examples/apps/h5py/templates/concatenation.yml b/examples/apps/h5py/templates/concatenation.yml index 0612c8cb..4aedfa0d 100644 --- a/examples/apps/h5py/templates/concatenation.yml +++ b/examples/apps/h5py/templates/concatenation.yml @@ -7,7 +7,7 @@ spec: service: decorators: telemetry: - - system.telemetry.resources + - frisbee.system.telemetry.resources containers: - name: main image: hdfgroup/hdf5lib:1.13.1 diff --git a/examples/apps/iperf2/examples/0.server-client.yml b/examples/apps/iperf2/examples/0.server-client.yml index 9f2cc66d..e85eb4d8 100644 --- a/examples/apps/iperf2/examples/0.server-client.yml +++ b/examples/apps/iperf2/examples/0.server-client.yml @@ -9,14 +9,14 @@ spec: - action: Service name: server service: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create an iperf client - action: Service name: client depends: { running: [ server ] } service: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client inputs: - { server: server, seconds: "300" } diff --git a/examples/apps/iperf2/examples/1.scheduled-clients.yml b/examples/apps/iperf2/examples/1.scheduled-clients.yml index ed59013f..01112952 100644 --- a/examples/apps/iperf2/examples/1.scheduled-clients.yml +++ b/examples/apps/iperf2/examples/1.scheduled-clients.yml @@ -9,14 +9,14 @@ spec: - action: Service name: server service: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create a cluster of iperf clients - action: Cluster name: clients depends: { running: [ server ] } cluster: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client instances: 10 inputs: - { server: server, seconds: "120" } diff --git a/examples/apps/iperf2/examples/10.metrics-driven-partition.yml b/examples/apps/iperf2/examples/10.metrics-driven-partition.yml index 9cb10265..e4c1d914 100644 --- a/examples/apps/iperf2/examples/10.metrics-driven-partition.yml +++ b/examples/apps/iperf2/examples/10.metrics-driven-partition.yml @@ -9,14 +9,14 @@ spec: - action: Service name: server service: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create an iperf client to generate background noise - action: Service name: noise depends: { running: [ server ] } service: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client inputs: - { server: server, seconds: "800" } @@ -25,7 +25,7 @@ spec: name: clients depends: { running: [ server ] } cluster: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client instances: 20 inputs: - { server: server, seconds: "300" } diff --git a/examples/apps/iperf2/examples/11.time-driven-delay.yml b/examples/apps/iperf2/examples/11.time-driven-delay.yml index 25233571..90ca7c1f 100644 --- a/examples/apps/iperf2/examples/11.time-driven-delay.yml +++ b/examples/apps/iperf2/examples/11.time-driven-delay.yml @@ -9,14 +9,14 @@ spec: - action: Service name: server service: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create an iperf client - action: Service name: client depends: { running: [ server ] } service: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client inputs: - { server: server, seconds: "800" } @@ -25,7 +25,7 @@ spec: name: partition0 depends: { running: [ server ], after: "3m" } chaos: - templateRef: system.chaos.network.delay + templateRef: frisbee.system.chaos.network.delay inputs: - { source: server, duration: "2m" } diff --git a/examples/apps/iperf2/examples/2.advanced-placement.yml b/examples/apps/iperf2/examples/2.advanced-placement.yml index 00298f8a..11736f24 100644 --- a/examples/apps/iperf2/examples/2.advanced-placement.yml +++ b/examples/apps/iperf2/examples/2.advanced-placement.yml @@ -10,14 +10,14 @@ spec: - action: Cluster name: server cluster: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create a cluster of iperf clients - action: Cluster name: clients-a depends: { running: [ server ] } cluster: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client instances: 20 inputs: - { server: .cluster.server.one, seconds: "120" } @@ -30,7 +30,7 @@ spec: name: clients-b depends: { running: [ server ] } cluster: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client instances: 20 inputs: - { server: .cluster.server.one, seconds: "240" } diff --git a/examples/apps/iperf2/examples/3.create-until.yml b/examples/apps/iperf2/examples/3.create-until.yml index a1a4756b..f2ec5487 100644 --- a/examples/apps/iperf2/examples/3.create-until.yml +++ b/examples/apps/iperf2/examples/3.create-until.yml @@ -9,14 +9,14 @@ spec: - action: Service name: server service: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create a cluster of iperf clients - action: Cluster name: clients depends: { running: [ server ] } cluster: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client instances: 100 inputs: - { server: server, seconds: "160" } diff --git a/examples/apps/iperf2/examples/4.create-when.yml b/examples/apps/iperf2/examples/4.create-when.yml index ef765452..80a7a59b 100644 --- a/examples/apps/iperf2/examples/4.create-when.yml +++ b/examples/apps/iperf2/examples/4.create-when.yml @@ -9,14 +9,14 @@ spec: - action: Service name: server service: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create an iperf client to generate background noise - action: Service name: noise depends: { running: [ server ] } service: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client inputs: - { server: server, seconds: "800" } @@ -25,7 +25,7 @@ spec: name: clients depends: { running: [ server ] } cluster: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client instances: 100 inputs: - { server: server, seconds: "160" } diff --git a/examples/apps/iperf2/examples/5.assertions.yml b/examples/apps/iperf2/examples/5.assertions.yml index acdee080..f3eb02d5 100644 --- a/examples/apps/iperf2/examples/5.assertions.yml +++ b/examples/apps/iperf2/examples/5.assertions.yml @@ -9,7 +9,7 @@ spec: - action: Service name: server service: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create an iperf client - action: Service @@ -19,7 +19,7 @@ spec: state: '{{.NumFailedJobs}} >= 1' metrics: 'max() of query(wpFnYRwGk/2/bitrate, 5m, now) is below(1000)' service: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client inputs: - { server: server, seconds: "800" } diff --git a/examples/apps/iperf2/examples/6.deletions.yml b/examples/apps/iperf2/examples/6.deletions.yml index d64dc164..b69a3c9d 100644 --- a/examples/apps/iperf2/examples/6.deletions.yml +++ b/examples/apps/iperf2/examples/6.deletions.yml @@ -9,14 +9,14 @@ spec: - action: Service name: server service: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create an iperf client - action: Service name: client depends: { running: [ server ] } service: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client inputs: - { server: server, seconds: "300" } diff --git a/examples/apps/iperf2/examples/7.failure-toleration.yml b/examples/apps/iperf2/examples/7.failure-toleration.yml index e7ac7364..4e98647b 100644 --- a/examples/apps/iperf2/examples/7.failure-toleration.yml +++ b/examples/apps/iperf2/examples/7.failure-toleration.yml @@ -9,14 +9,14 @@ spec: - action: Service name: server service: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create a cluster of iperf clients - action: Cluster name: clients depends: { running: [ server ] } cluster: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client instances: 10 inputs: - { server: server, seconds: "600" } @@ -30,7 +30,7 @@ spec: name: killer depends: { running: [ clients ] } cascade: - templateRef: system.chaos.pod.kill + templateRef: frisbee.system.chaos.pod.kill inputs: - { target: clients-4 } - { target: clients-7 } diff --git a/examples/apps/iperf2/examples/8.time-driven-partition.yml b/examples/apps/iperf2/examples/8.time-driven-partition.yml index b58538ce..fcc03da2 100644 --- a/examples/apps/iperf2/examples/8.time-driven-partition.yml +++ b/examples/apps/iperf2/examples/8.time-driven-partition.yml @@ -9,14 +9,14 @@ spec: - action: Service name: server service: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create an iperf client - action: Service name: client depends: { running: [ server ] } service: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client inputs: - { server: server, seconds: "800" } @@ -25,7 +25,7 @@ spec: name: partition0 depends: { running: [ server ], after: "3m" } chaos: - templateRef: system.chaos.network.delay + templateRef: frisbee.system.chaos.network.delay inputs: - { source: server, duration: "2m" } diff --git a/examples/apps/iperf2/examples/9.state-driven-partition.yml b/examples/apps/iperf2/examples/9.state-driven-partition.yml index e95f0d16..df0dd35f 100644 --- a/examples/apps/iperf2/examples/9.state-driven-partition.yml +++ b/examples/apps/iperf2/examples/9.state-driven-partition.yml @@ -9,14 +9,14 @@ spec: - action: Service name: server service: - templateRef: iperf2.server + templateRef: frisbee.apps.iperf2.server # Create an iperf client to generate background noise - action: Service name: noise depends: { running: [ server ] } service: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client inputs: - { server: server, seconds: "800" } @@ -26,7 +26,7 @@ spec: name: client depends: { running: [ server ], after: "2m" } service: - templateRef: iperf2.client + templateRef: frisbee.apps.iperf2.client inputs: - { server: server, seconds: "120" } diff --git a/examples/apps/iperf2/templates/benchmark.yml b/examples/apps/iperf2/templates/benchmark.yml deleted file mode 100644 index 78a6d9aa..00000000 --- a/examples/apps/iperf2/templates/benchmark.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -apiVersion: frisbee.dev/v1alpha1 -kind: Template -metadata: - name: iperf2.server -spec: - service: - decorators: - telemetry: - - system.telemetry.resources - containers: - - name: main - image: "czero/iperf2" - ports: - - name: tcp - containerPort: 5001 - command: - - /bin/sh # Run shell - - -c # Read from string - - | # Multi-line str - set -eum - cut -d ' ' -f 4 /proc/self/stat > /dev/shm/app # Sidecar: use it for entering the cgroup - - iperf -s -f m -i 5 - - ---- -apiVersion: frisbee.dev/v1alpha1 -kind: Template -metadata: - name: iperf2.client -spec: - inputs: - parameters: - server: localhost - seconds: "60" - service: - decorators: - telemetry: - - system.telemetry.resources - - iperf2.telemetry.client - - containers: - - name: main - image: "czero/iperf2" - command: - - /bin/sh # Run shell - - -c # Read from string - - | # Multi-line str - set -eum - cut -d ' ' -f 4 /proc/self/stat > /dev/shm/app # Sidecar: use it for entering the cgroup - - server={{"{{.inputs.parameters.server}}"}} - - iperf -c ${server} -t {{"{{.inputs.parameters.seconds}}"}} -f m -i 5 > /dev/shm/pipe diff --git a/examples/apps/iperf2/templates/client.yml b/examples/apps/iperf2/templates/client.yml new file mode 100644 index 00000000..4e4fbfc9 --- /dev/null +++ b/examples/apps/iperf2/templates/client.yml @@ -0,0 +1,29 @@ +--- +apiVersion: frisbee.dev/v1alpha1 +kind: Template +metadata: + name: frisbee.apps.iperf2.client +spec: + inputs: + parameters: + server: localhost + seconds: "60" + service: + decorators: + telemetry: + - frisbee.system.telemetry.resources + - frisbee.apps.iperf2.client.telemetry + + containers: + - name: main + image: "czero/iperf2" + command: + - /bin/sh # Run shell + - -c # Read from string + - | # Multi-line str + set -eum + cut -d ' ' -f 4 /proc/self/stat > /dev/shm/app # Sidecar: use it for entering the cgroup + + server={{"{{.inputs.parameters.server}}"}} + + iperf -c ${server} -t {{"{{.inputs.parameters.seconds}}"}} -f m -i 5 > /dev/shm/pipe diff --git a/examples/apps/iperf2/templates/server.yml b/examples/apps/iperf2/templates/server.yml new file mode 100644 index 00000000..44a63c8e --- /dev/null +++ b/examples/apps/iperf2/templates/server.yml @@ -0,0 +1,24 @@ +--- +apiVersion: frisbee.dev/v1alpha1 +kind: Template +metadata: + name: frisbee.apps.iperf2.server +spec: + service: + decorators: + telemetry: + - frisbee.system.telemetry.resources + containers: + - name: main + image: "czero/iperf2" + ports: + - name: tcp + containerPort: 5001 + command: + - /bin/sh # Run shell + - -c # Read from string + - | # Multi-line str + set -eum + cut -d ' ' -f 4 /proc/self/stat > /dev/shm/app # Sidecar: use it for entering the cgroup + + iperf -s -f m -i 5 \ No newline at end of file diff --git a/examples/apps/iperf2/templates/telemetry.yml b/examples/apps/iperf2/templates/telemetry.yml index d583f6f9..47526522 100644 --- a/examples/apps/iperf2/templates/telemetry.yml +++ b/examples/apps/iperf2/templates/telemetry.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: iperf2.telemetry.client + name: frisbee.apps.iperf2.client.telemetry spec: service: decorators: @@ -47,5 +47,5 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: iperf2.telemetry.client.config + name: frisbee.apps.iperf2.client.telemetry.config data: {{(.Files.Glob "dashboards/iperf.json").AsConfig | nindent 2}} diff --git a/examples/apps/iperf3/examples/0.server-client.yml b/examples/apps/iperf3/examples/0.server-client.yml index 3506fcc5..c2f5f391 100644 --- a/examples/apps/iperf3/examples/0.server-client.yml +++ b/examples/apps/iperf3/examples/0.server-client.yml @@ -9,7 +9,7 @@ spec: - action: Service name: server service: - templateRef: iperf3.server + templateRef: frisbee.apps.iperf3.server # Create an iperf client - action: Service @@ -19,7 +19,7 @@ spec: state: '{{.IsSuccessful "client"}} == true' metrics: 'avg() of query(wpFnYRwGk/2/bitrate, 5m, now) is below(1000)' service: - templateRef: iperf3.client + templateRef: frisbee.apps.iperf3.client inputs: - { server: server, seconds: "600" } diff --git a/examples/apps/iperf3/templates/benchmark.yml b/examples/apps/iperf3/templates/client.yml similarity index 61% rename from examples/apps/iperf3/templates/benchmark.yml rename to examples/apps/iperf3/templates/client.yml index f4a53b53..87eef33e 100644 --- a/examples/apps/iperf3/templates/benchmark.yml +++ b/examples/apps/iperf3/templates/client.yml @@ -2,27 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: iperf3.server -spec: - service: - decorators: - telemetry: - - system.telemetry.resources - - containers: # Container - - name: main - image: "networkstatic/iperf3" - ports: - - name: tcp - containerPort: 5201 - args: [ "-s", "-f", "m" ] - - ---- -apiVersion: frisbee.dev/v1alpha1 -kind: Template -metadata: - name: iperf3.client + name: frisbee.apps.iperf3.client spec: inputs: parameters: @@ -31,8 +11,8 @@ spec: service: decorators: telemetry: - - system.telemetry.resources - - iperf3.telemetry.client + - frisbee.system.telemetry.resources + - frisbee.apps.iperf3.client.telemetry containers: - name: main diff --git a/examples/apps/iperf3/templates/server.yml b/examples/apps/iperf3/templates/server.yml new file mode 100644 index 00000000..c296e8d9 --- /dev/null +++ b/examples/apps/iperf3/templates/server.yml @@ -0,0 +1,18 @@ +--- +apiVersion: frisbee.dev/v1alpha1 +kind: Template +metadata: + name: frisbee.apps.iperf3.server +spec: + service: + decorators: + telemetry: + - frisbee.system.telemetry.resources + + containers: # Container + - name: main + image: "networkstatic/iperf3" + ports: + - name: tcp + containerPort: 5201 + args: [ "-s", "-f", "m" ] diff --git a/examples/apps/iperf3/templates/benchmark-telemetry.yml b/examples/apps/iperf3/templates/telemetry.yml similarity index 93% rename from examples/apps/iperf3/templates/benchmark-telemetry.yml rename to examples/apps/iperf3/templates/telemetry.yml index f9c0c725..873bf871 100644 --- a/examples/apps/iperf3/templates/benchmark-telemetry.yml +++ b/examples/apps/iperf3/templates/telemetry.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: iperf3.telemetry.client + name: frisbee.apps.iperf3.client.telemetry spec: service: decorators: @@ -46,5 +46,5 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: iperf3.telemetry.client.config + name: frisbee.apps.iperf3.client.telemetry.config data: {{(.Files.Glob "dashboards/iperf.json").AsConfig | nindent 2}} diff --git a/examples/apps/mongodb/examples/plan.baseline.replicated.yml b/examples/apps/mongodb/examples/plan.baseline.replicated.yml index b29cf4a8..1d8fd49a 100644 --- a/examples/apps/mongodb/examples/plan.baseline.replicated.yml +++ b/examples/apps/mongodb/examples/plan.baseline.replicated.yml @@ -27,7 +27,7 @@ spec: name: loader service: - templateRef: ycsb.mongo.loader + templateRef: frisbee.apps.ycsb.mongo.loader inputs: - { server: master, workload: workloada, recordcount: "1000000", threads: "400" } @@ -37,7 +37,7 @@ spec: name: workload-a service: - templateRef: ycsb.mongo.runner + templateRef: frisbee.apps.ycsb.mongo.runner inputs: - { server: master, workload: workloada, operationcount: "1000000", threads: "40" } @@ -47,7 +47,7 @@ spec: name: workload-b service: - templateRef: ycsb.mongo.runner + templateRef: frisbee.apps.ycsb.mongo.runner inputs: - { server: master, workload: workloadb, operationcount: "1000000", threads: "40" } @@ -57,7 +57,7 @@ spec: name: workload-c service: - templateRef: ycsb.mongo.runner + templateRef: frisbee.apps.ycsb.mongo.runner inputs: - { server: master, workload: workloadc, operationcount: "1000000", threads: "40" } @@ -68,7 +68,7 @@ spec: name: workload-f service: - templateRef: ycsb.mongo.runner + templateRef: frisbee.apps.ycsb.mongo.runner inputs: - { server: master, workload: workloadf, operationcount: "1000000", threads: "40" } @@ -79,7 +79,7 @@ spec: name: workload-d service: - templateRef: ycsb.mongo.runner + templateRef: frisbee.apps.ycsb.mongo.runner inputs: - { server: master, workload: workloadd, operationcount: "1000000", threads: "40" } @@ -91,7 +91,7 @@ spec: name: reloader service: - templateRef: ycsb.mongo.loader + templateRef: frisbee.apps.ycsb.mongo.loader inputs: - { server: master, workload: workloade, dropdata: "true", recordcount: "1000000", threads: "400" } @@ -103,7 +103,7 @@ spec: name: workload-e service: - templateRef: ycsb.mongo.runner + templateRef: frisbee.apps.ycsb.mongo.runner inputs: - { server: master, workload: workloade, operationcount: "1000000", threads: "40" } diff --git a/examples/apps/mongodb/templates/cluster.yml b/examples/apps/mongodb/templates/master.yml similarity index 52% rename from examples/apps/mongodb/templates/cluster.yml rename to examples/apps/mongodb/templates/master.yml index 51d6ea2a..00db0950 100644 --- a/examples/apps/mongodb/templates/cluster.yml +++ b/examples/apps/mongodb/templates/master.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: mongodb.cluster.master + name: frisbee.apps.mongo.master spec: inputs: parameters: @@ -11,8 +11,8 @@ spec: service: decorators: telemetry: - - system.telemetry.resources - - mongo.telemetry.server + - frisbee.system.telemetry.resources + - frisbee.apps.mongo.telemetry containers: # Container - name: main @@ -70,63 +70,4 @@ spec: response=$(timeout -s QUIT 30 mongo --eval 'rs.status().ok' localhost:{{"{{.inputs.parameters.port}}"}} --quiet) if ["$response" != "1"]; then exit 1 - fi - ---- -apiVersion: frisbee.dev/v1alpha1 -kind: Template -metadata: - name: mongodb.cluster.slave -spec: - inputs: - parameters: - port: "27017" - service: - decorators: # Decorators - telemetry: [ system.telemetry.resources, mongo.telemetry.server/telegraf ] - - containers: # Container - - name: main - image: bitnami/mongodb - ports: - - name: to-clients - containerPort: {{"{{.inputs.parameters.port}}" | int}} - command: - - /bin/sh # Run shell - - -c # Read from string - - | # Multi-line str - set -eum - cut -d ' ' -f 4 /proc/self/stat > /dev/shm/app # Sidecar: use it for entering the cgroup - - echo "Create Mongo configuration" - cat > /tmp/mongod.conf < /dev/shm/app # Sidecar: use it for entering the cgroup + + echo "Create Mongo configuration" + cat > /tmp/mongod.conf < /dev/shm/app # Sidecar: use it for entering the cgroup - - rm -rf /store/$${HOSTNAME} - mkdir -p /store/$${HOSTNAME}/pd - - # see https://github.com/tikv/pd/blob/master/conf/config.toml - - echo "Start PD server at $${HOSTNAME}" - - /pd-server \ - --client-urls=http://0.0.0.0:2379 \ - --advertise-client-urls=http://$${HOSTNAME}:2379 \ - --peer-urls=http://0.0.0.0:2380 \ - --advertise-peer-urls=http://$${HOSTNAME}:2380 \ - --data-dir=/store/$${HOSTNAME}/pd - - ---- -apiVersion: frisbee.dev/v1alpha1 -kind: Template -metadata: - name: tikv.cluster.worker -spec: - inputs: - parameters: - placementDriver: "localhost" - service: - decorators: # Decorators - telemetry: [ system.telemetry.resources, tikv.telemetry.worker ] - - volumes: # Create an ephemeral volume, backed by a file - - name: scratch-volume - ephemeral: - volumeClaimTemplate: - spec: - storageClassName: platform.storageclass.local - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 15Gi - - containers: # Container - - name: main - image: pingcap/tikv:v5.1.2 - volumeMounts: - - name: scratch-volume - mountPath: /store - ports: - - name: clusterbus - containerPort: 20160 - securityContext: - capabilities: - add: [ "SYS_RESOURCE" ] - command: - - /bin/sh # Run shell - - -c # Read from string - - | # Multi-line str - set -eum - cut -d ' ' -f 4 /proc/self/stat > /dev/shm/app # Sidecar: use it for entering the cgroup - - # increase the maximum number of open file descriptors - ulimit -n 82920 - - rm -rf /store/$${HOSTNAME} - mkdir -p /store/$${HOSTNAME}/data - - # see https://github.com/tikv/tikv/blob/master/etc/config-template.toml - cat > config.toml < /dev/shm/app # Sidecar: use it for entering the cgroup + + rm -rf /store/$${HOSTNAME} + mkdir -p /store/$${HOSTNAME}/pd + + # see https://github.com/tikv/pd/blob/master/conf/config.toml + + echo "Start PD server at $${HOSTNAME}" + + /pd-server \ + --client-urls=http://0.0.0.0:2379 \ + --advertise-client-urls=http://$${HOSTNAME}:2379 \ + --peer-urls=http://0.0.0.0:2380 \ + --advertise-peer-urls=http://$${HOSTNAME}:2380 \ + --data-dir=/store/$${HOSTNAME}/pd diff --git a/examples/apps/tikv/templates/telemetry.yml b/examples/apps/tikv/templates/telemetry.yml index d65b5d6a..eb50665b 100644 --- a/examples/apps/tikv/templates/telemetry.yml +++ b/examples/apps/tikv/templates/telemetry.yml @@ -2,7 +2,7 @@ apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: tikv.telemetry.pd + name: frisbee.apps.tikv.pd.telemetry spec: service: decorators: @@ -43,7 +43,7 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: tikv.telemetry.pd.config + name: frisbee.apps.tikv.pd.telemetry.config data: {{(.Files.Glob "dashboards/tikv-pd.json").AsConfig | nindent 2}} @@ -52,7 +52,7 @@ data: apiVersion: frisbee.dev/v1alpha1 kind: Template metadata: - name: tikv.telemetry.worker + name: frisbee.apps.tikv.worker.telemetry spec: service: decorators: @@ -95,7 +95,7 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: tikv.telemetry.worker.config + name: frisbee.apps.tikv.worker.telemetry.config data: {{(.Files.Glob "dashboards/tikv-summary.json").AsConfig | nindent 2}} {{(.Files.Glob "dashboards/tikv-troubleshooting.json").AsConfig | nindent 2}} \ No newline at end of file diff --git a/examples/apps/tikv/templates/worker.yml b/examples/apps/tikv/templates/worker.yml new file mode 100644 index 00000000..9b501f28 --- /dev/null +++ b/examples/apps/tikv/templates/worker.yml @@ -0,0 +1,68 @@ +--- +apiVersion: frisbee.dev/v1alpha1 +kind: Template +metadata: + name: frisbee.apps.tikv.worker +spec: + inputs: + parameters: + placementDriver: "localhost" + service: + decorators: # Decorators + telemetry: [ frisbee.system.telemetry.resources, frisbee.apps.tikv.worker.telemetry ] + + volumes: # Create an ephemeral volume, backed by a file + - name: scratch-volume + ephemeral: + volumeClaimTemplate: + spec: + storageClassName: platform.storageclass.local + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 15Gi + + containers: # Container + - name: main + image: pingcap/tikv:v5.1.2 + volumeMounts: + - name: scratch-volume + mountPath: /store + ports: + - name: clusterbus + containerPort: 20160 + securityContext: + capabilities: + add: [ "SYS_RESOURCE" ] + command: + - /bin/sh # Run shell + - -c # Read from string + - | # Multi-line str + set -eum + cut -d ' ' -f 4 /proc/self/stat > /dev/shm/app # Sidecar: use it for entering the cgroup + + # increase the maximum number of open file descriptors + ulimit -n 82920 + + rm -rf /store/$${HOSTNAME} + mkdir -p /store/$${HOSTNAME}/data + + # see https://github.com/tikv/tikv/blob/master/etc/config-template.toml + cat > config.toml <