3 - App Stacks and Default Variables
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:
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:
- To add an application stack to Harness, follow the steps in Add Application Stacks.
- 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.
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.
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.