Generating Application Configuration YAML File from DAA2Config Command-Line Tool
The command-line tool DAA2Config is a standalone tool to generate a YAML file with default values, Log4j configuration file (node-log4j.xml), and node JVM arguments (node_jvm_parameters.config.yaml) with the default configuration. You need to pass application DAA as an input.
If the DAA does not have all required resource templates, DAA2Config tool creates those resource templates with the default values. You can update the configuration by editing the file in a text editor or by uploading it to the Application Configurator.
- Ensure that you have Java 11 installed on your machine and you have set
JAVA_HOMEas an environment variable. - You must have write permission on the folder that contains the DAA and the output location folder; otherwise, a permission error is displayed.
- Procedure
- Navigate to the
amsgce-runtime-<version>\daautil\binfolder. -
Run the following command to generate the YAML configuration file from DAA:
For Linux Platform:
./DAA2Config --daaFile <daa file location> --outputLocation <output location>
Example (For Linux Platform):
./DAA2Config --daaFile /home/amsgce-runtime-<version>/samples/bookstore/com.tibco.restbt.sample.bookstore/DeploymentArtifacts/com.tibco.restbt.sample.bookstore.daa
For Windows Platform:
DAA2Config.exe --daaFile <daa file location> --outputLocation <output location>
Example (For Windows Platform):
DAA2Config.exe --daaFile C:\amsgce-runtime-1.0.1\samples\bookstore\com.tibco.restbt.sample.bookstore\DeploymentArtifacts\com.tibco.restbt.sample.bookstore.daa
For more information about the arguments that you can specify when running the command, see DAA2Config Command Reference. Output location is an optional argument. If it is not provided, the DAA2Config tool generates all artifacts in the same folder where the DAA file is.
Sample CLI Output:
D:\KONEX101\amsgce-runtime-1.0.1\daautil\bin>DAA2Config.exe --daaFile D:\Konex\com.tibco.restbt.sample.bookstore\com.tibco.restbt.sample.bookstore.daa 2021/07/05 10:36:40 log file location : D:\KONEX101\amsgce-runtime-1.0.1\runtime\build\logs/DAA2Config_2021-07-05-10-36-40.log 2021/07/05 10:36:40 java is available at C:\Program Files\Java\jdk-11.0.5\bin\java.exe 05 Jul 2021 10:36:42,592 [main] [INFO ] com.tibco.amxce.rdacompiler - RDACompiler 5.0.1 Invoking createConfigFile -nodeName AMXCENode -envName AMXCEEnvironment -daaFile D:\Konex\com.tibco.restbt.sample.bookstore\com.tibco.restbt.sample.bookstore.daa 05 Jul 2021 10:36:51,291 [main] [INFO ] com.tibco.amxce.daa2config - Successfully created application config file for DAA 'com.tibco.restbt.sample.bookstore.daa' at 'D:\Konex\com.tibco.restbt.sample.bookstore\com.tibco.restbt.sample.bookstore.config.yaml'
- Application configuration YAML file
- Node JVM parameters configuration file
- Log4j configuration file
If no output location is provided, all files are generated in the same folder where the DAA file is located. For more information about the YAML file, see Understanding Application Configuration YAML File.
Sample com.tibco.restbt.sample.bookstore.config.yaml
configVersion: 1.0.0
name: com.tibco.restbt.sample.bookstore
daaName: com.tibco.restbt.sample.bookstore.daa
appTemplate: com.tibco.restbt.sample.bookstore
appTemplateVersion: 1.0.0.v2018-11-06-1349
description: Add description here
environment: AMXCEEnvironment
node: AMXCENode
properties:
- name: '[Service]BookStoreResource/RESTService_Binding1/httpConnectorName'
type: HTTPConnector
value: httpConnector_bookstore
services:
- name: BookStoreResource
restBindings:
- name: RESTService_Binding1
applicationPath: /bookstore
interfaceName: '{http://ns.tibco.com/BookStoreResource/}BookStoreResource'
restServiceOperationConfiguration:
- httpMethod: GET
mediaType: STANDARD_JSON
operationName: getBookList
path: /books
- httpMethod: GET
mediaType: STANDARD_JSON
operationName: getBookByTitle
path: /book/{title}
- httpMethod: POST
mediaType: STANDARD_JSON
operationName: addBook
path: /addbook
- httpMethod: GET
mediaType: STANDARD_JSON
operationName: getBookByTitleCategory
path: /book/{title}/{category}
restTransportConfigDesc:
httpConnectorJNDIName: httpConnector_bookstore
skipJsonRespNamespace: false
resources:
httpConnectors:
- name: httpConnector_bookstore
operation: ADD
host: 0.0.0.0
port: '7777'
You can use the generated configuration to containerize an application. For more information, see