OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.15k stars 587 forks source link

BETA BLOG - Support a directory as a valid location to include in the server's configuration #26175

Open rsherget opened 1 year ago

rsherget commented 1 year ago

The information you provide here will be included in the Open Liberty beta blog post (example), which will be published on openliberty.io/blog/, and potentially elsewhere, to promote this beta feature/function of Open Liberty. For this post to be included in the beta issue please make sure that this is completed by the end of Friday following the GM (Tuesday). The beta and release blogs are created using automation and rely on you following the template's structure. DO NOT REMOVE/ALTER THE <GHA> TAGS THROUGHOUT THIS TEMPLATE.

Please provide the following information: ​

  1. Which Liberty feature(s) does your update relate to?

    Human-readable name (eg WebSockets feature): Include directory configDropins

    Short feature name (eg websockets-1.0): N/A

  2. Who is the target persona? Who do you expect to use the update? eg application developer, operations.
    developers

  3. Provide a summary of the update, including the following points:

    • A sentence or two that introduces the update to someone new to the general technology/concept.

Using the tag within the server.xml is a way to include configuration files but previously that could only be done by using a path to the file. Now users may use the directory the configuration file is located in.

When running on Kubernetes, mounting secrets as a whole folder is the only way to have the change from the secret reflected dynamically in the running pod

In the location part of the tag, enter the directory that houses your configuration files.

Server.xml include

    <include location="./common/"/>

After changes server startup log

[AUDIT   ] CWWKG0028A: Processing included configuration resource: /Users/rickyherget/libertyGit/open-liberty/dev/build.image/wlp/usr/servers/com.ibm.ws.config.include.directory/common/a.xml
[AUDIT   ] CWWKG0028A: Processing included configuration resource: /Users/rickyherget/libertyGit/open-liberty/dev/build.image/wlp/usr/servers/com.ibm.ws.config.include.directory/common/b.xml
[AUDIT   ] CWWKG0028A: Processing included configuration resource: /Users/rickyherget/libertyGit/open-liberty/dev/build.image/wlp/usr/servers/com.ibm.ws.config.include.directory/common/c.xml

https://openliberty.io/docs/latest/reference/config/include.html

</GHA-BLOG-SUMMARY>

What happens next?

rsherget commented 1 year ago

25149