how to add keycloak module to openshift wildfly cartridge? - openshift

I'm using a wildfly 10 cartridge on openshift on line and want to protect the application using a keycloak wildfly adapter. I add the adapter modules to the .openshift/config/modules in my local git directory and I modify the .openshift/config/standalone.xml (as specified in the documentation here). Unfortunately when I add/commit/push my project the result is that remote standalone.xml is correctly updated but the adapter module files are not there. What am I doing wrong?

Related

How to config Wildfly Server on OpenShift V3.x

So the problem I'm facing now is that I cannot find anyway to config WildFly server on OpenShift v3.x, because when the end of deploy processing it auto deploy welcome-content to the path "/", and it override to my "/" path.
I couldn't find anyway to get the standalone.xml of that server to modify. Any idea to fix it?
The easiest way is source-to-image. Here can you found example images for wildfly. https://github.com/openshift-s2i/s2i-wildfly
You only have to add your standlone.xml under contrib/wfcfg/ in your git repo. Than deploy the s2i-wildfly with your git repo.
Here is a example for the first try. https://github.com/openshift/openshift-jee-sample

${Env.CATALINA_HOME} does not exit in openshift

I have a question which is related to openshift online and I am using a Tomcat7 cartridge,Mysql5.5 and Ant Cartridge 0.1.And I am trying to deploy OpenGTS project to openshift but when I open a SSH session and I try to run this command "ant all" it shows that "BUILD FAILED
/var/lib/openshift/568e35812d52717d1f000122/app-root/runtime/repo/build.xml:66:
/var/lib/openshift/568e35812d52717d1f000122/app-root/runtime/repo/${Env.CATALINA_HOME} does not exit"
I am worry about that,I deleted the tomcat application and created again but it is showing same error.please help me.thanks.
Make sure <property environment="env"/> is present at the top of the script.
Also CATALINA_HOME environment variable is defined in the system.
Use ${env.CATALINA_HOME} instead of ${Env.CATALINA_HOME}.

Openshift - Unable to set the env in JBoss as7 cartridges

I want to set the -Djboss.server.default.config env variable in my JBoss AS 7 cartridge.
I have tried using the action hook as follows
export _JAVA_OPTS=$_JAVA_OPTS"-Djboss.server.default.config=standalone-custom.xml"
and the file name is pre_start_jboss-as7.
This env is not set in JBoss. I tried restarting JBoss as well but still no luck.
I also tried from command prompt using rhc set-env command but still no luck.
Can anyone help me in setting this environment variable to my JBoss AS7 cartridge??
You can create a file in your gear path ~/jbosseap/env/ with name JAVA_OPTS_EXT
and put the env variable -Djboss.server.default.config in to this file
then when the jboss gear start, it will add this env after your JAVA_OPTS
As far i know, when you have your local git copy of the repository of your application, in that directory structure, there is an standalone.xml which is the one that JBoss loads in your Openshift gear; have you tried to work with that file instead?

How to deploy a datasource to jboss6 with maven

Is there a recommended way to deploy a mysql datasource and corresponding mysql-connector-java.5.1.21.jar using maven? Right now we have an ear deployment that installs the mysql-ds.xml, the connector j driver, an ejb.jar and a war file. It works but I also get this stack trace during startup of my JBoss 6 server. We don't have this issue if we place the mysql jar into the server\default\lib dir but we are hoping the datasource and driver jar can be part of our ear deploy.

How can I add websphere admin jars to Hudson's class path?

I try to use Hudson's Deploy Websphere plug-in to deploy my artifacts to remote websphere.
From the plug-in documentation, I need to do this:
The following WAS JAR files need to be placed into the Hudson class path or dropped into the %project.basedir%/WEB-INF/lib/ directory. These JAR files can be copied from the %WAS_HOME%/runtimes/ directory of your WAS server installation.
com.ibm.ws.admin.client_6.1.0
com.ibm.ws.webservices.thinclient_6.1.0
I have installed hudson as a windows service, how can I add these jars to hudson's class path?
According to Hudson's documentation:
Changing the configuration of services
The JVM launch parameters of these
Windows services are controlled by an
XML file hudson.xml and
hudson-slave.xml respectively. These
files can be found in $HUDSON_HOME and
in the slave root directory
respectively, after you've install
them as Windows services.
The file format should be
self-explanatory. Tweak the arguments
for example to give JVM a bigger
memory.
Stdout and stderr from the service
processes go to log files in the same
directory.
So, it appears you can manipulate the service's JVM classpath using the hudson.xml file.
HTH