WindowsFileConfigurator Operator
The WindowsFileConfigurator operator allows configuring systems tuned by Akamas by interpolating configuration parameters into files on remote Windows machines.
The operator performs the following operations:
It reads an input file from a remote machine containing templates for interpolating the configuration parameters generated by Akamas
It replaces the values of configuration parameters in the input file
It writes the file with replaced configuration parameters on a specified path on another remote machine
Access on remote machines is performed using WinRM
Templates for configuration parameters
The Windows File Configurator allows writing templates for configuration parameters in two ways:
a single parameter is specified to be interpolated:
all parameters of a component to be interpolated:
Adding a suffix or prefix for interpolated parameters
It is possible to add a prefix or suffix to interpolated configuration parameters by acting at the component-type level:
In the example above, the parameter x1
will be interpolated with the prefix PREFIX
and the suffix SUFFIX
, ${value}
will be replaced with the actual value of the parameter at each experiment.
Example
Suppose we have the configuration of the following parameters for experiment 1 of a study:
where component1
is of type MyComponentType
defined as follows:
A template file to interpolate only parameter component1.param1
and all parameters from component2
would look like this:
The file after the configuration parameters are interpolated would look like this:
Note that the file in this example contains a bash command whose arguments are constructed by interpolating configuration parameters. This represents a typical use case for the WindowsFileConfigurator: to construct the right bash commands that configure a system with the new configuration parameters computed by Akamas.
Operator arguments
source
and target
structure and arguments
source
and target
structure and arguments Here follows the structure of either the source
or target
operator argument
Get operator arguments fromcomponent
component
The component
argument can be used to refer to a Component by name and use its properties as the arguments of the operator. In case the mapped arguments are already provided to the operator, there is no override.
Notice that in this case, the operator replaces in the template file only tokens referring to the specified component. A parameter bound to any component causes the substitution to fail.
Component property to operator argument mapping
Examples
Configure parameters for an Apache server with explicit source and target information
Configure parameters for an Apache server with information taken from a Component
Where the apache-server-1
component is defined as:
Last updated