Skip to content

Deploy apps with Platform Operations

Deploy Qlik Sense applications

The core part of an analytics experience in Qlik Cloud is the Qlik Sense application. This tutorial demonstrates how to migrate applications to a new tenant.

This model assumes you have your applications preloaded to a source tenant prior to deployment, however it’s possible to use other Automations connectors, such as the GitHub connector, to load these assets from a repository rather than a source tenant.

Note: This approach supports Qlik Sense applications up to 20 MB in size on disk. This means that for most scenarios, you should export an empty template from your source, import this to your target tenant, and then reload it on the target tenant. This limitation does not exist when using the pro-code tooling.

For more information on how to achieve this via Qlik APIs and toolkits, review the pro-code Deploy a Qlik Sense app tutorial.

Requirements

  • A Qlik Cloud tenant with access to Qlik Application Automation.
  • Valid OAuth client with access to the tenants on which you wish to run the automation.
  • Access to a source tenant with existing apps published to a shared space called Production, with at least one app tagged with deploy. The OAuth client user (bot user) with the Can manage role must be a member of the shared space.
  • Access to a target tenant.

Variables you need to complete this tutorial

  • sourceTenant: The hostname for your source Qlik Cloud tenant (for example sourcetenant.eu.qlikcloud.com).
  • targetTenant: The hostname for your target Qlik Cloud tenant (for example targettenant.eu.qlikcloud.com).
  • sharedSpaceName: The name of the space on the source tenant that contains the apps you wish to deploy.
  • managedSpaceName: The name of the space on the target tenant to which you wish to publish the apps.

Configuration

Prior to beginning, your sourceTenant should have one or more Qlik Sense apps available in a shared space named sharedSpaceName. These will be exported and imported to the targetTenant by the automation to new shared and managed spaces on that tenant.

Browser window showing source tenant apps

Drag two Get Tenant Name And Region blocks onto your Start block. The first should be configured with the Hostname set to sourceTenant, and the second should be configured with the Hostname set to targetTenant.

Browser window showing Get Tenant Name And Region blocks

Add two Variable blocks, setting the value of variable sharedSpaceName to the name of your shared space on the source tenant, and the value of variable managedSpaceName to the desired name for the managed space on the target tenant. These spaces will be created on the targetTenant as part of the provisioning workflow.

Browser window showing a Variable block Browser window showing a Variable block

Add a List Spaces block, set the Tenant to the Get Tenant Name And Region block for the sourceTenant, the Filter to name eq followed by the variable for the sharedSpaceName, and the Type to shared. This will retrieve the metadata for this space from the source tenant.

Note: You must use a shared space because it is not possible to export applications from a managed space.

Browser window showing the List Spaces block

Add a Create Space block, set the Tenant to the Get Tenant Name And Region block for the targetTenant, the Name to the name of the space returned from the List Spaces block, the Type to shared, and the Description to the value returned by the List Spaces block. This will create a new shared space on the target tenant for importing the app to.

Browser window showing the Create Space block

Add a Create Space block, set the Tenant to the Get Tenant Name And Region block for the targetTenant, the Name to the variable for the managedSpaceName, and the Type to managed. This will create a new managed space on the target tenant, which you will publish the imported app to.

Browser window showing the Create Space block

Add a List Apps block, set the Tenant to the Get Tenant Name And Region for the sourceTenant, and the Space ID to the output of the List Spaces block. This will return all apps in the shared space on the source tenant.

Browser window showing the List App block

Within the List Apps loop, add a Export App To Base 64 Encoded File block, set the Tenant to the Get Tenant Name And Region for the sourceTenant, the App ID to resource attributes>id from the List Apps block, and Exclude Data to false, if your apps are 20 MB or smaller in size. If they are larger, then set this to true.

Browser window showing the Export App to Base 64 block

