Generate Bookstore Application Configuration

The Bookstore sample application is provided at amsgce-runtime-<version>\samples\bookstore\com.tibco.restbt.sample.bookstore

Before creating the bookstore application Docker image, you must generate the application configuration from application DAA. Application configuration contains the YAML file and, Log4j configuration (optional), and JVM parameters files(optional).

You can generate application configuration in one of the following ways:

Generating Application Configuration from the GUI (Application Configurator)

In this tutorial, you will upload the Bookstore application DAA to Application Configurator and complete the required configuration.

Procedure

  1. Access the Application Configurator UI by navigating to http://<hostname>:8087/appconfig/.

  2. Upload the bookstore application DAA in Application Configurator.

  3. Complete the required configuration. For information, see TIBCO ActiveMatrix® Service Grid - Container Edition Administration.

  4. Download the application configuration .zip file to your machine.
What to do next

The downloaded .zip file contains the application DAA, application configuration YAML file, and optionally, Log4j configuration file and JVM arguments file. Specify the path of this .zip file in the next step to build the Bookstore application image.

Generating Application Configuration from the CLI (DAA2Config)

Instead of using the Application Configurator, you can use DAA2Config command-line tool to generate the application configuration YAML file with default values. In this tutorial, you will use DAA2Config command to generate the application configuration YAML file.

Procedure

  1. Navigate to the amsgce-runtime-<version>\daautil\bin folder.
  2. Run the following command to generate the YAML file from DAA:

    You can check the parameters to pass to the command by running the./DAA2Config.sh help command.

    For Linux Platform:

    ./DAA2Config.sh -daaFile /home/amsgce-runtime-1.0.0/samples/bookstore/com.tibco.restbt.sample.bookstore/Deployment Artifacts/com.tibco.restbt.sample.bookstore.daa

    For Windows Platform:

    DAA2Config.bat -daaFile C:\amsgce-runtime-1.0.0\samples\bookstore\com.tibco.restbt.sample.bookstore\Deployment Artifacts\com.tibco.restbt.sample.bookstore.daa

    The YAML file, node JVM parameters configuration file, and Log4j configuration file with default values are generated in the output location provided. If no output location is provided, all files are generated in the same folder where the DAA file is located.

  3. To update the YAML file, you can use the text editor. After updating the YAML file, validate the configuration by using the checkConfig command.

    For Linux Platform:

    ./checkConfig.sh -daaFolder "/home/apps/bookstore" -debug true

    For Windows Platform:

    checkConfig.bat -daaFolder "C:\home\apps\bookstore" -debug true
What to do next

In the next step, specify the path of the folder containing the application configuration to build the Bookstore application image.