Skip to main content

Distribution policies - using custom properties

You create distribution policies to determine how apps are distributed to your cloud deployments. Distribution policies are mandatory when you want to distribute apps from Qlik Sense Enterprise on Windows to Qlik Sense Enterprise SaaS or Qlik Sense Enterprise on Kubernetes. Once created, any published app that matches the criteria in the distribution policy is distributed to the defined targets and then automatically redistributed if it is changed, for example, after a reload.

Tip: In this topic, you will use custom properties in your distribution policy to determine to which tenant apps are distributed. For a simpler example of app distribution from Qlik Sense Enterprise to Qlik Sense Enterprise SaaS, see Distributing apps from Qlik Sense Enterprise on Windows to Qlik Sense Enterprise SaaS

Prerequisites

Once those steps are completed, proceed to Creating a distribution policy for distributing apps to different deployments

Setting up a deployment in the Multi-Cloud Setup Console

Do the following:

  1. Open the Multi-Cloud Setup Console by adding /api/msc to your existing Qlik Sense Enterprise on Windows server name: https://<server name>/api/msc.

  2. Click the Deployments tile.

  3. Click Set up new in the bottom-left corner.

  4. Enter a deployment name. Use Region1 for the first deployment and Region2 for the second one.

    You will use these names as values in the custom property.

  5. Enter the API endpoint, that is, your tenant address.

    Example: https://my-tenant.eu.qlikcloud.com.

  6. For Audience, enter qlik.api.

  7. Select Use local bearer token.

    Note: Using a local bearer token simplifies setup. If you do not use it, you need to enter Client ID, Client secret, and Token endpoint instead.
  8. Click Copy to clipboard.

    You need the local bearer token in the identity provider configuration.

  9. Click Apply.
Note: Deployment setup is also available in the QMC, under Cloud distribution.

Creating the identity provider configuration

Do the following:

  1. Open the Management Console in your cloud tenant and select Identity provider in the menu to the left.

  2. Click Create new.

    The Create identity provider configuration window is opened.

  3. Under Type, select Multi-cloud.

  4. Optionally, enter a description.

  5. In the Local bearer token box, paste the token you copied in the deployment setup.

Creating a distribution policy for distributing apps to different deployments

You create the distribution policy in the QMC. When you publish apps, you can use custom properties to define where to distribute the apps.

Begin by creating a custom property and then use it in the distribution policy.

Creating a custom property for deployments

The custom property will have deployment names as values.

  1. In the QMC, open the Custom properties section.

  2. Click Create new Create new.

  3. Name the custom property deployments.

  4. Under Resource types, select Apps.

  5. Under Values, click Create new Create new.

  6. Type Region1 as a value.

  7. Add the value Region2 in the same way.

  8. Click Apply.

Now you have two custom property values that you can use in the distribution policy.

Warning:

The option to use the custom properties groupswithaccess and userswithaccess to grant access to an app is deprecated as of the February 2020 release of the SaaS editions of Qlik Sense.

Creating the distribution policy

  1. In the QMC, open the Cloud distribution section and select Distribution policies.

  2. Click Create new Create new.

  3. In the Create rule from template list, select Distribution_App.

  4. Name the distribution policy Distribute to cloud deployments.

  5. Under Basic, verify that the resource filter value is App_* and the action Distribute is selected.

  6. In the rule editor, keep the values subject and name. On the second row, in the first drop-down list, select #App. In the last field add: @deployments.

    The Conditions box in the Advanced section should have the following string: ((subject.name=resource.@deployments)). This could be read as follows:

    "If the deployment name equals the custom property value applied to the app, the app will be distributed to that deployment."

  7. Click Validate rule.

    The rule syntax is checked, and, if valid, a confirmation is displayed.

  8. Click Apply to save the rule.

With this setup you can distribute apps to either one of the deployments, or both, depending on which tags are used when publishing the apps in the hub.

For an example of distribution policies in use, see Step-by-step - Publishing an app to cloud deployments.