This topic tells you how to run a local Application Accelerator engine server that you can use for testing accelerators that you are authoring.
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.
To install the local engine server:
Go to the Broadcom Support Portal, expand the VMware Tanzu Application Platform dropdown, and click the 1.8.7 release.
If you have not done so already, select the I agree to Terms and Conditions check box.
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.
Extract the ZIP file to a local directory by using the unzip
command or any other extraction tool.
For macOS users, you must give permission to open an app from an unidentified developer:
In the Finder on your Mac, locate the directory where you extracted the downloaded ZIP file and expand the acc-engine
directory.
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.
NoteVMware plans to have these artifacts signed using an Apple developer account to avoid these extra steps.
Open a terminal window and change directory to acc-engine
located inside the directory where you extracted the ZIP file.
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"
To use the local engine server:
Start the local engine server by running the engine
script from the terminal:
./engine
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
.