Docker-selenium: Selenium Grid Helm Chart

Created on 23 Jan 2021  路  14Comments  路  Source: SeleniumHQ/docker-selenium

馃殌 Feature Proposal

Hi guys. I worked in a Helm Chart for deploying the Selenium Grid in Kubernetes. Currently, I've seen two alternatives:

But the helm chart stored in the official helm repository is deprecated, and the @ambirag's helm chart seems to be outdated.

I'm taking as reference k8s-deployment-full-grid.yaml file adding an opera node as well. This is the Helm Chart:

https://github.com/pedrodotmc/docker-selenium/tree/selenium-grid-helm-chart/chart/selenium-grid

I don't know whether to add the helm chart folder to this repository or to create a new one. I await your comments!

Motivation

Currently, there is no (or I don't know) a Helm Chart that supports the deployment of Selenium Grid components separately.

Example

# 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/.
enhancement

Most helpful comment

How's this coming along? We'd like to get moved off the selenium chart in the old /stable repo if this is the new official one

All 14 comments

Thank you for this, @pedrodotmc! This is something we really need :)
Please allow us a few days to complete other Grid related tasks and we'll back to you!

Also very much interested in this. Particularly if it's brought up to date to support the opera and edge nodes as options too

This is amazing! I just adopted your code, built a Helm Chart to our private repository, and now using the Hub.

Do you plan to add optional arguments to Hub, or is it configurable through environment variables, for example -timeout 30?

As a user of both Kubernetes and Selenium I wanted to provide some early feedback which might be useful.
On first glance it's great work! This saved me building our own.

I've noticed a few things which you might want to implement/consider:

  • Services for all browsers are created even when they are not used. Selenium talks to each individual node directly so don't need the service IP's. If the aim is to provide a service for the VNC port I would suggest you create a service for each node individually and also use that with the registration, otherwise you have a 1 in x chance to get the right node. perhaps redesigning them into stateful sets could help with giving them a consistent naming.
  • Currently people will have to talk to the selenium-router service for submitting jobs and the UI. This might be confusing. I would suggest creating a selenium service for all user interaction.
  • All image tags are done individually. I would suggest adding a global part and add the imageTag there for the default value which can be overwritten individually. this way it's much easier to bump the version instead of doing it everywhere separately.
  • The /dev/shm is currently unbound. Browsers can do weird things. I think it would be wise to limit the size to 1GB or something sensible.

This is amazing! I just adopted your code, built a Helm Chart to our private repository, and now using the Hub.

Do you plan to add optional arguments to Hub, or is it configurable through environment variables, for example -timeout 30?

Hi @zzvara Currently, it's configurable through environment variables. If you deploy selenium separately, variables that you define will be added to all components.

@pedrodotmc happy to collaborate / help with anything you need. I'm planning to deploy this into my staging environment pretty soon :-)

This is amazing! I just adopted your code, built a Helm Chart to our private repository, and now using the Hub.
Do you plan to add optional arguments to Hub, or is it configurable through environment variables, for example -timeout 30?

Hi @zzvara Currently, it's configurable through environment variables. If you deploy selenium separately, variables that you define will be added to all components.

I could not figure out how to do that? Could you demonstrate? Thanks!

@zzvara Sorry for answering late, I'm been very busy with othe stuff. You can set variables in your values.yaml, something like this:

hub:
  extraEnvironmentVariables:
    - name: SE_SESSION_REQUEST_TIMEOUT
      value: "300"

In the same way, if you deploy components separately:

components:
  extraEnvironmentVariables:
    - name: SE_SESSION_REQUEST_TIMEOUT
      value: "300"

Or you can use your custom docker image as well.

Hey guys, I'm been very busy last days, but I just implemented a new version with @electrical suggestions (except creation of selenium service, i think i'll need some help for implementing that). You can clone new version from branch selenium-grid-helm-chart-0.2.0, or if you prefer first version, it's in selenium-grid-helm-chart-0.1.0 branch.
Thanks @electrical for your feedback.

@pedrodotmc changes look great. I'll try it out on the weekend and review. Thank you again for the great work on this!

@pedrodotmc we are testing the new version as well.

In isolated deployment, the Grid does not seem to be working on our cluster. https://github.com/SeleniumHQ/docker-selenium/issues/1222

Deployed the updated version over the weekend and all looks good :-) @diemol perhaps worth for Selenium to setup a small helm repo for this?

@pedrodotmc, are you in the Selenium Slack or IRC? If not, could you please join and reach out to me? Thank you! 馃檱

How's this coming along? We'd like to get moved off the selenium chart in the old /stable repo if this is the new official one

Was this page helpful?
0 / 5 - 0 ratings