3 - App Stacks and Default Variables

Updated 6 months ago by Michael Cretzman

Set up or select the Application Stacks needed for your runtime environment and use Application Variables for your specific applications and target host environments.

In this topic:

Application Stacks

If the target hosts you will deploy your files on do not have an application stack installed already, you can add an application stack as part of your Harness deployment.

Use an Application Stack

To use an application stack, do the following:

  1. To add an application stack to Harness, follow the steps in Add Application Stacks.
  2. When you create your Service, select the Application Stack in the Add Service dialog's Application Stack setting.

When the Service is created, it contains the scripts need to install the application stack.

Application Defaults

You can define Application-wide variables that can be referenced in any entity within an application. The Application Defaults include the paths for runtime, staging, and backup used by the scripts in the Service.

For example, here is the Application Defaults dialog, the Copy Artifact script in the Service using the RUNTIME_PATH variable and the Tomcat application stack webapps folder, and the resulting file path for the deployed artifact on the target host:

For more information, see Application Default Variables.

To create Application Defaults, you must be logged into Harness as a member of a group that has create or update permissions for that application.

The Application Defaults are used throughout the scripts in the Service. Here is an automatically-generated Start Service script that uses the RUNTIME_PATH variable to start Tomcat.

Next Step

How did we do?