Detalhes do pacote

automatiqal-cli

informatiqal198MIT0.15.1

CLI wrapper for automatiqal

qlik, sense, qlik-sense, qlik sense

readme (leia-me)

Automatiqal CLI (Beta)

ko-fi

Warning UNDER DEVELOPMENT

Automatiqal CLI is a NodeJS wrapper around Automatiqal package that allows automating Qlik Sense administration/deployment tasks by describing them in yaml/json files.

As the name suggests Automatiqal CLI is a command line/terminal tool.

Note At the moment only Qlik Sense Enterprise on Windows is supported! SaaS support is on the roadmap

Installation

Install as global module: npm install -g automatiqal-cli

Usage

  • All available commands can be displayed at any time by running automatiqal with the --help flag or running it without any flag:

    $ automatiqal --help $ automatiqal

    --file       -f     Location of the file, containing the run book data
    --variables, -v     Location of the variable file (if needed)
    --json              Indicates that the run book file is in JSON format
    --output,    -o     Saves the result in the provided path
    --connect,   -c     Test the connectivity. No tasks are ran
    --sample,    -s     Generate sample run book and variables files in the current folder
    --help,      -h     Shows this message
  • --file - pass the location of the yaml file $ automatiqal --file path/to/deployment/file.yaml

  • --variables - pass the location of the variables file $ automatiqal --file path/to/deployment/file.yaml --variables path/to/deployment/variables-file.yaml

  • --json - if the source file is in json format then --json flag should be added as an extra parameter $ automatiqal --file path/to/deployment/file.json --json

  • --output - to save the result of the run book in a json file $ automatiqal --file path/to/deployment/file.yaml --output path/to/result.json

  • --sample - generate sample yaml file in the current folder $ automatiqal --sample

Runbook examples

Have a look at the examples folder for list of example yaml files (btw these runbooks are used to test Automatiqal CLI itself)


Example of importing an app and publishing it to a new stream:

name: Sample run book
edition: windows
environment:
  host: ${host}
  port: 443
  proxy: jwt
  authentication:
    token: ${jwt_token}
tasks:
  - name: Import application
    description: Import brand new qvf
    operation: app.upload
    details:
      file: ${qvfLocation}
      name: Something New
  - name: Create stream
    operation: stream.create
    details:
      name: New Stream
  - name: Publish app
    operation: app.publish
    source: Import application
    details:
      stream: New Stream
      name: Something New (Published)

Creating new external task, trigger scheduling and tagging the task:

name: External Task operations
edition: windows
environment:
  host: ${host}
  port: 4242
  authentication:
    cert: ${certificate}
    key: ${certificate_key}
    user_dir: ${user_dir}
    user_name: ${user_name}
tasks:
  - name: Create tags
    operation: tag.createMany
    details:
      names: ["Tag Value 1", "Tag Value 2"]
  - name: Create external task
    operation: externalTask.create
    details:
      name: New external task
      path: c:\ProgramFiles\Qlik\Sense\ServiceDispatcher\Node\node.exe
      parameters: d:\temp\index.js
  - name: Add trigger schema to task
    operation: externalTask.addTriggerSchema
    filter: name eq 'New external task'
    details:
      name: Simple daily trigger
      repeat: Daily
      repeatEvery: 1
      startDate: 2022-02-07T14:30:00.000
  - name: Add multiple trigger schema to task
    operation: externalTask.addTriggerMany
    filter: name eq 'New external task'
    details:
      - name: Weekly trigger
        repeat: Weekly
        startDate: 2022-02-07T12:30:00.000
        daysOfWeek:
          - Monday
          - Wednesday
          - Sunday
      - name: Monthly trigger
        repeat: Monthly
        enabled: false
        startDate: 2022-02-07T13:30:00.000
        daysOfMonth: [1, 5, 10]
  - name: Update external task
    operation: externalTask.update
    filter: name eq 'New external task'
    details:
      tags:
        - Tag Value 1
        - Tag Value 2

Documentation

Have a look at Automatiqal package wiki pages or the official user documentation on how to structure the file and list of operations. More information will be added soon here as well

Schema

Great little addition is the availability of YAML schema. The schema greatly helps when writing runbooks. Please refer to the schema's repo on how to use it (in VSCode)

Warning The schema is also under development and some bugs/issues are possible/expected

Limitations

Demonstration

Short video how writing the runbook feels (with the json schema)

demo

Related projects

  • Automatiqal - Automatiqal CLI is the CLI wrapper of Automatiqal. The heavy lifting is done by the Automatiqal package. Automatiqal package can be used programmatically to process runbooks
  • Qlik Repo API - Automatiqal itself is using Qlik Repo API under the hood to communicate with Qlik Repo Service. Qlik Repo API abstracts the raw HTTP requests and exposes multiple methods that can be used without knowing the Qlik Repository Rest API specifics
  • Qlik SaaS API - Qlik SaaS API abstracts the raw HTTP requests and exposes multiple methods that can be used without knowing the Qlik SaaS Rest API specifics (to be used in Automatiqal to write SaaS runbooks)
  • Qlik Rest API - this package is the at the bottom of all. It allows communicating with various Qlik Rest API endpoints (Repository, Proxy, Engine etc)

changelog (log de mudanças)

Changelog

[0.15.1] - 2024-10-24

  • fix issue with rejectUnauthorized for single env certificate based runbooks
  • dependency updates

[0.15.0] - 2024-10-21

  • dependency updates
    • including the new pause command from Automatiqal