Add a Import App From Base 64 Encoded File block, set the Tenant to the Get Tenant Name And Region for the targetTenant, the File Data Base 64 Encoded to the output from the Export App To Base 64 Encoded File block, the Name from the List Apps block (although this is optional, if not specified then the app name will be loaded from the exported file), and the Space ID from the Create Space block that created the shared space. This will import the app into that shared space, ready for publishing.

Browser window showing the Import App from Base 64 block

Add a Publish App To Managed Space block, set the Tenant to the Get Tenant Name And Region for the targetTenant, the App ID to the ID returned via the Import App From Base 64 Encoded File block, the Space ID to the ID returned via the Create Space block that created the managed space, and the Data to source to use the data from the imported app. This will publish a copy of the app from the shared space into the managed space, where end users will consume it.

Browser window showing the Export App to Base 64 block

Select Run to trigger the automation. On the targetTenant, the spaces will be created, apps imported, and then published.

Browser window showing the apps now deployed and published to the target tenant

Navigate to the tenant to view the newly deployed spaces and apps.

Full automation snippet

Full automation snippet

To import this snippet to your own automation, either:

  • Save as a JSON file, right click the canvas in an automation, and select Upload workspace.
  • Copy the snippet to the clipboard, right click the canvas in an automation, and select Paste blocks.

{"blocks":[{"id":"E6851DBA-70A2-4005-8377-BA4971BC9B96","type":"StartBlock","disabled":false,"name":"Start","displayName":"Start","comment":"","childId":"374D2A26-1BD8-4924-B7ED-7F03D60A043B","inputs":[{"id":"run_mode","value":"manual","type":"select","structure":{}}],"settings":[],"collapsed":[{"name":"loop","isCollapsed":false}],"x":0,"y":0},{"id":"374D2A26-1BD8-4924-B7ED-7F03D60A043B","type":"SnippetBlock","disabled":false,"name":"GetTenantNameAndRegion","displayName":"Qlik Platform Operations - Get Tenant Name And Region","comment":"","childId":"A6552199-28CF-4938-B602-EEB283449D92","inputs":[{"id":"575d1740-b1e2-11ed-958a-598edfec33b8","value":"orchestration.eu.qlikcloud.com","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-281,"y":204,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","snippet_guid":"bd5c1ce0-ad14-11ed-83f6-1d42e53790dd"},{"id":"A6552199-28CF-4938-B602-EEB283449D92","type":"SnippetBlock","disabled":false,"name":"GetTenantNameAndRegion2","displayName":"Qlik Platform Operations - Get Tenant Name And Region 2","comment":"","childId":"13D73ED1-A994-4DE2-A579-B5D288B6D526","inputs":[{"id":"575d1740-b1e2-11ed-958a-598edfec33b8","value":"platformoperations.eu.qlikcloud.com","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-254,"y":211,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","snippet_guid":"bd5c1ce0-ad14-11ed-83f6-1d42e53790dd"},{"id":"DF9776A9-B073-4B24-B1A9-5E1F1C4B5311","type":"VariableBlock","disabled":false,"name":"managedSpaceName","displayName":"Variable - managedSpaceName","comment":"","childId":"380E9DCB-495B-4F86-98B0-E85113233FD7","inputs":[],"settings":[],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-308,"y":225,"variableGuid":"26CD3CA7-7E05-41EC-903A-590F0D319F2F","operations":[{"key":"94D3B873-27E5-442F-8684-97CA0AC99B03","id":"set_value","name":"Set value of { variable }","value":"Production"}]},{"id":"13D73ED1-A994-4DE2-A579-B5D288B6D526","type":"VariableBlock","disabled":false,"name":"sharedSpaceName","displayName":"Variable - sharedSpaceName","comment":"","childId":"DF9776A9-B073-4B24-B1A9-5E1F1C4B5311","inputs":[],"settings":[],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-306,"y":208,"variableGuid":"C52AAC4E-AB58-4551-8532-759F15C96A0E","operations":[{"key":"DB079338-34BF-449C-B875-253F9FC744AB","id":"set_value","name":"Set value of { variable }","value":"staging"}]},{"id":"380E9DCB-495B-4F86-98B0-E85113233FD7","type":"EndpointBlock","disabled":false,"name":"listSpaces","displayName":"Qlik Platform Operations - List Spaces","comment":"","childId":"04546E7E-CCEA-452C-A9BF-B4080330D4D4","inputs":[{"id":"7717d000-eb0e-11ec-9b55-c70a3d793cb2","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"cf8b5510-d90e-11ed-a579-cd38900fbf47","value":"name eq \"{$.sharedSpaceName}\"","type":"string","structure":{}},{"id":"1d91e290-d90f-11ed-80ea-9fec14e6d987","value":null,"type":"string","structure":{}},{"id":"71ea7180-d90f-11ed-a399-43da6346f683","value":"shared","type":"string","structure":{}},{"id":"92cd6110-d90f-11ed-a57c-89623b3170d1","value":null,"type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"maxitemcount","value":null,"type":"string","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"cache","value":"0","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":0,"y":600,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"76df5d40-eb0e-11ec-85e6-6fa92818449e","endpoint_role":"list"},{"id":"04546E7E-CCEA-452C-A9BF-B4080330D4D4","type":"EndpointBlock","disabled":false,"name":"createSpace","displayName":"Qlik Platform Operations - Create Space","comment":"","childId":"94D33C57-017A-49C4-98FA-50E09F3EC9E3","inputs":[{"id":"259d5fb0-eb0b-11ec-86d9-199f676a752d","value":"{$.GetTenantNameAndRegion2}","type":"string","structure":{}},{"id":"ac076300-eb0a-11ec-b583-0fbc8b1515af","value":"{$.listSpaces[0].name}","type":"string","structure":{}},{"id":"b8bb0400-eb0a-11ec-a73b-0fd8e1a85cad","value":"be2ded30-eb0a-11ec-8c57-cde756de2b10","type":"select","displayValue":"shared","structure":{}},{"id":"e2622970-eb0a-11ec-8c26-21e40f237a36","value":"{$.listSpaces[0].description}","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-285,"y":580.0452880859375,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"6e753120-eb0a-11ec-95bc-8ba5cf12f207","endpoint_role":"create"},{"id":"94D33C57-017A-49C4-98FA-50E09F3EC9E3","type":"EndpointBlock","disabled":false,"name":"createSpace2","displayName":"Qlik Platform Operations - Create Space 2","comment":"","childId":"3B11611B-1436-458D-81B1-643F8744EFC6","inputs":[{"id":"259d5fb0-eb0b-11ec-86d9-199f676a752d","value":"{$.GetTenantNameAndRegion2}","type":"string","structure":{}},{"id":"ac076300-eb0a-11ec-b583-0fbc8b1515af","value":"{$.managedSpaceName}","type":"string","structure":{}},{"id":"b8bb0400-eb0a-11ec-a73b-0fd8e1a85cad","value":"c27c90f0-eb0a-11ec-a9ea-653198c16b16","type":"select","displayValue":"managed","structure":{}},{"id":"e2622970-eb0a-11ec-8c26-21e40f237a36","value":null,"type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-310,"y":584.0452880859375,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"6e753120-eb0a-11ec-95bc-8ba5cf12f207","endpoint_role":"create"},{"id":"3B11611B-1436-458D-81B1-643F8744EFC6","type":"EndpointBlock","disabled":false,"name":"listApps","displayName":"Qlik Platform Operations - List Apps","comment":"","childId":null,"inputs":[{"id":"e9b6c6e0-fc5c-11ec-a80b-6bcbe0fce3f9","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"828395d0-fc5c-11ec-84c0-7d10388a4509","value":null,"type":"string","structure":{}},{"id":"a2e67870-fc5c-11ec-8908-03acdf4e0f6b","value":"{$.listSpaces[0].id}","type":"string","structure":{}},{"id":"0861ad80-7bb3-11ed-adf0-0bf7b3e68eef","value":null,"type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"maxitemcount","value":null,"type":"string","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"cache","value":"0","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":116,"y":1047.4085693359375,"loopBlockId":"53C1C36A-C052-4362-BD34-C9AB17D8CA6F","datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"8263bab0-fc5c-11ec-8f4a-433e011739ae","endpoint_role":"list"},{"id":"53C1C36A-C052-4362-BD34-C9AB17D8CA6F","type":"SnippetBlock","disabled":false,"name":"ExportAppToBase64EncodedFile","displayName":"Qlik Platform Operations - Export App To Base 64 Encoded File","comment":"","childId":"9B0B3FA2-9D2E-480D-9F24-773C32D587CF","inputs":[{"id":"d426c290-9af1-11ed-9b71-c99af7f97e39","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"ca854070-fc5a-11ec-8017-27122a46811b","value":"{$.listApps.item.resourceAttributes.id}","type":"string","structure":{}},{"id":"6251d660-ca35-11ed-be4b-a5921229ac8e","value":"false","type":"select","displayValue":"false","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-292,"y":782.4085693359375,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","snippet_guid":"ca7c1640-fc5a-11ec-9506-815ae94ddd6e"},{"id":"9B0B3FA2-9D2E-480D-9F24-773C32D587CF","type":"EndpointBlock","disabled":false,"name":"importAppFromBase64EncodedFile","displayName":"Qlik Platform Operations - Import App From Base 64 Encoded File","comment":"","childId":"387239DC-CA26-4838-A6FD-60B5601B1500","inputs":[{"id":"4be04370-fc5b-11ec-8758-ddba95fb24da","value":"{$.GetTenantNameAndRegion2}","type":"string","structure":{}},{"id":"4bce30a0-fc5b-11ec-ab0b-cb01fdfeeec0","value":"{$.ExportAppToBase64EncodedFile}","type":"string","structure":{}},{"id":"a7fab740-fc5b-11ec-9e27-8d6654541393","value":"{$.listApps.item.attributes.name}","type":"string","structure":{}},{"id":"cfd90fa0-fc5b-11ec-81c3-ef55794fd2e8","value":"{$.createSpace.id}","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":95,"y":1538,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"4bbfdf70-fc5b-11ec-b1c1-311f2248f446","endpoint_role":"create"},{"id":"387239DC-CA26-4838-A6FD-60B5601B1500","type":"EndpointBlock","disabled":false,"name":"publishAppToManagedSpace","displayName":"Qlik Platform Operations - Publish App To Managed Space","comment":"","childId":null,"inputs":[{"id":"3b126000-23a5-11ed-b67f-45266130cfce","value":"{$.GetTenantNameAndRegion2}","type":"string","structure":{}},{"id":"3af11e80-23a5-11ed-ba77-89e51a181a28","value":"{$.importAppFromBase64EncodedFile.attributes.id}","type":"string","structure":{}},{"id":"e673dc70-23a5-11ed-a578-5336db13b0ca","value":"{$.createSpace2.id}","type":"string","structure":{}},{"id":"5a279740-23a6-11ed-95ea-6307a45f0f49","value":"source","type":"select","structure":{}},{"id":"78534a90-23a6-11ed-b6e8-456e6b1bd5aa","value":null,"type":"string","structure":{}},{"id":"83510de0-23a6-11ed-9375-dd6b0711130f","value":null,"type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-309,"y":962.822265625,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"3adf6a80-23a5-11ed-a763-0dc109ad9eb4","endpoint_role":"update"}],"variables":[{"guid":"26CD3CA7-7E05-41EC-903A-590F0D319F2F","name":"managedSpaceName","type":"string"},{"guid":"C52AAC4E-AB58-4551-8532-759F15C96A0E","name":"sharedSpaceName","type":"string"}]}

Next steps

Now that you are have successfully deployed apps, move on to Deploying themes and extensions.

Was this page helpful?