Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
theodolite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sören Henning
theodolite
Commits
dd35de42
Commit
dd35de42
authored
3 years ago
by
Benedikt Wetzel
Browse files
Options
Downloads
Patches
Plain Diff
correct order of actions
parent
72edf7c9
No related branches found
No related tags found
1 merge request
!201
Introduce action commands
Pipeline
#5831
passed
3 years ago
Stage: build
Stage: test
Stage: check
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt
+4
-4
4 additions, 4 deletions
...lin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt
with
4 additions
and
4 deletions
theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt
+
4
−
4
View file @
dd35de42
...
@@ -46,15 +46,15 @@ class KubernetesBenchmarkDeployment(
...
@@ -46,15 +46,15 @@ class KubernetesBenchmarkDeployment(
* - Deploy the needed resources.
* - Deploy the needed resources.
*/
*/
override
fun
setup
()
{
override
fun
setup
()
{
sutBeforeActions
.
forEach
{
it
.
exec
(
client
=
client
)
}
val
kafkaTopics
=
this
.
topics
.
filter
{
!
it
.
removeOnly
}
val
kafkaTopics
=
this
.
topics
.
filter
{
!
it
.
removeOnly
}
.
map
{
NewTopic
(
it
.
name
,
it
.
numPartitions
,
it
.
replicationFactor
)
}
.
map
{
NewTopic
(
it
.
name
,
it
.
numPartitions
,
it
.
replicationFactor
)
}
kafkaController
.
createTopics
(
kafkaTopics
)
kafkaController
.
createTopics
(
kafkaTopics
)
sutBeforeActions
.
forEach
{
it
.
exec
(
client
=
client
)
}
appResources
.
forEach
{
kubernetesManager
.
deploy
(
it
)
}
appResources
.
forEach
{
kubernetesManager
.
deploy
(
it
)
}
logger
.
info
{
"Wait ${this.loadGenerationDelay} seconds before starting the load generator."
}
logger
.
info
{
"Wait ${this.loadGenerationDelay} seconds before starting the load generator."
}
Thread
.
sleep
(
Duration
.
ofSeconds
(
this
.
loadGenerationDelay
).
toMillis
())
Thread
.
sleep
(
Duration
.
ofSeconds
(
this
.
loadGenerationDelay
).
toMillis
())
loadGenResources
.
forEach
{
kubernetesManager
.
deploy
(
it
)
}
loadGenBeforeActions
.
forEach
{
it
.
exec
(
client
=
client
)
}
loadGenBeforeActions
.
forEach
{
it
.
exec
(
client
=
client
)
}
loadGenResources
.
forEach
{
kubernetesManager
.
deploy
(
it
)
}
}
}
...
@@ -66,14 +66,14 @@ class KubernetesBenchmarkDeployment(
...
@@ -66,14 +66,14 @@ class KubernetesBenchmarkDeployment(
*/
*/
override
fun
teardown
()
{
override
fun
teardown
()
{
loadGenResources
.
forEach
{
kubernetesManager
.
remove
(
it
)
}
loadGenResources
.
forEach
{
kubernetesManager
.
remove
(
it
)
}
loadGenAfterActions
.
forEach
{
it
.
exec
(
client
=
client
)
}
appResources
.
forEach
{
kubernetesManager
.
remove
(
it
)
}
appResources
.
forEach
{
kubernetesManager
.
remove
(
it
)
}
sutAfterActions
.
forEach
{
it
.
exec
(
client
=
client
)
}
kafkaController
.
removeTopics
(
this
.
topics
.
map
{
topic
->
topic
.
name
})
kafkaController
.
removeTopics
(
this
.
topics
.
map
{
topic
->
topic
.
name
})
ResourceByLabelHandler
(
client
).
removePods
(
ResourceByLabelHandler
(
client
).
removePods
(
labelName
=
LAG_EXPORTER_POD_LABEL_NAME
,
labelName
=
LAG_EXPORTER_POD_LABEL_NAME
,
labelValue
=
LAG_EXPORTER_POD_LABEL_VALUE
labelValue
=
LAG_EXPORTER_POD_LABEL_VALUE
)
)
sutAfterActions
.
forEach
{
it
.
exec
(
client
=
client
)
}
loadGenAfterActions
.
forEach
{
it
.
exec
(
client
=
client
)
}
logger
.
info
{
"Teardown complete. Wait $afterTeardownDelay ms to let everything come down."
}
logger
.
info
{
"Teardown complete. Wait $afterTeardownDelay ms to let everything come down."
}
Thread
.
sleep
(
Duration
.
ofSeconds
(
afterTeardownDelay
).
toMillis
())
Thread
.
sleep
(
Duration
.
ofSeconds
(
afterTeardownDelay
).
toMillis
())
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment