Configuration Tool¶
The rtctkConfigTool
is a command line tool used to inspect, retrieve and manipulate
configuration data from the Persistent Configuration Repository
and the Runtime Configuration Repository.
Metadata Initialisation¶
To use the Runtime Configuration Repository that is using the OLDB backend, the RTC Toolkit specific
metadata instances need to be initialised in the CII configuration service, i.e. the type metadata
for RtcInt32
, RtcDouble
, RtcMatrixDouble
etc.
This only needs to be done once for a new instance of the OLDB.
The --init-metadata
option is available in the configuration tool to easily set this metadata
up. One can run the command as follows:
$ rtctkConfigTool --init-metadata
The command is idempotent and can be run multiple times without any change after the first initialisation. In addition, any RTC Toolkit metadata instance that is changed after this command was applied will be overwritten to their default values by running this command again.
Operations¶
ConfigTool allows different kinds of operations on a repository.
The following operations are possible:
get
set
delete
list
read
write
get-type
populate-from
Get¶
Get is used to retrieve the contents of a single DataPoint. You have to specify the repository and the path to the DataPoint you want to get.
Example¶
$ rtctkConfigTool --repo file:/repo --path /data/my_data_point --get
Set¶
Set is used to change or create a DataPoint. If the DataPoint does not exist it will be created with
the type given by --type
. Otherwise the type of the existing DataPoint has to match the type
given by --type
. Currently only scalar types are accepted. For Vectors and Matrices use the
write operation.
Example¶
$ rtctkConfigTool --repo file:/repo --path /data/my_data_point --set --type RtcInt32 --value 42
Delete¶
Delete removes a DataPoint given by --repo
and --path
.
Example¶
$ rtctkConfigTool --repo file:/repo --path /data/my_data_point --delete
List¶
Shows the sub-paths and datapoints within a DataPoint path given by --repo
and --path
.
Example¶
$ rtctkConfigTool --repo file:/repo --path /data/ --list
Data Points:
RtcInt32: /data/my_data_point
Sub Paths:
Read¶
Read can be used to write the contents of a DataPoint to a FITS file.
The fits file is given using the --file
argument.
Example¶
$ rtctkConfigTool --repo file:/repo --path /my_data_point --read --file data_dump.fits
Write¶
Write can be used to write the contents of a FITS file into a DataPoint.
The fits file is given using the --file
argument.
Example¶
$ rtctkConfigTool --repo file:/repo --path /my_data_point --write \
--file my_new_data_point_data.fits
Get-type¶
Get-type can be used to get the type of a DataPoint in the repository.
Example¶
$ rtctkConfigTool --repo file:/repo --path /my_data_point --get-type
RtcInt32
Populate-from¶
Populates the Runtime Configuration Repository indicated by --repo
with the deployment
information stored in the Persistent Configuration Repository indicated by --populate-from
.
The logic to populate the repository is the same as is used during the initialisation stage of the
RTC Supervisor. This provides a mechanism to manually trigger the population logic rather than
performing it automatically by RTC Supervisor.
Example¶
$ rtctkConfigTool --repo file:/runtime_repo --populate-from file:/persistent_repo
Note
Currently Deployment Sets are not being handled. A 1-to-1 copy of the datapoints is simply made from one repository to the other. Deployment Sets will be properly implemented in future versions of the RTC Toolkit.
Differences From the Design Document¶
In the alpha release only the command line interface is implemented.
The repo argument does not take “persistent” or “runtime” but rather a URI to the repository. Currently the supported URI schemes are
file
andcii.oldb
, where the later corresponds to the Runtime Configuration Repository.