Building Flogo Applications Offline

This procedure describes how to build Flogo applications on a system with restricted or no Internet access.

Prerequisites

Ensure that you have the following setup:

  1. A machine with an Internet connection to download all Flogo dependencies once.

  2. This internet-connected machine must have access to the following: proxy.golang.org, index.golang.org, and sum.golang.org.

  3. The internet-connected machine must have the following installations:

    1. Golang (refer to https://go.dev/doc/install for installation instructions)

    2. Visual Studio Code

    3. TIBCO Flogo® Extension for Visual Studio Code

Note: The following steps assume that both the internet-connected and offline machines use the Windows operating system. If you use Mac or Linux, the paths and process for adding environment variables differ, but the overall steps remain the same.
Note: You must rerun the following steps if you use a new version of Flogo® Extension for Visual Studio Code (VS Code), or if you use any additional activities, triggers, or connections from a new connector, function, or a custom extension.
On a Machine with Internet Access

Perform the following steps on a machine with an active Internet connection:

    Procedure
  1. Create a master Flogo app.

    Note: This app only needs to compile successfully. It does not need to execute at runtime so accurate mappings are not required.
  2. You must include the following in this app:

    • All triggers, activities, and connections from connectors you plan to use in development.

    • All functions you intend to use.

    • Any custom extensions.

  3. Run the command go env GOMODCACHE from your terminal or command prompt to find your go mod cache location.

  4. Delete the folder specified in the output of the go env GOMODCACHE command.

  5. Build the master Flogo app in Visual Studio Code or using the Flogo Build CLI.

  6. Verify that the application builds successfully.

  7. Check the go mod folder again. It now contains a <Go Mod Path>/cache/download folder.

  8. Compress the folder to move it or copy it directly to the machine without Internet access.

On a Machine Without Internet Access

Perform these steps on a machine where Internet access is restricted or unavailable:

    Procedure
  1. Copy the go mod cache folder (from the internet-connected machine referenced in the previous procedure) to the offline machine.

  2. On this machine, add a new system environment variable FLOGO_MOD_CACHE.

  3. Set the value of FLOGO_MOD_CACHE to the path where you copied the go mod cache folder.

    • For example, if you copy the folder to C:\Store\FlogoGoCache, set FLOGO_MOD_CACHE to C:\Store\FlogoGoCache.

  4. Perform your builds on this machine. The system uses dependencies from the specified cache folder and does not attempt to pull new dependencies from the Internet.