Skip to main content

Selenium Grid Configuration

Selenium Grid Configuration

  • Selenium Grid helm chart https://github.com/SeleniumHQ/docker-selenium/blob/trunk/charts/selenium-grid/README.md

  • Changing the max concurrency setting for Node Deployment

    spec:
    containers:
    - env:
    - name: SE_NODE_MAX_SESSIONS
    value: "3"
    - name: SE_NODE_OVERRIDE_MAX_SESSIONS
    value: "true"
  • Add External Node

  • Need to expose TCP 4444, 4442, 4443 in ingress.

    1. Add the corresponding content to the configmap.

      apiVersion: v1
      data:
      '4442': jenkins/selenium-hub:4442
      '4443': jenkins/selenium-hub:4443
      kind: ConfigMap
      metadata:
      creationTimestamp: '2023-09-01T07:29:19Z'
      managedFields: <생략>
      name: selenium-hub-tcp-services
      namespace: jenkins
      resourceVersion: '146411402'
      uid: 286d5a55-c34b-40a8-b482-93d4503612ab

    2. Add port configuration to the Ingress controller Service.

      - name: proxied-tcp-4442
      nodePort: 30161
      port: 4442
      protocol: TCP
      targetPort: 4442
      - name: proxied-tcp-4443
      nodePort: 32092
      port: 4443
      protocol: TCP
      targetPort: 4443
    3. Add the configmap settings to the Ingress controller Deployment.

      spec:
      containers:
      - args:
      - /nginx-ingress-controller

      - '--tcp-services-configmap=jenkins/selenium-hub-tcp-services'
    4. If the devtools service is not available, check whether the SE_NODE_GRID_URL in selenium-node-config is a URL that can be accessed normally.

  • How to connect to the hub from an external node