Skip to content

Commit

Permalink
[WFLY-19809] server provisioning and bootable jar active by default
Browse files Browse the repository at this point in the history
  • Loading branch information
emmartins committed Oct 31, 2024
1 parent de97aa6 commit 1535acd
Show file tree
Hide file tree
Showing 111 changed files with 328 additions and 393 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/quickstart_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,35 +102,31 @@ jobs:
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
# Make sure it builds
mvn -fae clean package -Drelease
mvn -fae clean ${{ inputs.MVN_COMMAND }} -Drelease
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with provisioned-server profile
- name: Run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with provisioned-server profile
if: ${{ inputs.TEST_PROVISIONED_SERVER }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
echo "Building provisioned server..."
mvn -fae clean ${{ inputs.MVN_COMMAND }} -Pprovisioned-server
if [ -f ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh ]; then
echo "Add quickstartUser..."
${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users'
echo "Add quickstartAdmin..."
${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin'
fi
echo "Starting provisioned server..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }}
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }}
echo "Testing provisioned server..."
mvn -fae verify -Pintegration-testing
echo "Shutting down provisioned server..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with bootable-jar profile
- name: Run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with bootable-jar profile
if: ${{ inputs.TEST_BOOTABLE_JAR }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
echo "Building bootable jar..."
mvn -fae clean ${{ inputs.MVN_COMMAND }} -Pbootable-jar
echo "Starting bootable jar..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start-jar -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }}
echo "Testing bootable jar..."
Expand Down Expand Up @@ -209,35 +205,31 @@ jobs:
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
mvn -fae clean package -Drelease -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae clean ${{ inputs.MVN_COMMAND }} -Drelease -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with provisioned-server profile, and built Server version
- name: Run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with provisioned-server profile, and built Server version
if: ${{ inputs.TEST_PROVISIONED_SERVER }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
echo "Building provisioned server..."
mvn -fae clean ${{ inputs.MVN_COMMAND }} -Pprovisioned-server -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
if [ -f ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh ]; then
echo "Add quickstartUser..."
${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users'
echo "Add quickstartAdmin..."
${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin'
fi
echo "Starting provisioned server..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Testing provisioned server..."
mvn -fae verify -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Shutting down provisioned server..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:shutdown -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
shell: bash
- name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with bootable-jar profile, and built Server version
- name: Run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with bootable-jar profile, and built Server version
if: ${{ inputs.TEST_BOOTABLE_JAR }}
run: |
cd quickstarts
cd ${{ inputs.QUICKSTART_PATH }}
echo "Building bootable jar..."
mvn -fae clean ${{ inputs.MVN_COMMAND }} -Pbootable-jar -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Starting bootable jar..."
mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start-jar -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Testing bootable jar..."
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/quickstart_ejb-txn-remote-call_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,29 +66,29 @@ jobs:
run: |
cd quickstarts
cd ${{ env.QUICKSTART_PATH }}
mvn -fae clean install -Drelease
mvn -fae clean package -Drelease
shell: bash
- name: Build, run & test ${{ env.QUICKSTART_PATH }} Quickstart with provisioned-server profile
if: ${{ env.TEST_PROVISIONED_SERVER }}
run: |
cd quickstarts
cd ${{ env.QUICKSTART_PATH }}/client
echo "Building 'client' provisioned server..."
mvn -fae clean package -Pprovisioned-server -DremoteServerUsername="quickstartUser" -DremoteServerPassword="quickstartPwd1!"
mvn wildfly:start -Pprovisioned-server -Djboss-as.home=target/server -Dwildfly.javaOpts="-Djboss.tx.node.id=server1 -Djboss.node.name=server1" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}}
mvn -fae clean package -DremoteServerUsername="quickstartUser" -DremoteServerPassword="quickstartPwd1!"
mvn wildfly:start -Dwildfly.javaOpts="-Djboss.tx.node.id=server1 -Djboss.node.name=server1" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}}
cd ../server
echo "Building 'server' provisioned server..."
mvn -fae clean package -Pprovisioned-server -Dwildfly.provisioning.dir=server2 -Djboss-as.home=target/server2
mvn -fae package -Pprovisioned-server -Dwildfly.provisioning.dir=server3 -Djboss-as.home=target/server3
mvn -fae clean package -Dwildfly.provisioning.dir=server2 -Djboss-as.home=target/server2
mvn -fae package -Dwildfly.provisioning.dir=server3 -Djboss-as.home=target/server3
echo "Add quickstartUser to both 'server' builds..."
./target/server2/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users'
./target/server3/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users'
echo "Add quickstartAdmin to both 'server' builds..."
./target/server2/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin'
./target/server3/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin'
echo "Starting provisioned server..."
mvn wildfly:start -Pprovisioned-server -Djboss-as.home=target/server2 -Dwildfly.port=10090 -Dwildfly.serverConfig=standalone-ha.xml -Dwildfly.javaOpts="-Djboss.socket.binding.port-offset=100 -Djboss.tx.node.id=server2 -Djboss.node.name=server2" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}}
mvn wildfly:start -Pprovisioned-server -Djboss-as.home=target/server3 -Dwildfly.port=10190 -Dwildfly.serverConfig=standalone-ha.xml -Dwildfly.javaOpts="-Djboss.socket.binding.port-offset=200 -Djboss.tx.node.id=server3 -Djboss.node.name=server3" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}}
mvn wildfly:start -Djboss-as.home=target/server2 -Dwildfly.port=10090 -Dwildfly.serverConfig=standalone-ha.xml -Dwildfly.javaOpts="-Djboss.socket.binding.port-offset=100 -Djboss.tx.node.id=server2 -Djboss.node.name=server2" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}}
mvn wildfly:start -Djboss-as.home=target/server3 -Dwildfly.port=10190 -Dwildfly.serverConfig=standalone-ha.xml -Dwildfly.javaOpts="-Djboss.socket.binding.port-offset=200 -Djboss.tx.node.id=server3 -Djboss.node.name=server3" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}}
echo "Testing provisioned server..."
cd ../client
mvn -fae verify -Pintegration-testing
Expand Down Expand Up @@ -183,21 +183,21 @@ jobs:
cd quickstarts
cd ${{ env.QUICKSTART_PATH }}/client
echo "Building 'client' provisioned server..."
mvn -fae clean package -Pprovisioned-server -DremoteServerUsername="quickstartUser" -DremoteServerPassword="quickstartPwd1!" -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn wildfly:start -Pprovisioned-server -Djboss-as.home=target/server -Dwildfly.javaOpts="-Djboss.tx.node.id=server1 -Djboss.node.name=server1" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae clean package -DremoteServerUsername="quickstartUser" -DremoteServerPassword="quickstartPwd1!" -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn wildfly:start -Dwildfly.javaOpts="-Djboss.tx.node.id=server1 -Djboss.node.name=server1" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
cd ../server
echo "Building 'server' provisioned server..."
mvn -fae clean package -Pprovisioned-server -Dwildfly.provisioning.dir=server2 -Djboss-as.home=target/server2 -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae package -Pprovisioned-server -Dwildfly.provisioning.dir=server3 -Djboss-as.home=target/server3 -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae clean package -Dwildfly.provisioning.dir=server2 -Djboss-as.home=target/server2 -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn -fae package -Dwildfly.provisioning.dir=server3 -Djboss-as.home=target/server3 -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Add quickstartUser to both 'server' builds..."
./target/server2/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users'
./target/server3/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users'
echo "Add quickstartAdmin to both 'server' builds..."
./target/server2/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin'
./target/server3/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin'
echo "Starting provisioned server..."
mvn wildfly:start -Pprovisioned-server -Djboss-as.home=target/server2 -Dwildfly.port=10090 -Dwildfly.serverConfig=standalone-ha.xml -Dwildfly.javaOpts="-Djboss.socket.binding.port-offset=100 -Djboss.tx.node.id=server2 -Djboss.node.name=server2" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn wildfly:start -Pprovisioned-server -Djboss-as.home=target/server3 -Dwildfly.port=10190 -Dwildfly.serverConfig=standalone-ha.xml -Dwildfly.javaOpts="-Djboss.socket.binding.port-offset=200 -Djboss.tx.node.id=server3 -Djboss.node.name=server3" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn wildfly:start -Djboss-as.home=target/server2 -Dwildfly.port=10090 -Dwildfly.serverConfig=standalone-ha.xml -Dwildfly.javaOpts="-Djboss.socket.binding.port-offset=100 -Djboss.tx.node.id=server2 -Djboss.node.name=server2" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
mvn wildfly:start -Djboss-as.home=target/server3 -Dwildfly.port=10190 -Dwildfly.serverConfig=standalone-ha.xml -Dwildfly.javaOpts="-Djboss.socket.binding.port-offset=200 -Djboss.tx.node.id=server3 -Djboss.node.name=server3" -Dstartup-timeout=120 ${{env.EXTRA_RUN_ARGS}} -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
echo "Testing provisioned server..."
cd ../client
mvn -fae verify -Pintegration-testing -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }}
Expand Down
2 changes: 0 additions & 2 deletions batch-processing/README-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ INFO [org.jboss.as.quickstarts.batch.job.listener.JobListener] (Batch Thread -

. This time you will not fix the file. Just click on *Restart* button again. If you click on *Update jobs list* button, you will see that the job was marked as `ABANDONED` this time because it was restarted once. Notice that there is a new parameter: `restartedOnce=true`. This behavior was implemented in `JobListener` for demonstration purposes, to prevent a `FAILED` job from being restarted twice.

// Server Distribution Testing
include::../shared-doc/run-integration-tests-with-server-distribution.adoc[leveloffset=+2]
// Undeploy the Quickstart
include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2]

