Skip to content
Qlik Associative Engine discovery service for orchestrated environments.
JavaScript Python Shell Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Update minor and patch (#455) Apr 27, 2019
charts Mira oss move (#420) Feb 8, 2019
doc OpenApi spec 3.0 and 1.0 of our API (#414) Jan 30, 2019
examples Automated: Bump Docker images (#484) Aug 18, 2019
src Update dependency eslint-config-airbnb-base to v14 (#479) Aug 15, 2019
test Update dependency eslint-config-airbnb-base to v14 (#479) Aug 15, 2019
.editorconfig Aligned .gitattributes and .editorconfig (#60) Jun 29, 2017
.eslintignore Intial commit May 15, 2017
.eslintrc.json removed 100 chars max length (#107) Aug 30, 2017
.gitattributes Add Helm chart example and repo (#258) Mar 16, 2018
.gitignore Add Helm chart example and repo (#258) Mar 16, 2018
.yamllint.yml Mira oss move (#420) Feb 8, 2019
Dockerfile Update Node.js to v8.16.0 (#454) Apr 20, 2019
LICENSE Add LICENSE file to repo (#205) Dec 15, 2017
README.md Update readme and npm audit (#481) Aug 15, 2019
SwaggerDef.js OpenApi spec 3.0 and 1.0 of our API (#414) Jan 30, 2019
docker-compose.yml Automated: Bump Docker images (#484) Aug 18, 2019
docker-entrypoint.sh Support targetting a specific namespace within k8s (#417) Feb 1, 2019
generate_version_file.sh Rename SHA to revision to make it picked up by metrics (#295) Jun 12, 2018
package-lock.json Update readme and npm audit (#481) Aug 15, 2019
package.json Update dependency eslint-config-airbnb-base to v14 (#479) Aug 15, 2019
release.sh Update links and repo names after oss switch (#267) Apr 6, 2018
renovate.json Configure Renovate (#369) Sep 28, 2018

README.md

Mira - A Qlik Associative Engine Discovery Service

CircleCI Renovate enabled Coverage Status

Overview

Mira provides Qlik Associative Engine discovery in a Docker containerized environment. Mira is implemented on Node.js and supports different orchestration platforms such as Docker Swarm and Kubernetes. Mira can also operate in a simpler DNS mode and a Local mode.

The documentation in this repository is primarily intended for contributors to Mira development and for those who want to improve Mira by submitting issues.

For Mira's end-user documentation, see Qlik Core documentation site.

Contributing

Contributions are welcome and encouraged! See more info at Open Source at Qlik R&D.

Docker Image

Mira is distributed to end users as a the qlikcore/mira Docker image. Also see the Dockerfile. The version file needs to be generated before building the Docker image locally.

Running Mira as a Plain Node.js Process

For convenience and development purposes, Mira can be started as a non-Dockerized Node.js process. In this case, Mira would most commonly also be used in Local mode, so the MIRA_MODE environment variable should be provided accordingly:

$ MIRA_MODE=local npm start

Development

Editor/IDE Configuration

No particular editor or IDE is assumed. The repo root contains an .editorconfig file for editors that support it. If not, make sure that the used editor is configured accordingly.

Coding Guidelines

JavaScript code shall be developed according the Airbnb JavaScript Style Guide.

The eslintrc.json file incorporates these rules with minor modifications.

Install Packages

Once the repo has been cloned, in the repo root, run:

$ npm install

Generating version file

Mira will in run-time make use of build information e.g. commit SHA and version number. This information is already present in the Mira Docker image, but if running Mira as a non-dockerized process this file (version.json) must also be available locally. The file can be generated by running the following command:

./generate_version_file.sh

Generating the OpenAPI Specification

Mira's REST API is specified in the api-doc.yml OpenAPI document. The OpenAPI specification is generated from JSDoc by running:

$ npm run generate-openapi

Circle CI

Circle CI is configured to build a new Docker image from all pushed commits on all branches of Mira. As part of this, the built Docker image is pushed to Docker Hub. If pushing to a feature branch (different from master), the Docker image is tagged with <version>-<build-number>, where <version> is fetched from package.json, and <build-number> is the automatically increased Circle CI build number given to each build. If pushing to master the image is also tagged with latest.

Testing

Unit and component tests can be run with:

$ npm run test:unit
$ npm run test:component

These tests run Mira in isolation and does not depend on any external components.

Integration tests depend on external components. Before they can run, you must accept the Qlik Core EULA by setting the ACCEPT_EULA environment variable, you start the services by using the docker-compose.yml file:

$ ACCEPT_EULA=yes docker-compose up -d
$ npm run test:integration

To run integration tests towards a specific image tag, provide the TAG environment variable to docker-compose:

$ ACCEPT_EULA=yes TAG=:<YOUR TAG HERE> docker-compose up -d
$ npm run test:integration

See package.json for more test script variants.

Releasing

Mira service release

The helper script release.sh provides a convenient way to release a new version of the service and to automatically bump versions as needed.

Check usage information in release.sh on how to perform the release and version bumping by running:

$ release.sh -?
You can’t perform that action at this time.