First Steps

Prerequisites

  • QOps installed
  • QOps license activated
  • Valid Static or Leased Qlik license
  • QOps configured in the Qlik Sense mode
  • Git remote repository created
  • SSH key pair generated and linked to Git Provider
    (alternatively, HTTP connection may be used)

Checking Settings

Check that QOps license is activated. If not set a valid license key by QOps-SetLicense command and activate it by QOps-Activate command.

QOps-CheckLicense

Execute the internal configuration wizard and enter the parameters requested.

QOps-Configure

Check and validate QOps settings

QOps-ShowDefault




If QOps not in the QlikView mode, switch it with the following command.

QOps-SetMode QlikView

Applications Selection

Let's output all applications available with QOps-Apps command.

QOps-Apps


Then, configure filtering to select 'IBCS_qops_tst' application only. This prevents all applications processing by default.

QOps-Apps -Filter "Name=IBCS_qops_tst"

After that, add this application to the work list with QOps-AddApps command. -NoAppend will ignore the previously configured filter.

QOps-AddApps -NoAppend


Now every command executed next will be applied to the selected application(s).

Let's select a folder with QlikView application(s) and output all applications available with QOps-Apps command.

QOps-Apps


With QOps-SetFilter command, we can define application(s) for further processing. By default, QOps will process all available applications starting from the current folder.

QOps-SetFilter "Name=*project1*"


Source Retrieving

Once the application is selected we can retrieve sources using QOps-Prepare command.

QOps-Prepare


As a result, we will get a new folder with all sources for the application selected.


Let's open a folder with two QlikView applications named ExampleProject1.qvw and ExampleProject2.qvw. The QOps-Prepare command will process the applications based on global filter settings.

QOps-Prepare



Once source retrieving is completed, we will see source files extracted from selected applications.


Application Building

Let's build the application from the source code contained in the current folder.

QOps-Build


As a result, the application with a new Application Id will be created. This is a working copy of the original application. To replace the original application QOps-Release command should be used.

QOps-Release –NoPull

Once QOps-Build is completed, we will get an application without data. After reloading, the application will be available to work with data as the original one.


To get QlikView application files it is enough to have sources extracted and QOps settings in another folder. Having that, call the QOps-Build command.

QOps-Build


Once QOps-Build is completed, we will get an application without data. After reloading, the application will be available to work with data as the original one.



Git Integration

Sources codes may be committed to a repository with QOps. The QOps-Commit command executing will proceed with QOps-Prepare first and then will continue with committing source codes received to a local repository. QOps will ask for additional parameters such as Message and Local Branch.

QOps-Commit






Once command execution is completed, we will get all sources committed in a local .git repository.


In a such way, source codes might be pushed to a remote repository with QOps. The QOps-Push command executing will proceed with QOps-Prepare first and then will continue with pushing source codes received into a remote repository. QOps will ask for additional parameters such as Message, Local Branch and Remote Branch. For the first-time command using the -URL parameter is required. In further, it may be omitted.

QOps-Push -URL "[email protected]:git.user/remoterepo.git"


Once command execution is completed, we will see source codes extracted and pushed to the remote repository.

In a similar way, QOps works when source codes should be pulled from a remote repository. The QOps-Pull command will proceed with pulling source codes from a remote repository and after that build the Qlik Sense application. QOps will ask for additional parameters for Remote Branch and Local Branch. For the first-time command using the -URL parameter is required. In further, it may be omitted.



Once command execution is completed we will get all sources from the application committed in a local and pushed to a remote repository.

In a similar way, QOps works when source codes should be pulled from the remote repository. The QOps-Pull command will proceed with pulling source codes from the remote repository and after that build the QlikView application files. QOps will ask for additional parameters for Remote Branch and Local Branch.


QOps-Pull -URL "[email protected]:git.user/remoterepo.git"


Once QOps-Pull is completed, we will get an application without data. After reloading, an application will be available to work with data as the original one.



QOps-Pull -URL "[email protected]:git.user/remoterepo.git"


Once command execution is completed we will get the QlikView application file built from remote repository sources.

After reloading, the application will be available to work with data as the original one.


CI/CD pipeline

Following YAML script includes steps of source code fetching, application building and reloading. Check and Replace settings in the following sample file (GitLab/GitHub) and include it in the repository. Once the remote repository will be updated we will get the application built and reloaded using CI/CD.


name: qops-deploying
on:
push:
branches:
- 'master'
jobs:
qops-init:
name: "Setting QOps Configuration"
runs-on: [self-hosted, Windows, X64, QSense]
continue-on-error: false
steps:
- name: fetching from repository
uses: actions/checkout@v1
- name: environment details
run: PowerShell -Command '$env:UserName; $env:UserDomain; $env:ComputerName;'
- name: setting configuration
run: PowerShell QOps-SetConfig '-Filter """*""" -Ignore """*.log""" -License """XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX""" -Mode QlikSense -SenseUser """dvsts\demo""" -SenseCertificate """C:\\Users\\demo\\Documents\\client.pfx""" -SenseCertificatePassword """password""" -SenseUrl """https://server.com:4747/""";'
- name: checking QOps-License
run: PowerShell QOps-CheckLicense
- name: setting params
run: PowerShell QOps-SetFilter '"""Name=IBCS_demo,Owner=demo"""'
- name: showing params
run: PowerShell QOps-ShowDefault

qops-build:
name: "Building QlikSense Sources"
runs-on: [self-hosted, Windows, X64, QSense]
continue-on-error: false
needs: qops-init
steps:
- name: building
run: PowerShell QOps-Build

qops-reload:
name: "Reloading QlikSense Application"
runs-on: [self-hosted, Windows, X64, QSense]
continue-on-error: false
needs: qops-build
steps:
- name: reloading
run: PowerShell QOps-Reload '-Filter """Name=IBCS_demo,Owner=demo"""'



stages:
- configuration
- build

variables:
MY_BUILDS_DIR: $CI_BUILDS_DIR
MY_PROJECT_DIR: $CI_PROJECT_DIR
MY_VERSION: "$CI_SERVER_VERSION"

init:
stage: configuration
tags:
- windowsx64
script:
- PowerShell -Command "Get-Date"
- echo "$CI_PROJECT_DIR"
- echo "$PATH1"
- echo "$PATH2"
- echo "$MYCOMMANDEVAL"
- echo "$CI_BUILDS_DIR"
- echo "$CI_COMMIT_REF_NAME"
- powershell QOps-SetLicense """XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX"""
- powershell QOps-Activate
- powershell QOps-ShowDefault
- powershell QOps-CheckLicense

application:
stage: build
tags:
- windowsx64
script:
- PowerShell -Command "Get-Date"
- echo "$CI_PROJECT_DIR"
- echo "$PATH1"
- echo "$PATH2"
- echo "$MYCOMMANDEVAL"
- echo "$CI_BUILDS_DIR"
- powershell QOps-ShowDefault
- powershell QOps-CheckLicense
- powershell QOps-Version
- powershell QOps-Build -Filter """*ExampleProject*"""

when: on_success