Build a service archive with the build toolkit

This scenario shows you how to use the build toolkit to generate the service archive from a service project created in the API toolkit.

Before you begin

zosConnect-2.0 Applies to zosConnect-2.0.

About this task

Use the build toolkit to generate the service archive from the service project that you created in the API toolkit. In an enterprise DevOps workflow, the build toolkit is typically run by a script that is similar to the following steps.

Procedure

In this procedure, substitute the Windows example for the platform of your choice. The build toolkit properties files must be encoded in UTF-8.

  1. Create a local directory such as C:/DevOpsScenarios on the Windows system.
  2. Download the build toolkit compressed file, zconbt.zip as a binary file, to the same local directory, C:/DevOpsScenarios.
    The build toolkit is in the z/OS Connect <installation_path> and is called zconbt.zip.
  3. Extract the zconbt.zip file into a zconbt sub directory of the C:/DevOpsScenarios local directory.
  4. Add the zconbt executable file to your path. For example, enter the following command: set PATH=C:/DevOpsScenarios/zconbt/bin;%PATH%
  5. Obtain the service project folder from your source control management system and place it under C:/DevOpsScenarios

    For example, if your Eclipse workspace location is C:/Program Files/IBM/rationalsdp/workspace, you would find the InquireSingle/, phonebook/, or stockQuery/ folder there. Copy this folder into C:/DevOpsScenarios.

  6. Run the build toolkit CLI to create the service archive file.
    The build toolkit has the following syntax:
    zconbt --projectDirectory=C:/DevOpsScenarios/<serviceProjectFolder> --file=C:/DevOpsScenarios/<serviceName>.sar

    Use the -pd parameter to specify the project directory, and the -f parameter to specify the path and the file name of the generated service archive. In a command prompt window, depending on the name of your project, enter one of the following commands:

    zconbt --projectDirectory=C:/DevOpsScenarios/InquireSingle --file=C:/DevOpsScenarios/inquireSingle.sar
    or
    zconbt --projectDirectory=C:/DevOpsScenarios/phonebook --file=C:/DevOpsScenarios/phonebook.sar
    or
    zconbt -projectDirectory=C:/DevOpsScenarios/stockQuery --file=C:/DevOpsScenarios/stockQuery.sar

Results

The service archive can be copied to the services directory of your server for deployment.

What to do next

For more information about a general enterprise DevOps workflow and sample DevOps technologies for building the archives and deploying the services and APIs, see DevOps with IBM z/OS Connect.