selenium

by Warxcell

Helm chartv2.1.0App 4.0.0

A Helm chart for creating a Selenium grid server in Kubernetes

About this chart

Selenium-Grid Helm Chart

This chart enables the creation of a Selenium grid server in Kubernetes.

Installing the chart

To install the selenium-grid helm chart, you can run:

# Clone the project
git clone https://github.com/pedrodotmc/docker-selenium.git

# Install basic grid
helm install selenium-grid docker-selenium/chart/selenium-grid/.

# Or install full grid (Router, Distributor, EventBus, SessionMap and SessionQueuer components separated)
helm install selenium-grid --set isolateComponents=true docker-selenium/chart/selenium-grid/.

Updating Selenium-Grid release

Once you have a new chart version, you can update your selenium-grid running:

helm upgrade selenium-grid docker-selenium/chart/selenium-grid/.

Uninstalling Selenium Grid release

To uninstall:

helm uninstall selenium-grid

Configuration

For now, global configuration supported is:

ParameterDefaultDescription
global.selenium.imageTag4.0.0-20211025Image tag for all selenium components
global.selenium.nodesImageTag4.0.0-20211025Image tag for browser's nodes

This table contains the configuration parameters of the chart and their default values:

ParameterDefaultDescription
isolateComponentsfalseDeploy Router, Distributor, EventBus, SessionMap and Nodes separately
busConfigMap.annotations{}Custom annotations for configmap
chromeNode.enabledtrueEnable chrome nodes
chromeNode.replicas1Number of chrome nodes
chromeNode.imageNameselenium/node-chromeImage of chrome nodes
chromeNode.imageTag4.0.0-20211025Image of chrome nodes
chromeNode.imagePullPolicyIfNotPresentImage pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images)
chromeNode.ports[5553]Port list to enable on container
chromeNode.seleniumPort5900Selenium port (spec.ports[0].targetPort in kubernetes service)
chromeNode.seleniumServicePort6900Selenium port exposed in service (spec.ports[0].port in kubernetes service)
chromeNode.annotations{}Annotations for chrome-node pods
chromeNode.labels{}Labels for chrome-node pods
chromeNode.resourcesSee values.yamlResources for chrome-node container
chromeNode.tolerations[]Tolerations for chrome-node container
chromeNode.nodeSelector{}Node Selector for chrome-node container
chromeNode.extraEnvironmentVariablesnilCustom environment variables for chrome nodes
chromeNode.service.enabledtrueCreate a service for node
chromeNode.service.typeClusterIPService type
chromeNode.service.annotations{}Custom annotations for service
chromeNode.dshmVolumeSizeLimit1GiSize limit for DSH volume mounted in container (if not set, default is "1Gi")
firefoxNode.enabledtrueEnable firefox nodes
firefoxNode.replicas1Number of firefox nodes
firefoxNode.imageNameselenium/node-firefoxImage of firefox nodes
firefoxNode.imageTag4.0.0-20211025Image of firefox nodes
firefoxNode.imagePullPolicyIfNotPresentImage pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images)
firefoxNode.ports[5553]Port list to enable on container
firefoxNode.seleniumPort5900Selenium port (spec.ports[0].targetPort in kubernetes service)
firefoxNode.seleniumServicePort6900Selenium port exposed in service (spec.ports[0].port in kubernetes service)
firefoxNode.annotations{}Annotations for firefox-node pods
firefoxNode.labels{}Labels for firefox-node pods
firefoxNode.resourcesSee values.yamlResources for firefox-node container
firefoxNode.tolerations[]Tolerations for firefox-node container
firefoxNode.nodeSelector{}Node Selector for firefox-node container
firefoxNode.extraEnvironmentVariablesnilCustom environment variables for firefox nodes
firefoxNode.service.enabledtrueCreate a service for node
firefoxNode.service.typeClusterIPService type
firefoxNode.service.annotations{}Custom annotations for service
firefoxNode.dshmVolumeSizeLimit1GiSize limit for DSH volume mounted in container (if not set, default is "1Gi")
edgeNode.enabledtrueEnable edge nodes
edgeNode.replicas1Number of edge nodes
edgeNode.imageNameselenium/node-edgeImage of edge nodes
edgeNode.imageTag4.0.0-20211025Image of edge nodes
edgeNode.imagePullPolicyIfNotPresentImage pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images)
edgeNode.ports[5553]Port list to enable on container
edgeNode.seleniumPort5900Selenium port (spec.ports[0].targetPort in kubernetes service)
edgeNode.seleniumServicePort6900Selenium port exposed in service (spec.ports[0].port in kubernetes service)
edgeNode.annotations{}Annotations for edge-node pods
edgeNode.labels{}Labels for edge-node pods
edgeNode.resourcesSee values.yamlResources for edge-node container
edgeNode.tolerations[]Tolerations for edge-node container
edgeNode.nodeSelector{}Node Selector for edge-node container
edgeNode.extraEnvironmentVariablesnilCustom environment variables for firefox nodes
edgeNode.service.enabledtrueCreate a service for node
edgeNode.service.typeClusterIPService type
edgeNode.service.annotations{}Custom annotations for service
edgeNode.dshmVolumeSizeLimit1GiSize limit for DSH volume mounted in container (if not set, default is "1Gi")
customLabels{}Custom labels for k8s resources

Configuration for Selenium-Hub

You can configure the Selenium Hub with this values:

ParameterDefaultDescription

Deploy selenium with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has selenium on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartselenium is pinned at v2.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply