Use a local Application Accelerator engine server

This topic tells you how to run a local Application Accelerator engine server that you can use for testing accelerators that you are authoring.

About running a local engine server

When you are authoring your accelerator, it might be convenient generate a project based on the local files. This enables you to verify that the accelerator provides the defined options and generates the correct set of files.

With the local engine server, you can serve your accelerators with their fragments on localhost, including any changes you have locally. You can use the Visual Studio Code (VS Code) Tanzu App Accelerator extension or the Tanzu CLI Accelerator plug-in to generate new projects based on these local files. After you are satisfied with the new or modified accelerators and fragments, you can commit them to a Git repository and then publish them to a cluster to give others access.

Install the local engine server

To install the local engine server:

  1. Go to the Broadcom Support Portal, expand the VMware Tanzu Application Platform dropdown, and click the 1.8.5 release.

  2. If you have not done so already, select the I agree to Terms and Conditions check box.

  3. From the list of resources, download the acc-engine binary. Choose from acc-engine-linux, acc-engine-macos-aarch64, acc-engine-macos-amd64, or acc-engine-windows depending on your operating system and architecture.

    The ZIP file contains the local engine server and a Java runtime for running the server.

  4. Extract the ZIP file to a local directory by using the unzip command or any other extraction tool.

  5. For macOS users, you must give permission to open an app from an unidentified developer:

    1. In the Finder on your Mac, locate the directory where you extracted the downloaded ZIP file and expand the acc-engine directory.

    2. Control-open the following files:

      • Control-click acc-engine/app/bin/ytt and then click Open. This runs it in a terminal that you can close.

      • Control-click acc-engine/app/bin/java and then click Open. This runs it in a terminal that you can close.

      The app files you control-opened are saved as exceptions to your security settings. You can now run them without getting a verification message.

      Note

      VMware plans to have these artifacts signed using an Apple developer account to avoid these extra steps.

  6. Open a terminal window and change directory to acc-engine located inside the directory where you extracted the ZIP file.

  7. Set an environment variable named ACC_LOCAL_FILES that points to a directory that contains the fragments and accelerators you want to use with the local engine server. There must be a directory named accelerators and one named fragments. Under these directories, you can provide your local accelerators and fragments. For example:

      workspace
      ├── accelerators
      │   └── hello-world
      │       ├── ...
      └── fragments
          ├── build-wrapper-maven
          │   ├── ...
          ├── java-version
          │   ├── ...
    
    • For macOS and Linux: Set this environment variable, for example:

      $ export ACC_LOCAL_FILES="$HOME/workspace"
      
    • For Windows Powershell: Set this environment variable, for example:

      $ $Env:ACC_LOCAL_FILES="$HOME\workspace"
      

Use the local engine server to generate projects

To use the local engine server:

  1. Start the local engine server by running the engine script from the terminal:

    ./engine
    
  2. The latest versions of the VS Code Tanzu App Accelerator extension and the Tanzu CLI Accelerator plug-in have settings to use the local engine server instead of the regular cluster endpoints.

    • For the VS Code Tanzu App Accelerator extension:

      Under Settings > Extensions > Tanzu Application Accelerator, select the Use Local Server instead of Developer Portal check box.

      The extension can then show accelerators from the local engine server that you started. Use them in the same way that you use accelerators loaded from Tanzu Developer Portal. For more information, see Use the extension.

    • For the Tanzu CLI Accelerator plug-in:

      For the list, get, and generate commands, use the --local-server flag instead of --server-url.

check-circle-line exclamation-circle-line close-line
Scroll to top icon