Distributing apps to multiple Qlik Cloud tenants using custom properties
This topic demonstrates how to configure a distribution policy with custom properties to direct apps to specific Qlik Cloud tenants based on tags applied during publishing.
In this example, two cloud deployments are configured. You can distribute apps to one or both deployments depending on the tags used when publishing the apps. For a simpler example of distributing apps to a single Qlik Cloud deployment, see Distributing apps to Qlik Cloud.
Prerequisites
- A license that includes multi-cloud. Either of the following:
- The same signed license key for Qlik Sense Enterprise on Windows and Qlik Sense Enterprise SaaS.
- Different license keys, where the cloud attributes are enabled and on-prem is activated through a signed license.
- Two Qlik Cloud tenants with support for managed spaces (not Trials, Standard, or Business editions).
Before you start
Obtain the URLs for your Qlik Cloud tenants:
-
Look for the URL in the welcome email sent by Qlik when your tenant was set up.
-
Alternatively, log in to your tenant and select About from your user profile menu. Here you will find the tenant hostname. The URL format is https://<tenant-hostname>. Example: https://your-tenant.eu.qlikcloud.com
Set up deployments
For each Qlik Cloud tenant you will:
-
Create a deployment in Qlik Sense Enterprise on Windows.
-
Create an identity provider configuration in Qlik Cloud.
-
Test the connection between Qlik Sense Enterprise on Windows and Qlik Cloud
The deployments will be called Region1 and Region2.
Create a deployment
Do the following:
-
In the Qlik Management Console (QMC), open Cloud distribution and select Deployment setup.
-
Click Set up new.
-
For Deployment name, enter Region1 for the first deployment and Region2 for the second. These names will be used as values in the custom property.
-
For API endpoint, enter the tenant URL.
-
For Audience, enter qlik.api.
-
Select Use local bearer token.
Information noteUsing a local bearer token simplifies setup. If you're not using this, input the Client ID, Client Secret, and Token endpoint from your identity provider. - Click Apply.
-
Copy and save the local bearer token. This token will be needed for the identity provider configuration in Qlik Cloud.
Repeat these steps for the second deployment.
Create an identity provider configuration
Do the following:
-
Log in to your first Qlik Cloud tenant and open the Management Console .
-
Go to Identity provider.
-
Click Create new.
-
For Type, select Multi-cloud.
-
Optionally, enter a description.
-
Paste the local bearer token from the deployment setup into the Local bearer token field.
-
Click Create.
Repeat these steps for the second Qlik Cloud tenant.
Test the connection
-
In the QMC, open Cloud distribution and select Deployment setup.
-
For each of the two deployments, Region1 and Region2, click Test connection.
Create a custom property
You will use custom properties in the distribution policy to specify the target for app distribution. Define custom properties with deployment names as values.
Do the following:
-
In the QMC, open the Custom properties section.
-
Click Create new.
-
Set the name to deployments.
-
Under Resource types, select Apps.
-
Under Values, click Create new.
-
Type Region1 as a value.
-
Add the value Region2 in the same way.
-
Click Apply.
Now you have two custom property values that you can use in the distribution policy.
Create a distribution policy
Create a distribution policy for distributing apps to the two cloud deployments using the custom property.
Do the following:
-
In the QMC, open the Cloud distribution section and select Distribution policies.
-
Click Create new.
-
In the Create rule from template list, select Distribution_App.
-
Name the policy Distribute to cloud deployments.
-
Under Basic, verify that the resource filter value is App_* and that the action Distribute is selected.
-
In the rule editor:
-
Keep the values subject and name.
-
On the second row, select #App in the first drop-down list and add @deploymentsin the last field.
-
The Conditions box in the Advanced section should contain the following string: ((subject.name=resource.@deployments)).
-
This could be read as: "If the deployment name equals the custom property value applied to the app, the app will be distributed to that deployment."
-
-
Click Validate rule. The rule syntax is checked and a confirmation is displayed.
-
Click Apply to save the settings.
With the configuration in this example, you can distribute apps to either Region1, Region2, or both, based on the tags used when publishing. For more information on publishing apps with tags, see Publishing apps to cloud hubs with tags.