MATRIXX Miscellaneous Utilities

The MATRIXX Misc image includes utilities and files to aid in the deployment and operation of cloud native MATRIXX.

In the following utility run commands, version is the MATRIXX release version. For example, 5251.

To see a list of available utilities run the image with no arguments:
docker run --rm ${DOCKER_REGISTRY}/matrixx-misc:version
These examples assume that you are not running the utilities in the matrixx-misc container. If you must run commands directly within the container and do not want to use the utility help, you can use the following command to create an interactive session:
docker run --rm -it --entrypoint /bin/bash ${DOCKER_REGISTRY}/matrixx-misc:version
To generate a complete list of the matrixx-misc JAR files, run the following command:
docker run --rm -it --entrypoint /bin/bash ${DOCKER_REGISTRY}/matrixx-misc:version -c "ls -l *.jar"

The following utilities are included with the MATRIXX miscellaneous utilities.

Converter

The Converter utility calls converter.jar, which converts between MATRIXX Data Container (MDC) and other formats.

For example, to convert a file, test.xml, in the current working directory on the host to MDC and print to STDOUT, run the following command:
docker run --rm -v `pwd`/test.xml:/in/test.xml ${DOCKER_REGISTRY}/matrixx-misc:version Converter -v -out:stdout -in:xml /in/test.xml
The Converter utility is a Java process so you can specify other JVM arguments. For example, to do a dry run of the command above, add the --dry-run JVM argument:
docker run --rm -v `pwd`/test.xml:/in/test.xml ${DOCKER_REGISTRY}/matrixx-misc:version Converter -v -out:stdout -in:xml /in/test.xml -DmyJvmArgs=123 --dry-run
To view a full list of commands for the Converter utility, call it with no arguments:
docker run --rm ${DOCKER_REGISTRY}/matrixx-misc:version Converter

For more information about the Converter utility, see the discussion about converter.jar.

ExtractFile

The ExtractFile utility extracts sample files from the matrixx-misc image. You must specify the name of the file to extract from /opt/mtx/bin, which is copied to /out. For example, to extract the extension-archetype.jar file used by the Business API SDK, run the following command:
docker run --rm -v `pwd`:/out ${DOCKER_REGISTRY}/matrixx-misc:version extractFile extension-archetype.jar

For information about the Business API SDK, see MATRIXX Business API SDK.

JavaApiGenerator

The JavaApiGenerator utility calls the javaApiGenerator.jar, which generates Java classes from MDC definitions. Files include:
  • sample_java_client-4200.jar
  • sample_java_client-4200_src.jar
  • sample_java_client-4300.jar
  • sample_java_client-4300_src.jar
  • sample_java_client-4500.jar
  • sample_java_client-4500_src.jar
  • sample_java_client-5000.jar
  • sample_java_client-5000_src.jar
You must copy the custom data containers to the image before generating the Java classes.
Note: The /out directory must have write permission.
For example, to generate the Java classes in the current directory, run the following command:
docker run --rm -v /tmp/mdc_config_custom.xml:/opt/mtx/conf/mdc_config_custom.xml `pwd`:/out $DOCKER_REGISTRY/matrixx-misc:version JavaApiGenerator -output:/home/deploy/xsd/out -xsd:".*"
After running the utility, the following files are added to the output directory and are used by the example Java application:
  • dataContainer.jar file — Has the Java classes for MDCs.
  • platform.jar file — Has platform files required by the example Java client application.
  • gen_docs directory — Has the code-generated Java classes.
  • genxsd directory — Has XSD files for XML validation.

For more information about the JavaApiGenerator utility, see the discussion about JavaApiGenerator.jar. For information about the using the Java APIs, see the discussion about using the MATRIXX Java API in MATRIXX Subscriber Management API.

ProcessBulkCSV

The ProcessBulkCSV utility calls the process_bulk_csv.py script. For example, to load a Users CSV file from the host, run the following command:
docker run --rm -v `pwd`:/bulk $DOCKER_REGISTRY/matrixx-misc:version ProcessBulkCSV -f /bulk/users.csv -t BulkUserCreation

For more information, see the discussion about running RS Gateway bulk operations in MATRIXX Subscriber Management API.

YamlConfigConverter

The YamlConfigConverter utility calls the yamlConfigConverter.jar which is used to convert .properties files to YAML. See the discussion about converting properties files for more information.

For example to convert a test.properties file in the current host directory to test.yaml, run the following command:
docker run --rm -v `pwd`:/in $DOCKER_REGISTRY/matrixx-misc:version-SNAPSHOT YamlConfigConverter -out:/in /in/test.properties