Qlik Sense for Elastic in GCP with GKE through Terraform

Automation of Qlik Sense for Elastic (QSEfE) deployment in Google Cloud Platform (GCP). Currently I have not found a way to run the required installation shell scripts directly in GKE's GCE instances, so the QSEfE installation is deployed for client side.

See Windows Subsystem for Linux as an option to run this from a Windows client.

Prerequisites

Qlik Sense for Elastic (QSEfE)

  • Qlik license
  • Qlik Sense for Windows (QSEfW) on a central node
  • SSO IdP that supports OIDC and SAML

Client side tools

  • Terraform - Infrastructure as code
  • Gcloud SDK - Google Cloud Platform (GCP) interaction
  • kubectl - Kubernetes CLI
  • helm - Kubernetes applications manager

Google Cloud Platform (GCP)

The deployment requires an account with remaining credits or with enabled billing.

  1. Login to GCP
    gcloud auth login your@mail.com
  2. Create project for QSEfE deployment
    gcloud projects create qsefe-gke-tf --name='QSEfE in GKE through Terraform'
  3. Set new project as active
    gcloud config set project qsefe-gke-tf
  4. Add service account to project
    gcloud iam service-accounts create qsefe-sa --display-name='QSEfE Service Account'
  5. Create GCP account file
    gcloud iam service-accounts keys create account.json --iam-account qsefe-sa@qsefe-gke-tf.iam.gserviceaccount.com
  6. Bind servcie account to required roles
    • Kubernetes Engine Admin
      gcloud projects add-iam-policy-binding qsefe-gke-tf --member serviceAccount:qsefe-sa@qsefe-gke-tf.iam.gserviceaccount.com --role roles/container.admin
    • Compute Engine Admin
      gcloud projects add-iam-policy-binding qsefe-gke-tf --member serviceAccount:qsefe-sa@qsefe-gke-tf.iam.gserviceaccount.com --role roles/compute.admin

Terraform Configuration

variables.tfvars.template contains a template for defining the variables used by terraform manifests

  1. Copy variable template
    cp variables.tfvars.template variables.auto.tfvars
  2. Edit variable to match your setup and requirements
    vim variables.auto.tfvars
  3. Terraform automatically picks up variables from .auto.tfvars files
    terraform plan

Deploy

  1. Login to GCP gcloud auth login your@mail.com
  2. Initiate Terrafrom terraform init
  3. Validate config terraform plan
  4. Deploy GCP infrastructure and install Qlik Sense for Elastic terraform apply

Destroy

  1. Deploy Qlik Sense terraform destroy

License

This project is provided "AS IS", without any warranty, under the MIT License - see the LICENSE file for details