How to use environment variables with WildFly and OpenShift
441 views
Skip to first unread message
jfinelli
unread,
Jan 25, 2022, 10:37:36 AM1/25/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to WildFly
Hi Experts,
I had a couple of tries with OpenShift and WildFly to spin up a simple application (the EAP quickstart `cmt`). I installed `crc` to run OpenShift locally and `oc` to control it.
What I tried so far: * Employ wildfly-centos7 directly and then spin up a new-app with the command `oc new-app https://github.com/wildfly/quickstart.git --context-dir=cmt --image=quay.io/wildfly/wildfly-centos7 --env SERVER_CONFIGURATION=standalone-full.xml` * Build the WFLY image from "scratch" and then spin up a new-app with the env variable `--env SERVER_CONFIGURATION=standalone-full.xml`...more or less what it is suggested here but adding the env variable, i.e. `oc new-app wildfly-quickstart/cmt -e SERVER_CONFIGURATION=standalone-full.xml` (where wildfly-quickstart is the OpenShift project I am using)
In both cases, I get very close to success but what does not work is `--env SERVER_CONFIGURATION=standalone-full.xml`. My WildFly server gets set up with standalone.xml, which is not enough for my quickstart. As a side note, I can see `SERVER_CONFIGURATION=standalone-full.xml` among the environment variables of the WFLY pod. I also ran a couple of experiments playing with JAVA_OPTS_APPEND (e.g. `JAVA_OPTS_APPEND=-Djboss.server.default.config=standalone-full.xml`) but it did not help.
So my questions would be: * Is there a different way to pass env variables when applications are created? If that is the case, would it be worth mentioning it here?
* Have I missed something else?
Brian Stansberry
unread,
Jan 25, 2022, 4:59:56 PM1/25/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to WildFly
If folks are interested in this, Manuel started a wildlfy-dev mail list thread where it's being discussed: