Skip to content

Commit

Permalink
[TEST] DO NOT MERGE
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Mesnil <[email protected]>
  • Loading branch information
jmesnil committed Jun 3, 2024
1 parent 2d44c5c commit 1bcc2aa
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 2 deletions.
1 change: 1 addition & 0 deletions bootable-jar/WFCORE_5324_CLI_script_exec_runtime.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
categories:
- bootable-jar
- unknown-category
---
= Ability to execute CLI script at runtime
:author: Jean-Francois Denise
Expand Down
97 changes: 97 additions & 0 deletions bootable-jar/WFCORE_FOO.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
categories:
---
= TEST of a new proposal

== Overview

During Bootable JAR build, when the server configuration can't be fully tuned with CLI script (e.g.: server config bound to
the execution context), we need a way to configure the server when the bootable JAR starts.

== Issue Metadata

=== Issue

* https://issues.redhat.com/browse/WFCORE-5324[WFCORE-5324]

=== Related Issues

*

=== Dev Contacts

* mailto:{email}[{author}]

=== QE Contacts

* mailto:{[email protected]}[Jan Kasik]

=== Testing By
// Put an x in the relevant field to indicate if testing will be done by Engineering or QE.
// Discuss with QE during the Kickoff state to decide this
* [ ] Engineering

* [ ] QE

=== Affected Projects or Components

* Bootable JAR runtime

=== Other Interested Projects

* https://github.com/wildfly-extras/wildfly-jar-maven-plugin/[Bootable JAR Maven plugin]

=== Relevant Installation Types
// Remove the x next to the relevant field if the feature in question is not relevant
// to that kind of WildFly installation
* [ ] Traditional standalone server (unzipped or provisioned by Galleon)

* [ ] Managed domain

* [ ] OpenShift s2i

* [x] Bootable jar

== Requirements

Ability to update server configuration at bootable JAR boot time by the mean of a WildFly CLI script.

=== Hard Requirements

* Introduce `--cli-script=<path to CLI script>`. The path is a file system path.
* This argument is present in the Bootable JAR help (`--help`).
* The referenced file must exist and be readable. If not, the server aborts.
* The CLI script must be a text file (UTF-8), the file extension if present is meaningless although `.cli` extension is advised.
* If error occurs during CLI script execution, the failing line and error are displayed, the server aborts.
* The changes applied at boot are not persisted in the server config. A server re-started without providing the CLI script would not contain the changes
applied by a previous execution.
* `org.jboss.as.cli`JBoss Modules module is now provisioned whatever the set of provisioned Galleon layers. It is required to execute CLI commands.
* Any operation that would require a server restart would make the bootable JAR server to exit, that is the nominal behavior of a bootable JAR
being asked to restart.
* Some CLI commands are not exposed: `connect`, `reload`, `shutdown`, any command related to embedded server, `patch`.
* CLI commands that can't be executed in admin-mode (eg: jdbc-driver-info) are not supported.
* CLI commands and operations that target not provisioned subsystem would fail. For example `data-source`
and `xa-data-source` commands require the `datasources` subsystem to be provisioned).

=== Nice-to-Have Requirements

* NONE

=== Non-Requirements

* The new argument references only a single file, if multiple scripts need to be executed, they must be concatenated prior to be used.

== Test Plan

* Add unit test to cover new argument.
* Evolve part of wildfly-core tests with execution of CLI script at boot.
* Add new integration tests to the Bootable JAR Maven plugin.
* Evolve QE testsuite with new tests.

== Community Documentation

The WildFly doc will cover the new argument. The argument is also auto-documented in the bootable JAR help content.

== Release Note Content

Not candidate for release notes.
2 changes: 0 additions & 2 deletions bootable-jar/WFLY-14411_Bootable_Jar_Upgrade.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
categories:
- bootable-jar
- wf-galleon
---
= Server components upgrade and Galleon feature-pack dependency update.
:author: Jean-Francois Denise
Expand Down

0 comments on commit 1bcc2aa

Please sign in to comment.