Skip to main content

Distribution policies - example

ON THIS PAGE

Distribution policies - example

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 to Qlik Cloud Services (QCS) or Qlik Sense Enterprise on Kubernetes (QSEoK). 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.

In this topic you will find examples of how to create a distribution policy.

Creating a distribution policy

You create the distribution policy in the QMC. When you distribute apps, you also need to define where they should be published and who should have access to them. For that purpose you use custom properties, which you also create in the QMC.

Example: A distribution policy for distributing apps to different deployments and countries

Begin by creating the custom properties and then use them in the distribution policy.

Creating custom properties for deployments and countries

The first custom property will contain countries as values. With this custom property, you define to which collections (countries) you distribute an app.

Warning: Custom property names must be in lowercase. If you use uppercase letters, the app will not show up in the collections, and there will be no error message.

Do the following:

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

  2. Click P Create new.

  3. Name the custom property collections.

  4. Under Resource types, select Apps.

  5. Under Values, click P Create new.

  6. Type US as a value.

  7. Add the following values in the same way: Canada, Sweden, Norway, Nordics, Germany.

  8. Click Apply.

You follow the same steps to create the second custom property.

Do the following:

  • Create a custom property called deployments, with the values Elastic and CloudService.

    With this custom property you define to which deployments (QSEoK or QCS) you distribute an app.

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

Creating an additional custom property for granting a user group access to an app

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 cloud editions of Qlik Sense.

Qlik recommends that all apps shared from a personal space be moved to a shared space prior to this release.

Creating the distribution policy

Do the following:

  1. In the QMC, open the Distribution policies section.

  2. Click P Create new.

  3. Name the distribution policy DistributeToDeployments.

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

  5. In the rule editor keep the values subject, name, =, and value. You only need to add the following to the last field: resource.@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 of the app, the app will be distributed to that deployment."

  6. Click Validate rule.

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

  7. Click Apply to save the rule.

For a presentation of distribution policies in use, see Publishing apps to cloud hubs with tags.