Skip to content

Commit

Permalink
Updated to use templating-maven-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
VietND96 committed Sep 26, 2023
1 parent d2f4a85 commit c552d73
Show file tree
Hide file tree
Showing 17 changed files with 126 additions and 123 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ build/
### Helm ###
**/*.tgz
**/*.lock
**/patch-selenium-grid/charts
**/Chart.yaml
**/patch-selenium-grid/charts
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
This umbrella chart is created to deploy my motivation for a Scalable Selenium Grid, details as below

Fortunately, [Selenium-Grid Helm Chart](charts/selenium-grid/README.md) added autoscaling in default values.yaml from version [0.19.0](https://github.com/SeleniumHQ/docker-selenium/blob/trunk/charts/selenium-grid/CHANGELOG.md#heavy_check_mark-0190)

![Scalable Grid](docs/central_grid_diagram.png)

More details on my motivation are mentioned in the presentation [here](docs/Topic_Scalable-Parallel-AT_Publish.pdf).
Expand Down
6 changes: 3 additions & 3 deletions component-pvc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
<parent>
<groupId>org.ndviet</groupId>
<artifactId>test-scaling-grid</artifactId>
<version>23.5.0</version>
<version>${revision}</version>
</parent>

<artifactId>component-pvc</artifactId>

<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.kokuwa.maven</groupId>
Expand All @@ -32,7 +33,6 @@
</execution>
</executions>
<configuration>
<chartDirectory>${project.basedir}/src/main/resources</chartDirectory>
<chartVersion>${project.version}</chartVersion>
<outputDirectory>${project.parent.build.directory}/helm/repo</outputDirectory>
<lintStrict>true</lintStrict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: component-pvc
description: A Helm individual chart to create PV and PVC for a component in Grid
type: application
version: @chart.this.version@
appVersion: "@chart.this.version@"
version: ${chart.this.version}
appVersion: "${chart.this.version}"
6 changes: 3 additions & 3 deletions component-scaler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
<parent>
<groupId>org.ndviet</groupId>
<artifactId>test-scaling-grid</artifactId>
<version>23.5.0</version>
<version>${revision}</version>
</parent>

<artifactId>component-scaler</artifactId>

<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.kokuwa.maven</groupId>
Expand All @@ -32,7 +33,6 @@
</execution>
</executions>
<configuration>
<chartDirectory>${project.basedir}/src/main/resources</chartDirectory>
<chartVersion>${project.version}</chartVersion>
<outputDirectory>${project.parent.build.directory}/helm/repo</outputDirectory>
<lintStrict>true</lintStrict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: component-scaler
description: A Helm chart for Kubernetes
type: application
version: @chart.this.version@
appVersion: "@chart.this.version@"
version: ${chart.this.version}
appVersion: "${chart.this.version}"
6 changes: 3 additions & 3 deletions grid-autoscaling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
<parent>
<groupId>org.ndviet</groupId>
<artifactId>test-scaling-grid</artifactId>
<version>23.5.0</version>
<version>${revision}</version>
</parent>

<artifactId>grid-autoscaling</artifactId>

<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.kokuwa.maven</groupId>
Expand All @@ -32,7 +33,6 @@
</execution>
</executions>
<configuration>
<chartDirectory>${project.basedir}/src/main/resources</chartDirectory>
<chartVersion>${project.version}</chartVersion>
<outputDirectory>${project.parent.build.directory}/helm/repo</outputDirectory>
<lintStrict>true</lintStrict>
Expand Down
22 changes: 22 additions & 0 deletions grid-autoscaling/src/main/resources/grid-autoscaling/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v2
name: grid-autoscaling
description: A Helm chart for Kubernetes
type: application
version: ${chart.this.version}
appVersion: "${chart.this.version}"
dependencies:
- alias: scale-chrome-node
condition: scale-chrome-node.enabled
name: component-scaler
repository: file://../../../../component-scaler/target/classes/component-scaler
version: ${chart.this.version}
- alias: scale-firefox-node
condition: scale-firefox-node.enabled
name: component-scaler
repository: file://../../../../component-scaler/target/classes/component-scaler
version: ${chart.this.version}
- alias: scale-edge-node
condition: scale-edge-node.enabled
name: component-scaler
repository: file://../../../../component-scaler/target/classes/component-scaler
version: ${chart.this.version}

This file was deleted.

6 changes: 3 additions & 3 deletions grid-pvc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
<parent>
<groupId>org.ndviet</groupId>
<artifactId>test-scaling-grid</artifactId>
<version>23.5.0</version>
<version>${revision}</version>
</parent>

<artifactId>grid-pvc</artifactId>

<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.kokuwa.maven</groupId>
Expand All @@ -32,7 +33,6 @@
</execution>
</executions>
<configuration>
<chartDirectory>${project.basedir}/src/main/resources</chartDirectory>
<chartVersion>${project.version}</chartVersion>
<outputDirectory>${project.parent.build.directory}/helm/repo</outputDirectory>
<lintStrict>true</lintStrict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@ apiVersion: v2
name: grid-pvc
description: A Helm chart for Kubernetes
type: application
version: @chart.this.version@
appVersion: "@chart.this.version@"
version: ${chart.this.version}
appVersion: "${chart.this.version}"
dependencies:
- alias: selenium-chrome-node
condition: global.seleniumGrid.persistence.enabled,selenium-chrome-node.persistence.enabled
name: component-pvc
repository: file://../../../../../component-pvc/src/main/resources/component-pvc
version: @chart.this.version@
repository: file://../../../../component-pvc/target/classes/component-pvc
version: ${chart.this.version}
- alias: selenium-chrome-video
condition: global.seleniumGrid.persistence.enabled,selenium-chrome-video.persistence.enabled
name: component-pvc
repository: file://../../../../../component-pvc/src/main/resources/component-pvc
version: @chart.this.version@
repository: file://../../../../component-pvc/target/classes/component-pvc
version: ${chart.this.version}
- alias: selenium-firefox-node
condition: global.seleniumGrid.persistence.enabled,selenium-firefox-node.persistence.enabled
name: component-pvc
repository: file://../../../../../component-pvc/src/main/resources/component-pvc
version: @chart.this.version@
repository: file://../../../../component-pvc/target/classes/component-pvc
version: ${chart.this.version}
- alias: selenium-firefox-video
condition: global.seleniumGrid.persistence.enabled,selenium-firefox-video.persistence.enabled
name: component-pvc
repository: file://../../../../../component-pvc/src/main/resources/component-pvc
version: @chart.this.version@
repository: file://../../../../component-pvc/target/classes/component-pvc
version: ${chart.this.version}
- alias: selenium-edge-node
condition: global.seleniumGrid.persistence.enabled,selenium-edge-node.persistence.enabled
name: component-pvc
repository: file://../../../../../component-pvc/src/main/resources/component-pvc
version: @chart.this.version@
repository: file://../../../../component-pvc/target/classes/component-pvc
version: ${chart.this.version}
- alias: selenium-edge-video
condition: global.seleniumGrid.persistence.enabled,selenium-edge-video.persistence.enabled
name: component-pvc
repository: file://../../../../../component-pvc/src/main/resources/component-pvc
version: @chart.this.version@
repository: file://../../../../component-pvc/target/classes/component-pvc
version: ${chart.this.version}
18 changes: 10 additions & 8 deletions patch-selenium-grid/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.ndviet</groupId>
<artifactId>test-scaling-grid</artifactId>
<version>23.5.0</version>
<version>${revision}</version>
</parent>

<artifactId>patch-selenium-grid</artifactId>
Expand All @@ -18,6 +18,11 @@
<!-- process-resources: replace patch files to origin chart templates -->
<!-- package: package-patched-chart -->
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
</plugin>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
Expand Down Expand Up @@ -45,8 +50,8 @@
<configuration>
<target>
<untar compression="gzip"
dest="${project.basedir}/src/main/resources/patch-selenium-grid/charts">
<fileset dir="${project.basedir}/src/main/resources/patch-selenium-grid/charts">
dest="${project.basedir}/target/classes/patch-selenium-grid/charts">
<fileset dir="${project.basedir}/target/classes/patch-selenium-grid/charts">
<include name="*.tgz"/>
</fileset>
</untar>
Expand All @@ -61,7 +66,7 @@
</goals>
<configuration>
<target>
<copy todir="${project.basedir}/src/main/resources/patch-selenium-grid/charts/selenium-grid/templates">
<copy todir="${project.build.directory}/classes/patch-selenium-grid/charts/selenium-grid/templates">
<fileset
dir="${project.basedir}/src/main/resources/patch-selenium-grid/patch/templates"/>
</copy>
Expand All @@ -83,10 +88,10 @@
<goal>dependency-build</goal>
</goals>
<configuration>
<chartDirectory>${project.basedir}/src/main/resources</chartDirectory>
<chartVersion>${project.version}</chartVersion>
<outputDirectory>${project.parent.build.directory}/helm/repo</outputDirectory>
<useLocalHelmBinary>true</useLocalHelmBinary>
<autoDetectLocalHelmBinary>true</autoDetectLocalHelmBinary>
</configuration>
</execution>
<execution>
Expand All @@ -97,9 +102,6 @@
<goal>package</goal>
</goals>
<configuration>
<chartDirectory>
${project.basedir}/src/main/resources/patch-selenium-grid/charts/selenium-grid
</chartDirectory>
<chartVersion>${chart.selenium.version}</chartVersion>
<outputDirectory>${project.parent.build.directory}/helm/repo</outputDirectory>
<useLocalHelmBinary>true</useLocalHelmBinary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: patch-selenium-grid
description: A Helm chart for Kubernetes
type: application
version: ${chart.this.version}
appVersion: "${chart.this.version}"
dependencies:
- name: ${chart.selenium.name}
repository: ${chart.selenium.repository}
version: ${chart.selenium.version}
tags:
- selenium-grid

This file was deleted.

Loading

0 comments on commit c552d73

Please sign in to comment.