Tanzu Platform SaaS

Run the Accelerator Local Server engine

Last Updated February 19, 2025

This topic gives you reference information for running the Accelerator Local Server engine.

Overview of running a local server engine

All interaction with the accelerator resources goes through the Accelerator Local Server engine. You can start this local server as a separate process, as described in the Install and run the local server engine as a separate process section later. You can also start it when creating a new Project for Tanzu Application Accelerator in the IntelliJ IDE. The IDE plug-in checks for a running server and starts a new one if none is found.

Use local files for accelerator and fragment resources

When you are authoring your accelerator, it can be convenient to 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 before committing the accelerator files to a Git repository.

With the local server engine, you can serve your accelerators with their fragments from Git repositories or from files on your local file system.

You can generate new Projects based on these local files by using the Tanzu Platform Developer Tools for IntelliJ plug-in or the Tanzu CLI Accelerator plug-in. 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 Project to give others access.

This is all controlled from a local resource definition file. The entries in this file are added to any resources defined for your active Tanzu Project. Any locally defined resources take precedent over resources published in the Tanzu Project.

In the resource definition you can replace the spec.git entry with a spec.localFile.path entry pointing to the directory containing the accelerator or fragment files. Here is an example defining the location for a local fragment:

apiVersion: accelerator.tanzu.vmware.com/v2
kind: Fragment
metadata:
  name: java-version
spec:
  localFile:
    path: /Users/foo/workspace/local/fragments/java-version

The file can contain multiple resource definitions separated by a line with three dashes ---.

Configure IntelliJ IDE plug-in to use local accelerator and fragment resource definitions

The path to the local resource definition file is provided to the engine running in the IntelliJ IDE using the Local Accelerator Definitions setting for Tanzu Platform Developer Tools.

  1. Open the settings and then click Tools > Tanzu Platform Developer Tools > Accelerators.
  2. Enter or select the file path for the local resource definitions file and then click OK.

Screen capture of the local accelerator resource definitions.

Install and run the local server engine as a separate process

You can run the Accelerator Local Server engine as a separate process. This can be convenient when using the Tanzu CLI accelerator plug-in because you do not have to rely on IntelliJ running.

  1. Download the acc-engine-\<os\>-\<arch\>-v2.0.4.zip file that matches your OS and architecture from the Customer Support Portal.

  2. In the terminal, go to the directory where the downloaded file is by running:

    cd $HOME/Downloads
    
  3. Extract the zipped content by running:

    unzip acc-engine-*-*-v2.0.4.zip
    
  4. Change to the acc-engine directory by running:

    cd acc-engine
    
  5. (Optional) Set the path for the file containing local accelerator resource definitions. If you do not have your own file with definitions, you can download a file from the samples repository by running:

    export ACC_LOCAL_ACCELERATOR_DEFS=$HOME/Downloads/accelerator-resources.yaml
    
  6. Ensure that IntelliJ is closed because it starts its own server that can interfere. From the acc-engine directory start the engine by running:

    ./engine
    

Set macOS permissions

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

  1. In the Finder on macOS, find the directory where you extracted the downloaded ZIP file and then expand the acc-engine directory.
  2. Control-click acc-engine/app/bin/ytt and then click Open. This runs the file in a terminal that you can close.
  3. Control-click acc-engine/app/bin/java and then click Open. This runs the file in a terminal that you can close.

The app files you opened by using control-click are saved as exceptions in your security settings. You can now run them without opening a verification message.