[AIAB-03] Create the workflow
You can now create a new workflow that you will use in your optimization study.
A workflow in an optimization study is typically composed of the following tasks:
Apply a new configuration of the selected optimization parameters to the target system: in this example, you will leverage the Akamas FileConfigurator operator - this operator can be used to write parameter values into a generic file, which could represent a shell script, an application configuration file, or any other file used to apply parameters to the target systems
Restart the application (optional): in this example, the Konakart docker container needs to be restarted in order to launch the Konakart JVM for the new configuration to be effectively applied
Launch the performance test using LRE
To create the optimization workflow, update the workflow-optimize.yaml
file replacing the correct references to your environment:
Make sure to replace the placeholders with the correct references to your environment:
hostname should reference your Konakart instance in place of the placeholder target_host
username and key must reflect your Konakart instance user and SSH private key file (also change the path /home/jsmith)
path and commands should have the correct file paths to Docker Compose files
Regarding the LoadRunnerEnterprise operator, update the configuration above with the actual values of:
address: the FQDN of your LRE farm (LRE server)
username: and password the credentials of the LRE user
project: the name of the project created on LRE
domain: the domain of the project you created on LRE
tenantID: the tenant of your project (if multi-tenancy is enabled)
testId: the id of your test on LRE
testSet: the test set name your test belongs to
timeSlot: the time slot reserved by Akamas on LRE to run your tests
verifySSL: it configures Akamas to validate the SSL configuration or skip it (useful for self-signed certificates)
For more information about the configurations available for LoadRunner Enterprise, please refer to LRE dedicated integration guide.
Once you have edited this file, run the following command to create the workflow:
Enable parameter configuration
In the workflow, the FileConfigurator operator is used to automatically apply the configuration of the JVM parameters at each experiment. In order for this to work, you need to allow Akamas to set the parameter values being tested in each experiment. This is made possible by the following Akamas templating approach:
locate your application configuration file where the optimization parameters need to be set
find the place where the parameter that need to be optimized is specified - for example, the heap size of the JVM:
tomcat_jvm_heapsize=1024
replace the hardcoded value with the Akamas parameter template string, where you specify both the component name and the name of the Akamas parameter - for example:
tomcat_jvm_heapsize=${jvm.maxHeapSize}
at this point, every time the FileConfiguration operator is invoked in your workflow, a new application configuration file will be created where each of the parameter templates replaced with the parameter values being tested by Akamas in the corresponding experiment (e.g.
tomcat_jvm_heapsize=537
).
Therefore, you will now prepare the Konakart configuration file (a Docker Compose file).
First of all, you want to inspect the Konakart configuration file by executing the following command:
which should return the following output, where you can see that the JAVA_OPTS variable specifies a maximum heap size of 256 MB:
In order to allow Akamas to be able to apply this hardcoded heap size value (and any other required as optimization parameter) at each experiment, you need to prepare a new Konakart Docker Compose file docker-compose.yml.templ
where you can put the Akamas parameter template.
First, copy the Docker Compose file and rename it so as to keep the original file:
Now, edit this file docker-compose.yml.templ
file and replace the hardcoded value for the JAVA_OPTS variable with the Akamas parameter template:
aside positive
Notice that instead of specifying one single parameter at a time, Akamas also allows you to put wildcards ('*') and have all the JVM parameters replaced in place.
Therefore, the FileConfigurator operator in your workflow will expand all. the JVM parameters and replace them with the actual values provided by Akamas AI-driven optimization engine.
At this point, you are ready to create your optimization study!
Last updated