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 to the Application Configurator.
- Ensure that you have Java 11 installed on your machine and you have set
JAVA_HOMEas 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.sh -daaFile <daa file location> -outputLocation <output location>
For Windows Platform:
DAA2Config.bat -daaFile <daa file location> -outputLocation <output location>
Example (For Linux Platform):
./DAA2Config.sh -daaFile /home/amsgce-runtime-<version>/samples/bookstore/com.tibco.restbt.sample.bookstore/DeploymentArtifacts/com.tibco.restbt.sample.bookstore.daa
Example (For Windows Platform):
DAA2Config.bat -daaFile C:\amsgce-runtime-1.0.0\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:
HP-Z230-SFF-Workstation:~/amxce/amsgce-runtime-1.0.0/daautil/bin$ ./DAA2Config.sh -daaFile /home/amxce/amsgce-runtime-1.0.0/samples/amxce/bookstore/daas/com.tibco.restbt.sample.bookstore.daa --------------------------------------------------------------------------------------------- Checking java executable /usr/bin/java found java executable in PATH --------------------------------------------------------------------------------------------- 15 Jul 2020 15:21:17,863 [main] [INFO ] com.tibco.amxce.rdacompiler - RDACompiler 5.0.0 Invoking createConfigFile -daaFile /home/amxce/amsgce-runtime-1.0.0/samples/amxce/bookstore/daas/com.tibco.restbt.sample.bookstore.daa 15 Jul 2020 15:21:20,253 [main] [INFO ] com.tibco.amxce.rdacompiler - Successfully created application config file for DAA 'com.tibco.restbt.sample.bookstore.daa' at '/home/amxce/amsgce-runtime-1.0.0/samples/amxce/bookstore/daas/com.tibco.restbt.sample.bookstore.config.yaml'
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 TIBCO ActiveMatrix® Service Grid - Container Edition Cloud Deployment. To update the YAML file, you can use a text editor or you can upload the configuration file in the Application Configurator.