Application Bootstrap Policies

This page talks about Application Bootstrap Policies and how to create, use, and mange them. Before continuing you should have an understand of Custom Properties and application fundamentals.

About Application Bootstrap Policies

Application Bootstrap Policies on the Platform allow Platform Operators to set specific rules governing inclusion of specified libraries with the deployment of .Net UI, WCF/Windows Services, Java Web Application, and Kubernetes components. These policies apply comparison logic set by the Platform Operator to match specified libraries to the desired application components using Custom Properties.

Application Bootstrap Policies can be applied per-component and per-instance. Per-instance policies will runs during the deployment of each workload of a matching application component. Changes made by the policy will only affect that instance. For per-component policies, the policy runs during promotion of an application (to Sandbox, Published, or both). The changes from the policy will change the component, affecting all future instances of that component.

Note that Kubernetes components (Pods) must be bootstrapped by the Platform on a per-component basis. The deployment of individual instances is handled by Kubernetes, so the changes must be made to the component before it is given to Kubernetes to deploy.


Libraries may be specified from a static share and bootstrapped into set locations for each component type using the native bootstrap mechanism provided by the Platform; alternately, libraries may be dynamically specified and bootstrapped to configurable locations using a Custom Bootstrapper uploaded to the Platform. An Application Bootstrap Policy, when defined as “Active,” will be applied each time an application component to which it is assigned is deployed on the Apprenda Platform.

User Accounts

.NET services hosted on the Platform run by default under Virtual Accounts. For security reasons, it is possible to configure services to run under more limited user accounts. In order for Application Bootstrap Policy functionality to work properly,  the user account under which the Apprenda Extensibility Services runs must have Impersonate a client after authentication rights.

Viewing Bootstrap Policies

You can view, create, and manage Application Bootstrap Polices on your Platform on the Configuration> Application Bootstrap Policies page in the SOC. 

If any Application Bootstrap Policies have already been created for your Platform, they will appear in the list here, along with corresponding definition info. 

Creating a New Application Bootstrap Policy for Guest Applications

To create a new policy, click the New Application Bootstrap Policy button in the upper right of the Configuration> Application Bootstrap Policies page in the SOC. 

This will open a New Bootstrap Policy window where you can input information about the new policy.

  1. fill in the Name, and, optionally, a Description, for the policy

  2. choose whether or not to set the policy as Active. An Active policy will be used immediately by the Platform once it is created. De-selecting the “Active Policy” check box will cause the Application Bootstrap Policy to be ignored,  however, it will still appear on the policy list on the Application Bootstrap Policies page

  3. select the component types the policy Applies To. A policy can apply to .NET Application Components (.NET UIs and WCF/Windows Services), Linux Application Components (Java Web Applications or Linux Services), or Kubernetes Components (Pods). It is not possible to set a policy that applies to more than one types of application components

  4. select the Bootstrap Type. The Platform will bootstrap all instances that deploy to the Platform if you select Applied Per Instance. Applied Per Component means that the Platform will bootstrap the component once when the application is promoted to the Application Stage chosen in step 5.

  5. choose all the Application Stages where the Platform will apply the policy.  Selecting only Sandbox, for example, will cause the policy to be applied only for deployment decisions involving an application in the Sandbox stage. Select both Sandbox and Published if you want the Platform to apply the ** policy for all deployment decisions. See more about the Application Lifecycle and application deployment stages

When you have configured the General Settings, click Next to go to the Bootstrap Libraries selection window.

On the New Bootstrap Policy: Bootstrap Libraries page fill in information for the files for your policy. If you are making a policy for Kubernetes components, you should always choose to run a custom workflow and upload your files. The Platform will ignore any specified library and the files will not be loaded into Kubernetes components.

