YugabyteDB-Samples / yb-workload-simulator

Extensible workload application for YugabyteDB.
Apache License 2.0
6 stars 8 forks source link

[FEATURE REQUEST] Use Spring configuration instead of custom variables #19

Open yogendra opened 1 year ago

yogendra commented 1 year ago

Currently, documented procedure for supplying database information is node,port, dbname, etc. We can use standard spring attributes instead. You can provide these via program argument, JVM Argument or Environment variables. Here is a quick ref list

Description JVM Arg / Program Arg Environment Var
DB Server Name spring.datasource.hikari.data-source-properties.serverName SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_SERVERNAME
DB Server Port spring.datasource.hikari.data-source-properties.portNumber SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_PORT
DB Name spring.datasource.hikari.data-source-properties.databaseName SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_DATABASENAME
DB User spring.datasource.hikari.username SPRING_DATASOURCE_HIKARI_USERNAME
DB Password spring.datasource.hikari.password SPRING_DATASOURCE_HIKARI_PASSWORD
akscjo commented 1 year ago

@yogendra I created the short variables to ease with the typing the name in the the script. I can replace them with regular environment variables but then it makes it harder to type it in. Most folks(SEs) create the start.sh script and pass the values as -D parameters. Thoughts?

yogendra commented 1 year ago

Yeah works that way too.