Skip to content
This repository was archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Simplified instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
tonikautto committed Sep 13, 2019
1 parent ef5f546 commit a55d2bc
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 65 deletions.
3 changes: 2 additions & 1 deletion 0-Install-Tools-Chocolatey-Win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

# Install Chocolatey package manager
# Reference https://chocolatey.org/install
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Set-ExecutionPolicy Bypass -Scope Process -Force
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

# Virtual box
choco install virtualbox --yes
Expand Down
11 changes: 9 additions & 2 deletions 1-Deploy-Minikube-Win.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#
param (

)

# Start minikube with 2 CPU and 8GB RAM
minikube start --memory 8000 --cpus=4

Expand All @@ -17,9 +22,11 @@ helm install --name qliksense-init qlik/qliksense-init
helm install -n qliksense qlik/qliksense -f values.yaml

# Wait until all pods are running
$pods_total_count = (kubectl get pods | Measure-Object).Count - 1
do {
$pods_running_count = ((kubectl get pods | Select-String -Pattern 'Running') | Measure-Object).Count
Start-Sleep -Seconds 20
$pods_list = kubectl get pods
$pods_total_count = ($pods_list | Measure-Object).Count - 1 # -1 to exclude header row
$pods_running_count = (($pods_list | Select-String -Pattern 'Running') | Measure-Object).Count
$pods_started_progress = [Math]::Floor(($pods_running_count / $pods_total_count)*100)
Write-Progress -Activity "Starting Kubernetes pods for Qlik Sense Enterprise" -Status "$pods_running_count of $pods_total_count ($pods_started_progress%) pods are in Running state:" -PercentComplete $pods_started_progress
} while ($pods_started_progress -lt 100)
Expand Down
92 changes: 92 additions & 0 deletions README-MacOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Deploy Qlik Sense for Kubernetes on local Minikube

This project simplifies the deployment of Qlik Sense Enterprise for Kubernetes (QSEoK) on local Minikube. This can be used for testing, but should not be applied in production environment.

This ReadMe focuses on deployment in MacOS, for Windows guideline see [README](README.md)

`values.yaml` contains the deployment configuration for QSEoK. Depending on your custom configuration this file may contain secret details e.g. related to authentication setup. Caution is advised on shairng your custom configuration file to others.

Scripts and details are based on default deployment of Qlik Sense April 2019 as described in related Qlik Help pages.

* [Qlik Sense Help](https://help.qlik.com/en-US/sense/Content/Sense_Helpsites/Home.htm)
* [Qlik Sense Enterprise on Kubernetes](https://help.qlik.com/en-US/sense/April2019/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/Deploying-Qlik-Sense-multi-cloud-Efe.htm)
* [Prepare install](https://help.qlik.com/en-US/sense/April2019/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/Preparing-Qlik-Sense-multi-cloud-Efe.htm)
* [Using Minikube](https://help.qlik.com/en-US/sense/April2019/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/using-minikube-qseok.htm)
* [Installing Qlik Sense Enterprise on Kubernetes](https://help.qlik.com/en-US/sense/April2019/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/Installing-Qlik-Sense-multi-cloud-Efe.htm)

## Pre-requisites

- Qlik Sense Enterprise signed license key
- Internet access

## Before you begin

Check that virtualization is enabled on your client machine.
Run the following command in terminal to confirm if virtualization is supported on macOS.
<br/>`sysctl -a | grep machdep.cpu.features`
<br/>If you see VMX in the output, the VT-x feature is supported on your OS.

## Install Tools
Tools only need to be installed once, and only if not already installed.

Below references use [Homebrew package manager for MacOS](https://brew.sh/).

1. Open Terminal
1. Install tool packages
- Virtualbox: `brew cask install virtualbox`
- Minikube: `brew cask install minikube`
- Kubectl: `brew install kubernetes-cli`
- Helm: `brew install kubernetes-helm`
1. Open Virtualbox GUI to confirm it was installed correctly
1. Open tools help to confirm successful install
- Minikube `minikube --help`
- Kubectl `kubectl --help`
- Helm `helm --help`

## Deploy Qlik Sense on Kubernetes on Minikube

1. Open Terminal
1. Start Minikube
<br/>`minikube start --memory 8000 --cpus=4`
<br/>Note: Set the kube size so it fits within available resources
1. Configure Kubesctl to target Minikube
<br/>`kubectl config set-cluster minikube`
1. Add Qlik's chart repository to Helm
<br/>`helm repo add qlik https://qlik.bintray.com/stable`
1. Initiate Helm for deployment into Kubernetes. Helm Tiller pod is added to the Kubernetes cluster first.
<br/>`helm init --wait`
1. Install custom resource definitions used by dynamic engines
<br/>`helm install --name qliksense-init qlik/qliksense-init`
1. Install the Qlik Sense packages
<br/>`helm install -n qliksense qlik/qliksense -f values.yaml`
1. List pods to see their current status
<br/>`kubectl get pods`
1. Repeat previous step until all pods (besides engine) are running.
<br/>Note, this takes several minutes.
1. Get Minikube IP address
<br/>`minikube ip`
1. Update local host file to enable resolving Minikube IP to *elastic.example*.
## Access Qlik Sense

1. Browse to console https://elastic.example:32443/console/
1. Apply license
1. Browse to Hub https://elastic.example:32443
<br/>User: [email protected]
<br/>Pwd: Password1!

## Remove deployment

1. Terminated and remove minikube instance <br /> `minikube delete`

## Troubleshooting

*Error: validation failed: error validating "": error validating data: unknown object type "nil" in Secret.data.redis-password`*

This error appears during Qlik package installation, when using Helm 2.14. Issue can be reoslve by downgrading to Helm 2.13.1. <br />

`choco install kubernetes-helm --version 2.13.1 --yes --force`

## License

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

90 changes: 28 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,27 @@

This project simplifies the deployment of Qlik Sense Enterprise for Kubernetes (QSEoK) on local Minikube. This can be used for testing, but should not be applied in production environment.

This ReadMe focuses on deployment in Windows, for MacOS guideline see [README-MacOS](README-MacOS.md)

`values.yaml` contains the deployment configuration for QSEoK. Depending on your custom configuration this file may contain secret details e.g. related to authentication setup. Caution is advised on shairng your custom configuration file to others.

Scripts and details are based on default deployment of Qlik Sense April 2019 as described in related Qlik Help pages.

* [Qlik Sense Help](https://help.qlik.com/en-US/sense/Content/Sense_Helpsites/Home.htm)
* [Qlik Sense Enterprise on Kubernetes](https://help.qlik.com/en-US/sense/April2019/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/Deploying-Qlik-Sense-multi-cloud-Efe.htm)
* [Prepare install](https://help.qlik.com/en-US/sense/April2019/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/Preparing-Qlik-Sense-multi-cloud-Efe.htm)
* [Using Minikube](https://help.qlik.com/en-US/sense/April2019/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/using-minikube-qseok.htm)
* [Installing Qlik Sense Enterprise on Kubernetes](https://help.qlik.com/en-US/sense/April2019/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/Installing-Qlik-Sense-multi-cloud-Efe.htm)
* [Qlik Sense Enterprise on Kubernetes](https://help.qlik.com/en-US/sense/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/Deploying-Qlik-Sense-multi-cloud-Efe.htm)
* [Prepare install](https://help.qlik.com/en-US/sense/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/Preparing-Qlik-Sense-multi-cloud-Efe.htm)
* [Using Minikube](https://help.qlik.com/en-US/sense/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/using-minikube-qseok.htm)
* [Installing Qlik Sense Enterprise on Kubernetes](https://help.qlik.com/en-US/sense/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/Installing-Qlik-Sense-multi-cloud-Efe.htm)

## Pre-requisites

- Qlik Sense Enterprise signed license key
- Package manager installed
- Windows: [Install Chocolatey](https://chocolatey.org/install)
- MacOS: [Install Homebrew](https://brew.sh/)
- Tools to run and envrionment
- Virtualbox
- Minikube
- Kubectl
- Helm
- Internet access

## Before you begin

Check that virtualization is enabled on your client machine.

### Windows

Run `systeminfo` command in Powershell to confirm if virtualization is enabled on your computer.
If you see the following output, virtualization is supported on Windows.
If you do not get below details, please enable virtualization (VT-x feature) in BIOS settings.
Expand All @@ -41,72 +33,46 @@ Hyper-V Requirements: VM Monitor Mode Extensions: Yes
Data Execution Prevention Available: Yes
```

### MacOS

Run the following command in terminal to confirm if virtualization is supported on macOS.
<br/>`sysctl -a | grep machdep.cpu.features`
<br/>If you see VMX in the output, the VT-x feature is supported on your OS.

## Install Tools
Tools only need to be installed once, and only if not already installed.

Below references use [Chocolatey package manager for Windows](https://chocolatey.org/) or [Homebrew package manager for MacOS](https://brew.sh/).

1. Open terminal
- Windows: PowerShell terminal as Administrator
- MacOS: Terminal
1. Install tool packages
- Windows
- Virtualbox: `choco install virtualbox --force --yes`
- Minikube: `choco install minikube --force --yes`
- Kubectl: `choco install kubernetes-cli --force --yes`
- Helm: `choco install kubernetes-helm --force --yes`
- MacOS
- Virtualbox: `brew cask install virtualbox`
- Minikube: `brew cask install minikube`
- Kubectl: `brew install kubernetes-cli`
- Helm: `brew install kubernetes-helm`
1. Open Virtualbox GUI to confirm it was instaleld correctly
1. Open tools help to confirm successful install
Tools only need to be installed once, and only if not already installed.
* Virtualbox
* Minikube
* Kubectl
* Helm

The attached script [0-Install-Tools-Chocolatey-Win.ps1](0-Install-Tools-Chocolatey-Win.ps1) uses [Chocolatey package manager for Windows](https://chocolatey.org/) to install all the required tools.

Either install manually following below commands _OR_ run attached [0-Install-Tools-Chocolatey-Win.ps1](0-Install-Tools-Chocolatey-Win.ps1)

1. Open PowerShell terminal as Administrator
1. Run [0-Install-Tools-Chocolatey-Win.ps1](0-Install-Tools-Chocolatey-Win.ps1)
1. Open Virtualbox GUI to confirm it was installed correctly
1. Interact with tools in Powershell temrinal to validate they were installed
- Minikube `minikube --help`
- Kubectl `kubectl --help`
- Helm `helm --help`

## Deploy Qlik Sense on Kubernetes on Minikube

1. Open Powershell (Run as Administrator) in Windows _or_ Terminal in MacOS
1. Start Minikube
<br/>`minikube start --memory 8000 --cpus=4`
<br/>Note: Set the kube size so it fits within available resources
1. Configure Kubesctl to target Minikube
<br/>`kubectl config set-cluster minikube`
1. Add Qlik's chart repository to Helm
<br/>`helm repo add qlik https://qlik.bintray.com/stable`
1. Initiate Helm for deployment into Kubernetes. Helm Tiller pod is added to the Kubernetes cluster first.
<br/>`helm init --wait`
1. Install custom resource definitions used by dynamic engines
<br/>`helm install --name qliksense-init qlik/qliksense-init`
1. Install the Qlik Sense packages
<br/>`helm install -n qliksense qlik/qliksense -f values.yaml`
1. List pods to see their current status
<br/>`kubectl get pods`
1. Repeat previous step until all pods (besides engine) are running.
<br/>Note, this takes several minutes.
5. Open PowerShell terminal
1. Run deployment script [1-Deploy-Minikube-Win.ps1](1-Deploy-Minikube-Win.ps1)
1. Get Minikube IP address
<br/>`minikube ip`
1. Update local host file to enable resolving Minikube IP to *elastic.example*.
<br/>Windows: *C:\Windows\System32\drivers\etc\hosts*
<br/>MacOS:
Windows hostfile in *C:\Windows\System32\drivers\etc* to include row with IP from previous refering to *elastic.example* <br /> `<IP ADDRESS> elastic.example`
1. Browse to console https://elastic.example:32443/console/
<br/>Windows hostfile in *C:\Windows\System32\drivers\etc* to include row with IP from previous refering to *elastic.example* <br /> `<IP ADDRESS> elastic.example`

## Access Qlik Sense

9. Browse to console https://elastic.example:32443/console/
1. Apply license
1. Browse to Hub https://elastic.example:32443
<br/>User: [email protected]
<br/>Pwd: Password1!

## Remove deployment

1. Terminated and remove minikube instance <br /> `minikube delete`
12. Terminated and remove minikube instance <br /> `minikube delete`

## Troubleshooting

Expand Down

0 comments on commit a55d2bc

Please sign in to comment.