Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(loadtest): Rough cut of some gatling-based load tests for cloudd… #1666

Merged
merged 1 commit into from
Jun 6, 2017

Conversation

ajordens
Copy link
Contributor

@ajordens ajordens commented Jun 6, 2017

…river

Largely based on orca-loadtest.

@ajordens
Copy link
Contributor Author

ajordens commented Jun 6, 2017

@robzienert My scala is super weak and I really don't have experience with gatling ...

I was running from in-IDE w/

-Dgatling.http.ssl.keyStore.file=/path/to/ajordens.p12
-Dgatling.http.ssl.keyStore.password=my_password
-Dgatling.http.ssl.trustStore.file=/path/to/clouddriver.jks
-Dgatling.http.ssl.trustStore.password=my_other_password
-Dsimulation.config=/path/to/.spinnaker/clouddriver-simulation.json

@@ -0,0 +1,27 @@
tasks.compileGroovy.enabled = false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Verbatim borrowed from orca-loadtest

Copy link
Member

Choose a reason for hiding this comment

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

You may want to take a review at spinnaker/orca#1376 and roll these changes into clouddriver as well (if the PR I made looks right).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call ... I've rolled these changes in (your PR seems reasonable)

@@ -0,0 +1,22 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This can be overridden via
-Dsimulation.config=/path/to/your/clouddriver-simulation.json (doesn't have to be json)

}

if (config.fetchServerGroups.rampUsersTo > 0) {
config.fetchServerGroups.applicationFiles.foreach(a => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

each application file gets it's own scenario ... (ie. I created a filtered set of applications for evcache and ksrouter).


object ClouddriverSimulationEngine extends App {
val props = new GatlingPropertiesBuilder
props.simulationClass(classOf[ClouddriverSimulation].getName)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@robzienert Do you know if you can have a gatling.conf referenced outside of the project?

Copy link
Member

Choose a reason for hiding this comment

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

I don't believe you can, not without getting into the internals. @jonsie - Can you shed some light for us?

Copy link
Contributor

Choose a reason for hiding this comment

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

@ajordens @robzienert Gatling will read thegatling.conf in the resources or conf directory. At runtime you can also pass in Gatling configuration via system properties.

.check(status is 200)

val fetchServerGroupExpanded: HttpRequestBuilder = http(s"Fetch Server Group (expanded)")
.get("/applications/${name}/serverGroups?expand=true")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

name comes from the session

@ajordens ajordens requested a review from robzienert June 6, 2017 07:57
@robzienert
Copy link
Member

👍 Minor comments.

@ajordens ajordens merged commit bd2c24b into spinnaker:master Jun 6, 2017
@ajordens ajordens deleted the loadtest branch June 6, 2017 19:22
lwander pushed a commit to lwander/clouddriver that referenced this pull request Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants