In order to execute a load test with the edamame
command line interface or graphical user interface, you will need the following:
kubectl
, a command line tool for working with Kubernetes clusters, should be installed (ensure you have v. 1.14 or greater which supports Kustomization files).eksctl
, a command line tool for working with EKS clusters, should be installed.Make
, a build automation tool used to build executable programs and libraries from source codeGo
,the programming language used by K6.Helm
, a package manager for Kubernetes.npm install
followed by the command npm link
.Usage: edamame init --zones <comma_separated_list_of_desired_availability_zones_in_your_preferred_aws_region>
Example: edamame init --zones us-west-2a,us-west-2b,us-west-2d
Outputs:
[09:15:51:909] ℹ Creating Edamame cluster... (this may take up to 20 minutes)
[09:34:27:582] ✔ Successfully created Edamame cluster.
[09:34:27:583] ℹ Configuring EBS credentials...
[09:35:14:030] ✔ Successfully configured EBS credentials.
[09:35:14:030] ℹ Setting up AWS Load Balancer Controller...
[09:36:16:613] ✔ Set up AWS Load Balancer Controller.
[09:36:17:446] ℹ Deploying Grafana, Postgres, & K6 Operator...
[09:36:49:854] ✔ Cluster configured. Welcome to Edamame!
Notes:
edamame init
.admin
and admin
). In Grafana, navigate to the Dashboards. From within the default HTTP & WebSockets dashboard, select the test name
for the data you wish to view. If no tests have been run, you may see an error until there are test names in the database to display.Usage: edamame run --file {/path/to/test.js} --name "<desired name>" --vus-per-pod <num_vus>
Alternative usage:edamame run -f {/path/to/test.js} -n "<desired name>" -v <num_vus>
Outputs:
[07:24:33:021] ℹ Initializing load test...
[07:24:33:027] ✔ Successfully initialized load test.
[07:24:33:027] ℹ Provisioning load test resources (2 generators)...
[07:25:11:079] ✔ Successfully provisioned load test resources.
[07:25:11:080] ℹ Running load test...
[07:28:12:527] ✔ Load test completed.
[07:28:12:527] ℹ Tearing down load generating resources.
[07:28:48:630] ✔ Successfully removed load generating resources from cluster.
Notes:
example
, then the command could be executed as: edamame run --file {/relativepath/to/test.js} --name example
. If the test's name is example test
, then the command would need to be executed as: edamame run --file {/relativepath/to/test.js} --name "example test"
.edamame
will read the max number of VUs directly from the provided test script, there is no need to provide this as additional argument to edamame run
. To see how to specify number of VUs in the test script, see the k6 documentation.k6_tests
directory. For example, ./k6_tests/test1.js
(relative path specified from the root project directory).5s
in the Grafana dashboard, and select the test name
of the currently running test.Usage: edamame stop
Outputs:
[03:34:20:399] ℹ Stopping current test...
[03:34:53:785] ✔ Stopped current test.
Usage: edamame get --all
Outputs:
[07:27:37:430] ℹ Retrieving information about historical tests...
[07:27:39:705] ✔ Successfully retrieved historical test data. Test names are listed under (index).
┌─────────────────┬────────────────────────────┬────────────────────────────┬─────────────┐
│ (index) │ start time │ end time │ status │
├─────────────────┼────────────────────────────┼────────────────────────────┼─────────────┤
│ example │ '2023-03-20T23:20:03.744Z' │ null │ 'running' │
│ 50K VUs │ '2023-03-20T22:52:48.864Z' │ '2023-03-20T22:55:04.873Z' │ 'completed' │
└─────────────────┴────────────────────────────┴────────────────────────────┴─────────────┘
Note: The names of tests are shown under the (index) column. To view an individual test only or the contents of a test script, please run edamame get --name "<test name>"
.
Usage: edamame get --name "<test name>"
Alternative Usage: edamame get -n "<test name>"
Outputs:
[06:33:08:621] ℹ Retrieving details about the test named: 'example'...
[06:33:09:554] ✔ Successfully retrieved data about the test named: 'example.'
┌─────────┬────────────────────────────┬────────────────────────────┬─────────────┐
│ (index) │ start time │ end time │ status │
├─────────┼────────────────────────────┼────────────────────────────┼─────────────┤
│ example │ '2023-03-20T22:52:48.864Z' │ '2023-03-20T22:55:04.873Z' │ 'completed' │
└─────────┴────────────────────────────┴────────────────────────────┴─────────────┘
Test script content:
-----------------------------------------------------------------------------------
"import http from ''k6/http'';
import { check } from ''k6'';
export const options = {
scenarios: {
shared_iter_scenario: {
executor: \"shared-iterations\",
vus: 10,
iterations: 100,
startTime: \"0s\",
},
per_vu_scenario: {
executor: \"per-vu-iterations\",
vus: 20,
iterations: 10,
startTime: \"10s\",
},
},
};
export default function () {
const result = http.get(''https://test-api.k6.io/public/crocodiles/'');
check(result, {
''http response status code is 200'': result.status === 200,
});
}
"
Note: Please specify the test name in double quotes when executing this command if the test name includes spaces. For example, if the test name is example test
, then this command would be executed as: edamame get -n "example test"
. If your test name is one word or is hyphenated, then you can exclude the quotes.
Usage: edamame delete "<test name>"
Outputs:
[07:59:41:686] ℹ Deleting the test named: 'example'...
[07:59:42:850] ✔ Deleted the test named: 'example'
Note: If your test name is one word and doesn't contain spaces, then you don't need to include quotes when executing this command. The example output above resulted from executing edamame delete example
. If your test name contains spaces, like example test
, then you would execute this command using quotes like the following: edamame delete "example test"
.
Usage: edamame update --current "<current test name>" --new "<new proposed name>"
Alternative usage: edamame update -c "<current test name>" -n "<new proposed name>"
Outputs:
[08:07:46:290] ℹ Updating test name from 'example test' to '50k VU test'...
[08:07:51:044] ✔ Successfully updated test's name to: '50k VU test'
Note: If either your current or proposed test name is one word and doesn't contain spaces, then you don't need to include quotes around that name when executing this command.
Usage: edamame grafana --start
Outputs:
[07:31:01:842] ℹ Configuring local access to grafana dashboard...
[07:31:34:711] ✔ Please find your Grafana dashboard at: http://localhost:3000
Usage: edamame grafana --stop
Outputs:
[12:07:38:477] ℹ Stopping grafana
[12:07:38:774] ✔ Grafana dashboard has been removed
Usage: edamame dashboard --start
Outputs:
[12:00:32:022] ℹ Configuring local access to grafana dashboard...
[12:01:02:671] ✔ Please find your Grafana dashboard at: http://localhost:3000
[12:00:32:022] ℹ Initializing your dashboard
[12:01:02:671] ℹ Installed packages for your backend
[12:00:32:022] ℹ Installed packages for your frontend
[12:00:32:022] ℹ Generated frontend build
[12:01:02:671] ✔ Your dashboard is now running at http://localhost:3001
Usage: edamame dashboard --stop
Outputs:
[02:17:24:140] ℹ Stopping dashboard
[02:17:24:520] ✔ Dashboard has been removed
Usage: edamame archive --all
Alternative Usage: edamame archive --name testName --storage desiredStorageClass
Outputs:
$ edamame archive --name "100K VUs"
[04:08:56:294] ℹ Starting archive process...
[04:08:56:297] ℹ No S3 storage class has been specified, so the default STANDARD S3 storage class will be used.
[04:08:56:544] ℹ Creating load test AWS S3 Bucket located in: aws-region=us-west-2
if it doesn't exist yet...
[04:09:01:715] ℹ AWS S3 Bucket is ready for uploads.
[04:09:03:366] ℹ Successfully archived 100K VUs.
[04:09:03:366] ✔ Archive process complete.
$ edamame archive --all --storage INTELLIGENT_TIERING
[01:57:28:276] ℹ Starting archive process...
[01:57:28:538] ℹ Creating load test AWS S3 Bucket located in: aws-region=us-west-2
if it doesn't exist yet...
[01:57:30:170] ℹ AWS S3 Bucket is ready for uploads.
[01:57:33:187] ℹ Successfully archived 45f4d3e5-5c52-4f3e-88e2-17a085b1c80f.
[01:57:34:728] ℹ Archive for 100k VUs already exists. Skipping to next step.
[01:57:34:728] ✔ Archive process complete.
Uploads 1 or more load tests to an AWS S3 Bucket as S3 objects with either the default STANDARD S3 storage class or the user's specified storage class. The bucket will be created in the same region that the user's AWS CLI is configured with.
Purpose: allow user to back up their load test data to AWS S3 in case they need or want to teardown their Edamame EKS cluster, but want to persist their load test data beyond the life of the cluster. A user should execute this command prior to executing edamame teardown
.
A user can select any of the following valid storage class options:
The available storage options have different associated fees & availability SLAs. Some of the classes also have retrieval charges and minimum storage duration charges. Be sure to read more about the options at the following links to make sure you specify the right class for your storage needs.
There isn't currently support for changing the S3 object's storage class to another class via the Edamame CLI outside of restoring the object (see edamame restore
for more details). If a user wants to change the storage class they can do so, but will need to use the AWS CLI or management console.
Usage: edamame delete-from-archive --all
Alternative Usage: edamame delete-from-archive --name "100K VUs"
Outputs:
[04:17:18:812] ℹ Starting archival deletion process...
[04:17:21:787] ✔ Successfully deleted 100K VUs from your Edamame load test AWS S3 Bucket.
Usage: edamame archive-contents
Outputs:
[11:59:14:955] ℹ Loading AWS S3 Bucket archive details...
[11:59:17:351] ✔ Your Edamame load test AWS S3 Bucket contains the following load test S3 objects:
> 100kVUs.tar.gz
> 120kVUs.tar.gz
Usage: edamame import-from-archive --all
Alternative Usage: edamame import-from-archive --name testName
Outputs:
$ edamame import-from-archive --name "100K VUs"
[02:29:28:602] ℹ Starting process to import AWS S3 archived data into Postgres database...
[02:29:31:507] ℹ Successfully imported the test 100kVUs from your AWS S3 Bucket.
[02:29:31:554] ✔ Completed importing data from AWS S3.
edamame import-from-archive
immediately after edamame init
to avoid name collisions.Usage: edamame restore --name testName --days 10
Outputs:
[02:25:18:043] ℹ Starting restoration of AWS S3 object...
[02:25:19:060] ✔ AWS S3 restoration process is in progress. Once it's complete you can import data associated with testName into your current Edamame EKS cluster or move the S3 object elsewhere.
edamame import-from-archive
immediately after executing edamame restore
.Usage: edamame teardown
Outputs:
[07:58:47:060] ℹ Tearing Down Edamame Cluster...
[08:10:11:675] ✔ Deleted Edamame Cluster
Notes: