Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making SSH Nodes work both on Linux and Windows based systems #25291

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

name: Build on Ubuntu

on:
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Install Maven
run: |
curl -s -S -o ./apache-maven-3.9.9-bin.zip https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.zip
unzip -q ./apache-maven-3.9.9-bin.zip
- name: Build with Maven
# qa skips documentation - we check it on Jenkins CI
# We skip checkstyle too - we check it on Jenkins CI
run: ./apache-maven-3.9.9/bin/mvn -B -e -ntp install -Pstaging -Pqa '-Dcheckstyle.skip=true'
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_API_TOKEN }}
9 changes: 4 additions & 5 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

name: Build on Windows 2022
name: Build on Windows

on:
pull_request:
Expand All @@ -12,20 +12,19 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Install Maven
run: |
curl.exe -o ./apache-maven-3.9.9-bin.zip https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.zip
curl.exe -s -S -o ./apache-maven-3.9.9-bin.zip https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.zip
tar -xf ./apache-maven-3.9.9-bin.zip
- name: Build with Maven
# qa skips documentation - we check it on Jenkins CI
# We skip checkstyle too - we check it on Jenkins CI
run: ./apache-maven-3.9.9/bin/mvn -B -e clean install -Pstaging -Pqa '-Dcheckstyle.skip=true'
run: ./apache-maven-3.9.9/bin/mvn -B -e -ntp clean install -Pstaging -Pqa '-Dcheckstyle.skip=true'
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_API_TOKEN }}

4 changes: 2 additions & 2 deletions appserver/admin/template/src/main/resources/config/domain.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
<jvm-options>--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED</jvm-options>
<jvm-options>--add-exports=java.base/jdk.internal.vm.annotation=ALL-UNNAMED</jvm-options>
<jvm-options>--add-opens=java.base/jdk.internal.vm.annotation=ALL-UNNAMED</jvm-options>

<!-- To enable attaching the flashlight agent to the current VM in OpenJDK 9+ -->
<jvm-options>-Djdk.attach.allowAttachSelf=true</jvm-options>
</java-config>
Expand Down Expand Up @@ -383,7 +383,7 @@
<!-- From which hosts users can connect -->
<jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
<!-- Gogo shell configuration -->
<jvm-options>-Dgosh.args=--noshutdown -c noop=true</jvm-options>
<jvm-options>-Dgosh.args=--nointeractive</jvm-options>
<!-- Directory being watched by fileinstall. -->
<jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
<!-- Time period fileinstaller thread in ms. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ node.KeyfileHelp=The absolute path to the SSH User's private key file. The defau
node.EditPageTitle=Edit Node
node.EditPageTitleHelp=Edit properties for the selected node.
node.InstallDir=Installation Directory:
node.InstallDirHelp=The full path to the parent of the base installation directory of the GlassFish Server software on the host, for example, /export/glassfish7.
node.InstallDirHelp=The full path to the parent of the base installation directory of the GlassFish Server software on the host, for example, /export/glassfish7. Paths are always relative to the configured SFTP server root.
node.force=Force:
node.forceHelp=Specifies whether the node is created even if validation of the node's parameters fails.
node.type=Type:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2024 Eclipse Foundation and/or its affiliates.
* Copyright (c) 2022, 2025 Eclipse Foundation and/or its affiliates.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -363,7 +363,7 @@ private static File findPasswordFile(final String filename) {

private static void changePassword() {
final Asadmin asadmin = new Asadmin(ASADMIN, ADMIN_USER, PASSWORD_FILE_FOR_UPDATE);
final AsadminResult result = asadmin.exec(5_000, "change-admin-password");
final AsadminResult result = asadmin.exec(20_000, "change-admin-password");
if (result.isError()) {
// probably changed by previous execution without maven clean
System.out.println("Admin password NOT changed.");
Expand Down
1 change: 1 addition & 0 deletions appserver/tests/admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@
<modules>
<module>admin-extension</module>
<module>tests</module>
<module>ssh-cluster</module>
</modules>
</project>
87 changes: 87 additions & 0 deletions appserver/tests/admin/ssh-cluster/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<!--

Copyright (c) 2024 Contributors to the Eclipse Foundation.

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.

SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.glassfish.main.tests</groupId>
<artifactId>admin-tests-parent</artifactId>
<version>7.0.22-SNAPSHOT</version>
</parent>

<artifactId>ssh-cluster-tests</artifactId>

<properties>
<glassfish.version>${project.version}</glassfish.version>
</properties>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>2.0.16</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.distributions</groupId>
<artifactId>glassfish</artifactId>
<version>${glassfish.version}</version>
<type>zip</type>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>prepare-glassfish.zip</id>
<goals>
<goal>copy-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
<includeArtifactIds>glassfish</includeArtifactIds>
<includeTypes>zip</includeTypes>
<stripVersion>true</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading