Skip to content

Commit

Permalink
Merge pull request #2 from ndviet/dynamic-grid
Browse files Browse the repository at this point in the history
Add WebDAV service to access and browse videos and data of Node
  • Loading branch information
VietND96 authored Oct 24, 2023
2 parents 18c614f + 625e821 commit 35702f2
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 253 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ More details on my motivation are mentioned in the presentation [here](docs/Topi
2. Helm v3 (Tested version v3.11.3)
3. Kubernetes (Tested version v1.25.5 - Runtime: Docker v20.10.24 - Provisioned by Minikube v1.26.1)

Noted: At the moment, chart supports PersistenceVolume on local HostPath only. Other types of PV will be added later.

## Install the chart

```shell
Expand Down Expand Up @@ -38,6 +40,20 @@ Built chart is located under target/helm/repo/scalable-selenium-grid-x.x.x.tgz

## Change Log

### :heavy_check_mark: 23.10.24
**Removed**
- Scripts, configs in video-recording are initialized when build Docker image. Refer to [source repo](../../../docker-selenium/tree/trunk/Video).

**Updated**
- Node directory `/home/seluser/Downloads` is mounted to `<pv_path>/data/$POD_NAME`.
- For traceability, a session is run in which node `$POD_NAME` is logged in file `<pv_path>/data/$SESSION_ID.txt`.
- New image for video-recording `ndviet/video:ffmpeg-6.0-alpine-20231024`.

**Added**
- [WebDAV](../../../test-webdav-docker) service is deployed to access and browse data and videos of distributed nodes remotely.
- By default, WebDAV is exposed via ingress TCP host port `8080`. Change another port via `ingress-nginx.tcp` in scalable-selenium-grid/values.yaml.
- Videos and node data can be browsed via WebDAV client.

### :heavy_check_mark: 23.10.19
**Updated**
- Chart dependencies:
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: selenium-tracing-config
namespace: {{ .Release.Namespace }}
{{- with .Values.nodeConfigMap.annotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "seleniumGrid.commonLabels" . | nindent 4 }}
{{- with .Values.customLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
data:
SE_ENABLE_TRACING: {{ (.Values.global.seleniumGrid.tracing).enabled | default "false" | quote }}
{{- $jaegerEndpoint := (.Values.global.seleniumGrid.tracing).jaegerEndpoint | default (printf "http://%s-jaeger-all-in-one-headless:14250" .Release.Name) }}
{{- $jaegerEndpoint := tpl $jaegerEndpoint . }}
{{- $JAVA_OPTS := printf "-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=%s -Dotel.resource.attributes=service.name=selenium -Dotel.java.global-autoconfigure.enabled=true" $jaegerEndpoint }}
JAVA_OPTS: {{ $JAVA_OPTS | quote }}
7 changes: 5 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
</modules>

<properties>
<revision>23.10.19</revision>
<revision>23.10.24</revision>
<exec.executable>bash</exec.executable>
<exec.overrides>-c</exec.overrides>
<chart.this.version>${project.version}</chart.this.version>
<chart.selenium.name>selenium-grid</chart.selenium.name>
<chart.selenium.repository>https://www.selenium.dev/docker-selenium</chart.selenium.repository>
<chart.selenium.version>0.22.0</chart.selenium.version>
<chart.images.video.tag>ndviet/video:ffmpeg-6.0-alpine-20231019</chart.images.video.tag>
<chart.images.video.tag>ndviet/video:ffmpeg-6.0-alpine-20231024</chart.images.video.tag>
<chart.jaeger.name>jaeger-all-in-one</chart.jaeger.name>
<chart.jaeger.repository>https://raw.githubusercontent.com/hansehe/jaeger-all-in-one/master/helm/charts</chart.jaeger.repository>
<chart.jaeger.version>0.1.11</chart.jaeger.version>
Expand All @@ -35,6 +35,9 @@
<chart.keda.name>keda</chart.keda.name>
<chart.keda.repository>https://kedacore.github.io/charts</chart.keda.repository>
<chart.keda.version>2.12.0</chart.keda.version>
<chart.webdav.name>webdav</chart.webdav.name>
<chart.webdav.repository>https://www.ndviet.org/charts</chart.webdav.repository>
<chart.webdav.version>4.3.0</chart.webdav.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
5 changes: 5 additions & 0 deletions scalable-selenium-grid/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
<url>${chart.keda.repository}</url>
<forceUpdate>true</forceUpdate>
</helmExtraRepo>
<helmExtraRepo>
<name>${chart.webdav.name}</name>
<url>${chart.webdav.repository}</url>
<forceUpdate>true</forceUpdate>
</helmExtraRepo>
</helmExtraRepos>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,12 @@ dependencies:
version: ${chart.ingress.version}
tags:
- full
- ingress-nginx
- ingress-nginx

- condition: global.webdav.enabled, webdav.enabled
name: ${chart.webdav.name}
repository: ${chart.webdav.repository}
version: ${chart.webdav.version}
tags:
- full
- webdav
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
TestOps Autoscaling Selenium Grid ecosystem deployed successfully.

{{- $pvEnabled := index .Values "grid-pvc" "selenium-node" "persistence" "pv" "enabled" }}
{{- if and .Values.global.seleniumGrid.persistence.enabled $pvEnabled }}
Noted: Please ensure local hostPath directory is created and set permissions correctly. If not created yet, kindly execute below commands once!
{{- $hostPathDir := index .Values "grid-pvc" "selenium-node" "persistence" "pv" "hostPath" "path" }}
---
sudo mkdir -p {{ $hostPathDir }}
sudo chown 999 {{ $hostPathDir }}
sudo chmod 755 {{ $hostPathDir }}
---
{{- end }}
Empty file.
Loading

0 comments on commit 35702f2

Please sign in to comment.