mhjort / clojider Goto Github PK
View Code? Open in Web Editor NEWAWS Lambda powered, distributed load testing tool for Clojure
License: Apache License 2.0
AWS Lambda powered, distributed load testing tool for Clojure
License: Apache License 2.0
Hey @mhjort , thanks for merging my PR on the clj-gatling side, would you mind bumping the version here, and releasing a new Clojider too when you get a chance? We'd really like to use the new scenario specific context in our tests. Thanks! :)
At the moment Clojider use version 0.7.x of clj-gatling which uses older format for specifying tests.
Hi, I am trying to set up Clojider and keep running into this issue with the IAM Roles.
Creating role clojider-role-us-east-1 with policy clojider-policy-us-east-1
clojider already exists. Skipping creation.
Uploading code to S3 from target/try-clojider-0.1.0-SNAPSHOT.jar
Creating Lambda function clojider-load-testing-lambda to region us-east-1
Exception in thread "main" com.amazonaws.services.lambda.model.InvalidParameterValueException: The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: fa3482ad-2d7c-11e8-aa56-29beccbd238b), compiling:(/private/var/folders/f9/s61lc0fn6ss1_fsy7f1yhg2h0000gn/T/form-init7247895295587934841.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7391)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
at clojure.main$load_script.invokeStatic(main.clj:275)
at clojure.main$init_opt.invokeStatic(main.clj:277)
at clojure.main$init_opt.invoke(main.clj:277)
at clojure.main$initialize.invokeStatic(main.clj:308)
at clojure.main$null_opt.invokeStatic(main.clj:342)
at clojure.main$null_opt.invoke(main.clj:339)
at clojure.main$main.invokeStatic(main.clj:421)
at clojure.main$main.doInvoke(main.clj:384)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
This was run with:
lein run install -r us-east-1 -b clojider -f target/try-clojider-0.1.0-SNAPSHOT.jar
I am have the region set in ~/.aws/config
[default]
region = us-east-1
and credentials at ~/.aws/credentials
.
Thanks,
Jonathan
Thanks for Clojider and clj-gatling!
I run into the following exception when trying to run my own simulations on Lambda:
Caused by: java.lang.ClassNotFoundException: scala.collection.mutable.HashMap
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2211)
at clojure.lang.RT.classForNameNonLoading(RT.java:2224)
at clojider_gatling_highcharts_reporter.generator$loading__5569__auto____1078.invoke(generator.clj:1)
at clojider_gatling_highcharts_reporter.generator__init.load(Unknown Source)
at clojider_gatling_highcharts_reporter.generator__init.<clinit>(Unknown Source)
This is from the Lambda logs. On the client where I init the run, it surfaces like this:
$ lein run load-lambda -r eu-west-1 -b nblumoe-load-testing -c 1 -d 6 -s nblumoe.gatling/read-only-simulation
Running simulation nblumoe.gatling/read-only-simulation with options {:concurrency 1, :nodes 1, :timeout 5000, :duration #object[org.joda.time.Seconds 0x3ec8c874 PT6S], :region eu-west-1, :bucket nblumoe-load-testing, :simulation nblumoe.gatling/read-only-simulation}
Starting AWS Lambda executor with id: 0
Invoking Lambda for node: 0
nblumoe-load-testing already exists. Skipping creation.
Downloading nil from nblumoe-load-testing
Parsing log file(s)...
19:13:42.770 [main] INFO i.g.c.result.reader.FileDataReader - Collected List() from input
Syntax error (IllegalArgumentException) compiling at (/private/var/folders/rm/7dw9bw5d5pj7lg41n5j77mww0000gn/T/form-init6743625326106399828.clj:1:125).
requirement failed: simulation directory doesn't contain any log file.
I have :uberjar-exclusions [#"scala.*"]
in the project.clj
and updates the standalone jar on S3.
I don't get the error from above when a run an example simulation though:
$ lein run load-lambda -r eu-west-1 -b nblumoe-load-testing -c 1 -d 6 -s clojider.examples/ping-simulation
Am I missing something in my setup?
From here:
clojider/src/clojider/core.clj
Line 10 in 7177de5
to here:
clojider/src/clojider/runner.clj
Line 42 in 7c6d00d
So this is more of an idea, but Fargate could provide a ~easy runtime without the 5 minute hard upper limit of execution time in AWS Lambda.
If you have to delete a function, you are currently also forced to go and delete the role and policy so that the install
function can work again.
If the code that sets up the role and policy could be made idempotent, then the whole install
procedure can be idempotent.
This would also remove the need for a separate update
call. Alternatively, the update
call could idempotently create the function first, and we leave install
alone.
Setup/teardown could be used for some warm-up tasks. For example the last tests I wrote use following pattern
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.