[0.14.0] - 2024-10-03

  • changes related to the new dryRyn option in Automatiqal
    • new argument/flag - dryRun
    • if its a dry run then do not read any files that will be imported/uploaded (if any)
    • if dry run then print extra message in the console indicating that this is indeed dry run
  • dependency updates

[0.13.0] - 2024-09-29

  • update to the latest Automatiqal and make the appropriate changes to handle multiple environments requirement
  • dependency updates

[0.12.0] - 2024-09-16

  • loop values can be provided from external files (csv, json and yaml) #269
  • dependency updates

[0.11.5] - 2024-09-12

  • dependency updates (including latest Automatiqal version)

[0.11.4] - 2024-09-06

  • update to latest version of Automatiqal

[0.11.3] - 2024-09-06

  • dependency updates

[0.11.2] - 2024-08-26

[0.11.1] - 2024-08-01

  • make the provided arguments lower case (not the values) #261

[0.11.0] - 2024-08-01

  • import tasks from external files #256
  • new command compile will import all external files, replace all variables (if needed) and will produce single runbook #256
  • dependency updates

[0.10.1] - 2024-07-12

  • --disableValidation, -d - skip schema validation option. Useful in small amount of cases
  • dependency updates

[0.10.0] - 2024-06-06

  • new argument --listvars/l. When provided the CLI will just output the list of variables that are defined/expected in the runbook

[0.9.0] - 2024-06-06

  • handle app.uploadMany case, where only location is passed and have to converted to list of files
  • dependency updates

[0.8.0] - 2024-06-03

  • new summary/s argument. When provided will store the summary output to the provided path (file) #246
  • dependency updates

[0.7.9] - 2024-05-31

  • clean the runbook content from any commented and empty lines before processing it #245
  • dependency updates

[0.7.8] - 2024-05-29

  • dependency updates

[0.7.7] - 2024-05-27

  • dependency updates

[0.7.6] - 2024-02-25

  • dependency updates

  • handle binary data masking for SaaS operations in the output

[0.7.4] - 2023-09-04

  • dependency updates
  • started testing with SaaS based runbooks
  • small fixes related to SaaS runbooks
  • --sample command is no split into two commands: --sample-win and --sample-saas

[0.7.3] - 2023-06-07

  • when uploading files use createReadStream instead of readFileSync. This should lower the resource usage when dealing with large files

[0.7.2] - 2023-06-05

  • If the export data have path property (ex. content libraries) then the same folder structure will be created #205

[0.7.1] - 2023-06-04

  • binary data for multiple exports (ex contentLibrary.exportMany) is replaced with placeholder message (in output)
  • dependency updates

[0.6.9] - 2023-06-01

  • binary data replace with placeholder message (in output) #143

[0.6.8] - 2023-05-29

  • raw output #198. If raw argument is provided then all other console messages are suppressed

[0.6.7] - 2023-05-22

  • updated console output format
  • dependency updates

[0.6.4] - 2023-03-16

  • dependency updates

[0.6.2] - 2023-03-04

  • core dependency updates

[0.6.1] - 2023-03-04

  • do not flag the inline variables as missing variables

[0.6.0] - 2023-02-12

  • flag to store the run output in a file #99
  • throw an error if unknown argument(s) are passed

[0.5.2] - 2023-02-10

  • fix issue with the post install script

[0.5.1] - 2023-02-10

  • do not flag the special values as missing

[0.5.0] - 2023-01-26

  • ability to download the runbook from http(s)
  • help command updated

[0.4.0] - 2023-01-25

  • environment and inline/command variables flags

[0.3.0] - 2023-01-14

  • warning is printed for unused variables

[0.2.0] - 2023-01-13

  • global variables flag

[0.1.1] - 2022-12-27

  • dependency updates
  • required NodeJS version >= 16.0.0

[0.1.0] - 2022-12-23

  • the schema link added to all examples
  • schema link added to the sample generated files
  • various bug fixes
  • dependencies are updated

[0.0.14] - 2022-03-29

  • [fix] Tasks for XXX.export commands no longer output the content of the binary, if --output argument is specified #21

[0.0.13] - 2022-03-23

  • dependency updates

[0.0.12] - 2022-03-22

  • [add] -c/--connect arguments to test runbook connectivity #19
  • [add] initial check - variable(s) are defined in the runbook but no variables file is passed #20
  • [add] because of #19 no files will be read if connection is testing (certificates are exclusion)
  • [fix] colors in the help menu

[0.0.11] - 2022-03-21

  • [fix] check for -f argument file existence. At the moment only --file was checked

[0.0.10] - 2022-03-08

  • [fix] do not exit on error thrown. The task that throw the error might have onError block that should be executed

[0.0.9] - 2022-03-02

  • [fix] import dependencies - import from the package and not from the local location

[0.0.8] - 2022-02-24

  • dependency and readme update

[0.0.7] - 2022-02-16

  • [add] -f is added as alternative to --file
  • [fix] sample and sample variable are updated to reflect the latest changes in the structure
  • [change] moved the non-yaml example files to assets folder
  • [change] the help info is shown if no arguments are passed
  • [change] the help message is updated

[0.0.6] - 2022-02-15

  • more examples
  • handling the export and exportMany operations and saving the file(s)
  • new task property location. Used with the export ops to point where to save the files

[0.0.5] - 2022-02-10

  • [add] small print/console messages changes
  • [add] more examples added (runbook-examples folder). More will follow

[0.0.4] - 2022-02-03

  • [add] variables file is supported
  • [add] runbook examples folder added
  • [add] using tests to run the runbook examples
  • [add] more debug options
  • [add] more error handling
  • [fix] various small fixes