If you choose to Specify libraries to load into deployments,

  1. fill in the Library Path section with one or more paths the Platform will load into deployments. A specified path typically consists of a folder located in a network share, with the expectation that any items found in the specified folder will be loaded upon component deployment.

    • Add more paths by selecting Add New Path and filling in the input box
    • Remove an added path by clicking x next to the path you want to remove
  2. fill in the optional Parameters field to input any additional command-line parameters that should be run when deploying application components under this policy

  3. if access to the share is restricted, fill in Domain, Username, and Password credentials. The account provided must have read access to the specified folder on the share and be added as a user on any Windows machines that host WCF services on the Platform 

When using this bootstrapping method, libraries will be loaded to set locations within the deployed workload depending on component type:

  • for WCF/Windows services: the root of the Workload
  • for .NET UIs: root/bin 
  • for Java Web Applications: webapp/WEB-INF/lib

If you choose the Run a custom workflow for deployments option, browse to the location of a Bootstrapper Archive containing your own Custom Bootstrapper that you want to upload.  This allows for numerous custom workflows:

  • Loading libraries into Workload locations other than the defaults used by the native Platform bootstrapper
  • Specifying libraries at dynamic locations (or even in the archive) rather than specifying a share through policy creation
  • Dynamically configuring bootstrapper workflow based on Custom Property values set for Apprenda objects (e.g., Applications, Application Components, Development Teams) that are made accessible to the bootstrapper
  • ​Creating or setting values for system properties or environment variables and developer token replacements.

Once the Bootstrap Libraries have been defined, click Next.  This will open the Conditions definition window.

Choose the Always bootstrap all deployed components option in order to bootstrap the specified library for all components that meet the .NET/Java and Deployment Stage criteria set in the General Settings section of the policy definition.

Choose Bootstrap only if the component being deployed satisfies if you want to set up conditions for components the policy will be assigned to. This option allows you to set a conditional policy using Custom Properties.

  1. select the Component Type the condition should apply to. The drop-down will display choices limited by the .NET/Java/Kubernetes criteria set earlier in the General Setting section. These choices consist of Apprenda objects that can be tagged via Custom Properties:
    • Applications
    • Specific Application Component types (“Services” will apply to both WCF and Windows Service components)
    • Resource Policies
  2. select Custom Property the policy should use. Selecting a Component Type will update the drop-down with all Custom Properties that are applicable to that Component Type (as needed, new Custom Properties can be created).
  3. select the Comparison Logic ** to create the desired conditional policy
    • The Contain All, Contain Any, Does Not Contain All, and Does Not Contain All options require that you enter value(s) into the Value(s) field. See more about using comparison logic for these options
    • Is Empty will apply if no value is set for the Custom Property on the Application, Component, or Resource Policy
    • Is Not Empty  will apply if any non-null value is set for the Custom Property (including default values set by the Platform Operator) on the Application, Component, or Resource Policy

Once the settings are complete, click Next again.  A Summary of the policy will appear, at which point clicking Finish will create the policy.  After the policy is created, it will appear on the Application Bootstrap Policies list, along with information about what the policy applies too, and an indication of whether or not the policy is active.

Comparison Logic

This table shows how Bootstrap Policies that use comparison logic of Contain All, Contain Any, Does Not Contain All, and Does Not Contain All will be applied.

App Property Value Policy Property Value Description Contain All Contain Any Does Not Contain All Does Not Contain Any
A A Exact match Applies Applies Does not apply Does not apply
A A,B Full match on App Does not apply Applies Applies Does not apply
A B No match Does not apply Does not apply Applies Applies
A,B A Full match on Policy Applies Applies Does not apply Does not apply
A.B B,C Partial match Does not apply Applies Applies Does not apply
</span> A No match Does not apply Does not apply Applies Applies

Managing Bootstrap Deployment Policies

To update a policy, click Edit next to the policy you want to change. the corresponding Edit button to the right.

An editor window will appear where you can update information about the policy. Please note that items uploaded through a Bootstrapper Archive will not be visible after upload or when updating a policy. If you upload a new archive when editing a policy, its contents will replace those of a previously uploaded archive.

You can remove a policy choosing the Delete option from the dropdown menu to the right of the Edit button.