Building a Generic Flogo Enterprise Engine Binary
When you have multiple apps that use a common set of functionality, for example, if all of them use the same set of connectors, you need not build a separate binary for each app. Instead, you can generate a generic Flogo engine binary that bundles the common connectors. You can then run each app individually with the generic engine binary.
- You reduce the number of binaries that you need to build.
- If you need to make changes to your app after the engine binary is built, you need not re-generate the binary. You can simply run the updated app with the existing Flogo engine binary. The assumption here is that you have not added any new functionality or connectors to your app that were not present when you generated the Flogo engine binary, hence not bundled with the engine binary.
- You can provide any
<app>.jsonwith the Flogo engine binary and run it with the engine binary. You do not need to generate the binary for the app separately.
To build the engine binary, run:
./builder-<platform> build
An engine binary with the default name,
engine-<platform>-<architecture>, gets generated.
Note that you do not supply the
<app>.json name or its file path. This command builds the engine binary without any embedded apps.
All connectors present in the
/data folder of your
Flogo Enterprise installation (all out-of-the-box connectors as well as any extensions you might have explicitly uploaded) are included in the engine binary at the time of its creation.
Once you have generated the engine binary, to run a specific app with the engine binary, use the
--app option and provide the path to your
<app>.json file. For example:
./engine-<platform> --app /home/<user>/apps/<app>.json
Or
To run the above command without specifying the path to your app, rename your app to
flogo.json. For example:
./engine-<platform> flogo.json
When you run the engine binary with the app, it runs the app. Refer to the builder Command section for more details.