cloudspannerecosystem / machmeter Goto Github PK
View Code? Open in Web Editor NEWQuickly perform Cloud Spanner POCs using Machmeter.
Home Page: https://cloudspannerecosystem.dev/machmeter/
License: Apache License 2.0
Quickly perform Cloud Spanner POCs using Machmeter.
Home Page: https://cloudspannerecosystem.dev/machmeter/
License: Apache License 2.0
In some points such gkeConfig/service_account_json
and ddlConfig/schemaFilePath
the file is handled as absolute.
However, in others such jMeterTemplatePath
, it's being handled as relative to the current solution, which is confusing and made me move my configurations to the solution folder to work.
Got the problem during the following command:
kubectl cp %s -n %s \"$(kubectl get po -n %s | grep jmeter-master | awk '{print $1}'):/%s\"")
which concatenated path twice:
/Users/rgodoy/Documents/machmeter/machmeter/Users/rgodoy/Downloads/machmeter-confs/templates/data-load.jmx
The service account needs an owner
role to run, which is not reasonable to ask for. It's very risky and many customers won't be able to provision it, even in dev environments.
A solution would be to give least-privilege permissions to it in order to prevent accidents. It could also be created using the terraform as well.
An example -
It would be awesome to have a Dockerfile so it could run the solution easily in Cloud Run without the need for install and care about dependencies.
Machometer requires downloading the Service Account (SA) key which is a security risk and is in many orgs disabled by policy.
Alternatives to consider
https://cloud.google.com/blog/products/identity-security/how-to-authenticate-service-accounts-to-help-keep-applications-secure
For local testing.
A sample -
This results in errors like -
eb 22, 2023 8:46:12 AM com.google.cloud.machmeter.Orchestrator executeOrchestrator
INFO: Plugin infraSetup completed.
Feb 22, 2023 8:46:12 AM com.google.cloud.machmeter.Orchestrator executeOrchestrator
INFO: Executing ddlPlugin plugin.
/*
* Copyright 2022 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License")
Error executing: /*
* Copyright 2022 Google Inc.
We would like to deploy Jmeter GKE on existing VPC for security and networking design practices.
A sample failure during the execute
step where the cluster configuration kubectl
was different from the cluster created in setup
step -
Mar 02, 2023 11:21:55 AM com.google.cloud.machmeter.plugins.ExecutePlugin execute
INFO: Executing kubectl cp /usr/local/google/home/sunnsing/git/machmeter/machmeter/usecases/gaming/online-matchmaking/templates/data-load.jmx -n spanner-test "$(kubectl get po -n spanner-test | grep jmeter-master | awk '{print $1}'):/data-load.jmx"
Unable to connect to the server: dial tcp 34.171.187.3:443: connect: connection timed out
error: filespec must match the canonical format: [[namespace/]pod:]file/path
Fail!
Mar 02, 2023 11:23:22 AM com.google.cloud.machmeter.plugins.ExecutePlugin lambda$execute$0
INFO: Shutting down the execute...
^CFail!
^C^C^C^C^C^C
The shell process doesn't respond to ^C
and the relevant Java process has to be force killed.
Expected - Shutdown should happen by-itself or at least respond to SIGINT
and then get killed.
According to documentation, it's needed to create a service account and have it downloaded to local machine, which pose a major risks to the solution and bad example to follow.
A solution would be to impersonate the service account in order to prevent accidents. Would be great to be able to run with local logged user instead of only service accounts. Also use ADC to authenticate (https://cloud.google.com/docs/authentication/application-default-credentials).
That would make the solution more secure and easy to run!
When trying to follow the sample tutorial, in a given step Machmeter does not select the correct cluster before running commands, such as kubectl get po -n spanner-test
, causing the solution not to find the resources and not be able to continue (No resources found in spanner-test namespace.
)
When configuring slave workers/replicas (eg. ~20 replicas) , and configure non-default threads count (e.g. 500) , some of replicas throws the following errors
2023-02-17 03:08:58,420 ERROR o.a.j.t.RemoteThreadsListenerWrapper: Exception invoking listener on threadStarted.
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:300) ~[?:?]
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196) ~[?:?]
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:132) ~[?:?]
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:217) ~[?:?]
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:162) ~[?:?]
at com.sun.proxy.$Proxy19.threadStarted(Unknown Source) ~[?:?]
at org.apache.jmeter.threads.RemoteThreadsListenerWrapper.threadStarted(RemoteThreadsListenerWrapper.java:51) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:797) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:993) ~[jorphan.jar:5.5]
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:976) ~[jorphan.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:765) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:753) ~[ApacheJMeter_core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:264) ~[ApacheJMeter_core.jar:5.5]
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.