Expand Down
3 changes: 3 additions & 0 deletions batch-processing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
<profiles>
<profile>
<id>provisioned-server</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
2 changes: 0 additions & 2 deletions bmt/README-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ WFLYJCA0091: -ds.xml file deployments are deprecated. Support may be removed in
HHH000431: Unable to determine H2 database version, certain features may not work
----

// Server Distribution Testing
include::../shared-doc/run-integration-tests-with-server-distribution.adoc[leveloffset=+1]
// Undeploy the Quickstart
include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+1]

Expand Down
3 changes: 3 additions & 0 deletions bmt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@
<profiles>
<profile>
<id>provisioned-server</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
2 changes: 0 additions & 2 deletions cmt/README-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ If an existing customer name is provided, no JMS message is sent. Instead of the

The customer name should match: letter &amp; '-', otherwise an error is given. This is to show that a `LogMessage` entity is still stored in the database. That is because the `logCreateCustomer` method in the `LogMessageManagerEJB` EJB is decorated with the `@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)` annotation.

// Server Distribution Testing
include::../shared-doc/run-integration-tests-with-server-distribution.adoc[leveloffset=+2]
// Undeploy the Quickstart
include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2]

Expand Down
3 changes: 3 additions & 0 deletions cmt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@
<profiles>
<profile>
<id>provisioned-server</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
2 changes: 0 additions & 2 deletions ee-security/README-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ Identity as available from injection 'quickstartUser'

The resulting output shows authentication was successful and the correct identity has been established.

// Server Distribution Testing
include::../shared-doc/run-integration-tests-with-server-distribution.adoc[leveloffset=+2]
// Undeploy the Quickstart
include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2]
// Restore the {productName} Standalone Server Configuration
Expand Down
3 changes: 3 additions & 0 deletions ee-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
<profiles>
<profile>
<id>provisioned-server</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
5 changes: 1 addition & 4 deletions ejb-multi-server/README-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ IMPORTANT: Depending on your machine configuration, you might see "Exception in
There are too many additions to the configuration files to list here. Feel free to compare the `domain.xml` and `host.xml` to the backup copies to see the changes made to configure the server to run this quickstart.

// Build and Deploy the Quickstart
:integrationTestsDirectory: app-web/src/test/
include::../shared-doc/build-and-deploy-the-quickstart.adoc[leveloffset=+1]

[[access_the_remote_client_application]]
Expand Down Expand Up @@ -174,10 +175,6 @@ An example how to access EJBs from a separate instance which only contains a web
. Use a browser to access the Servlet at the following URL: http://localhost:8380/ejb-multi-server-app-web/
. The Servlet will invoke the remote EJBs directly and show the results, compare that the invocation is successful

// Server Distribution Testing
:integrationTestsDirectory: app-web/src/test/
include::../shared-doc/run-integration-tests-with-server-distribution.adoc[leveloffset=+1]

// Undeploy the Quickstart
include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+1]

Expand Down
3 changes: 0 additions & 3 deletions ejb-remote/README-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ include::../shared-doc/start-the-standalone-server.adoc[leveloffset=+2]
// Build and Deploy the Quickstart
include::../shared-doc/build-and-deploy-the-quickstart.adoc[leveloffset=+2]

// Server Distribution Testing
include::../shared-doc/run-integration-tests-with-server-distribution.adoc[leveloffset=+2]

=== Investigate the Console Output

When the client application is run by the EJBRemoteIT tests, it performs the following steps:
Expand Down
3 changes: 3 additions & 0 deletions ejb-remote/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@
<profiles>
<profile>
<id>provisioned-server</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
5 changes: 0 additions & 5 deletions ejb-security-context-propagation/README-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ Note that the `http-connector` in the `remoting` subsystem uses this `applicatio
// Build and Deploy the Quickstart JAR
include::../shared-doc/build-and-deploy-the-quickstart.adoc[leveloffset=+1]

// Server Distribution Testing
include::../shared-doc/run-integration-tests-with-server-distribution.adoc[leveloffset=+2]

== Investigate the Console Output

When you run the integration tests, you see the following output. Note there may be other log messages interspersed between these.
Expand Down Expand Up @@ -274,8 +271,6 @@ ERROR [org.jboss.as.ejb3.invocation] (default task-57) WFLYEJB0034: EJB Invocati
at java.lang.Thread.run(Thread.java:745)
----

// Server Distribution Testing
include::../shared-doc/run-integration-tests-with-server-distribution.adoc[leveloffset=+2]
// Undeploy the Quickstart
include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+1]
// Restore the {productName} Standalone Server Configuration
Expand Down
3 changes: 3 additions & 0 deletions ejb-security-context-propagation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@
<profiles>
<profile>
<id>provisioned-server</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
2 changes: 0 additions & 2 deletions ejb-security-programmatic-auth/README-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ Principal has admin permission: true

As expected, the `quickstart` user is able to call the methods available for `guest`, but does not have the `admin` permission to call administrative methods on the remote EJB. The `quickstartAdmin` on the other hand has permissions to call both methods.

// Server Distribution Testing
include::../shared-doc/run-integration-tests-with-server-distribution.adoc[leveloffset=+2]
// Undeploy the Quickstart
include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+1]
// Restore the {productName} Standalone Server Configuration
Expand Down
Loading

0 comments on commit 1535acd

Please sign in to comment.