Healenium.io on Kubernetes
This project is created to install Healenium on Kubernetes with Helm.
It is suitable to both language agnostic solution Healenium-Proxy which able to use all selenium supported languages like Java/Python/JS/C# and exclusively Java tests based on Healenium-Web lib.
It describes installation of all mandatory services to run the application.
- Deployments and Service files of:
Hlm-Proxy,Hlm-Backend,Hlm-Selector-Imitator Ingressobject to access the servicesvalues.yamlwhich exposes a few of the configuration options
PostgreSQL(Helm chart installation)Selenium-Grid(Helm chart installation) (for Healenium-Proxy)
All configuration variables are presented in value.yaml file.
Before you deploy Healenium you should have installed all its dependencies (requirements). You should have Kubernetes cluster is up and running. Please follow the guides below to run your Kubernetes cluster on different platforms.
You can now install Healenium directly from our public Helm repository without cloning the repository!
helm repo add healenium https://healenium.github.io/kubernetes
helm repo updatehelm repo add bitnami https://charts.bitnami.com/bitnami
helm install db bitnami/postgresql \
--set global.postgresql.auth.postgresPassword=admin \
--set global.postgresql.auth.username=healenium_user \
--set global.postgresql.auth.password=YDk2nmNs4s9aCP6K \
--set global.postgresql.auth.database=healenium \
--set primary.persistence.enabled=trueSkip this step if you use healenium-web lib
helm repo add docker-selenium https://www.selenium.dev/docker-selenium
helm install selenium-grid docker-selenium/selenium-gridhelm install healenium healenium/healeniumhelm install healenium healenium/healenium --set hlmproxy.enable=falsehelm install healenium healenium/healenium -f your-custom-values.yamlhelm search repo healenium -lhelm upgrade healenium healenium/healenium --version 2.1.9For detailed installation instructions and manual setup, see the Minikube installation section below.
Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a Virtual Machine (VM) on your laptop.
Make sure you have kubectl installed. You can install kubectl according to the instructions in Install and Set Up kubectl guide
Start Minikube with the options:
minikube startInstall the Ingress plugin:
minikube addons enable ingressInitialize Helm repositories:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add healenium https://healenium.github.io/kubernetes
helm repo updateNote: You can now install Healenium directly from the public Helm repository without cloning! For development or customization, you can still clone the repository:
git clone https://github.com/healenium/kubernetes.git cd kubernetes helm dependency build
Install PostgreSQL Helm chart
helm install <postgresql-release-name> bitnami/postgresql --set global.postgresql.auth.postgresPassword=<admin-password>,global.postgresql.auth.username=<healenium-user-name>,global.postgresql.auth.password=<healenium-user-password>,global.postgresql.auth.database=<healenium-database> -f ./postgresql/values.yamlExample:
helm install db bitnami/postgresql --set global.postgresql.auth.postgresPassword=admin,global.postgresql.auth.username=healenium_user,global.postgresql.auth.password=YDk2nmNs4s9aCP6K,global.postgresql.auth.database=healenium -f ./postgresql/values.yamlInstall Selenium-Grid Helm chart:
You don't need to install Selenium-Grid if you use healenium-web lib. If so skip this step
Full instruction to installing the Selenium-Grid you can find here
Initialize Docker-Selenium Helm package manager:
helm repo add docker-selenium https://www.selenium.dev/docker-selenium && helm repo updateInstall Selenium-Grid Helm chart:
helm install selenium-grid docker-selenium/selenium-gridBefore you deploy Healenium you should have installed all its requirements. Their versions are described in requirements.yaml You should also specify correct PostgreSQL and Selenium-Grid addresses and ports in values.yaml You can use default values the following params 'user', 'dbName', 'schema' and 'password' or specify your custom.
postgresql:
installdep:
enable: false
endpoint:
address: <postgresql-release-name>-postgresql.default.svc.cluster.local
port: 5432
user: healenium_user
dbName: healenium
schema: healenium
password: YDk2nmNs4s9aCP6K
hlmproxy:
# IF YOU USE HLM-WEB FOR JAVA TESTS SET ENABLE TO false
enable: true
name: hlm-proxy
repository: healenium/hlm-proxy
tag: 2.1.9
port: 8085
resources:
requests:
cpu: 200m
memory: 1024Mi
limits:
cpu: 1000m
memory: 2048Mi
environment:
selenium_server_url: http://selenium-hub.default.svc:4444/
appium_server_url: http://host.docker.internal:4723/wd/hub
hlm_log_level: info
healing:
healenabled: true
recoverytries: 1
scorecap: .6Deploy Healenium from public Helm repository:
Option 1: With Proxy (for all Selenium languages - Java/Python/JS/C#):
helm install healenium healenium/healeniumOption 2: Java only (using Healenium-Web lib):
helm install healenium healenium/healenium --set hlmproxy.enable=falseOption 3: From local files (for development/customization):
# If you cloned the repository
helm install healenium .
# or with proxy disabled
helm install healenium --set hlmproxy.enable=false .If you use Healenium Chart within healenium-web be sure to check hlm.server.url and hlm.imitator.url in the healenium.properties .
Both should be specified without ports as used ingress-controller
hlm.server.url = http://localhost
hlm.imitator.url = http://localhostThe default URL to reach the ReportPortal UI page is http://healenium.k8s.com. Make sure that the URL is added to your host file and the IP is the K8s IP address
The command to get an IP address of Minikube:
minikube ipExample of the host file:
192.168.99.100 healenium.k8s.com