Deploy resource adapter and application in websphere liberty image - docker

I have a requirement to create a spring boot application and connect it to EIS via dtpraUnisys JCA adapter. the flow is
Application -> ADapter RAR -> EIS
I want to use the websphere liberty image and then bundle the rar and the application jar file
Where should I give the rar file location, application jar file details.
is there any example which I can refer based on docker image

I don't know of anything official, but I did go through something similar (but with Java EE instead of Spring Boot) with IBM MQ on my Github.
The basic idea is that you typically place resource adapters and other shared in /opt/ol/wlp/usr/shared/resources/ for Open Liberty or /opt/ibm/wlp/usr/shared/resources for WebSphere Liberty. I do that in my Dockerfile:
RUN mkdir /opt/ol/wlp/usr/shared/resources/wmq/ && chown -R 1001:0 /opt/ol/wlp/usr/shared/resources/wmq/
COPY --chown=1001:0 docker/wmq.jmsra.rar /opt/ol/wlp/usr/shared/resources/wmq/
Then you reference them in server.xml, using the shared.resource.dir variable:
<resourceAdapter id="mqJmsRa" location="${shared.resource.dir}/wmq/wmq.jmsra.rar">
<classloader apiTypeVisibility="spec, ibm-api, api, third-party"/>
</resourceAdapter>
From there, you might have to create some config items. I'm not sure what EIS needs, but the entire server.xml syntax is documented on the Open Liberty website (this applies to WebSphere Liberty, too) so you can find what you need. You'll usually need to reference your resource adapter to set properties on it using the properties.<adaptorName> element.
This works for any type of application on Liberty. Deploying the spring boot app might require some extra steps. There's a good guide to deploy a spring boot app on Liberty in Docker on the Open Liberty guides site.

Related

How to install mongoDb connector under Windows?

I use KSQLdb, and I have tried to install MongoDb connector. Tutorial says to use confluent hub client or download connector jar file that include in java application.
But I want to use KSQLDB as CLI.
Default installations is:
Download installation Or download the ZIP file and extract it into one
of the directories that is listed on the Connect worker's plugin.path
configuration properties. This must be done on each of the
installations where Connect will be run.
Where to place these files?
The connector simply needs to be on the java class path. Adding the jars to the lib or ext folder should be sufficient.

Deploy features.xml in servicemix during jenkins Build

I have my features.xml file in src/main/resources/features folder , when I build my project through Jenkins after building my bundle goes to the nexus repository , my requirement is that after my bundle goes to nexus then features.xml should automatically be deployed on servicemix as part of build only. I should not open the servicemix console to install the feature. Please help
You may think about using a KAR (KAraf aRchive).
More information can be found here: http://karaf.apache.org/manual/latest-3.0.x/users-guide/kar.html
You can build а KAR (through Jenkins), containing your feature, then you can use a hot deployment.
Apache Karaf also provides a KAR deployer. It means that you can drop
a KAR file directly in the deploy folder.
Apache Karaf will automatically install KAR files from the deploy
folder. You can change the behaviours of the KAR deployer in the
etc/org.apache.karaf.kar.cfg:
I have also been working on this and my solution was to turn to automated scripting to accomplish this. I wrote a ssh and FTP based program which would stop an smx, delete the ${karaf.home}/data/cache/ directory, replace the new feature file with the one retrieved from the ftp operation, then restart the karaf container.
If you are open to looking into other possibilities:
You can look into Fuse Fabric which can link many smx Containers together and implement version increases and rollbacks. Currently I believe this would also need scripting to accomplish it automatically.
The third option is relatively new and comes in the form of Building docker images and deploying them via OpenShiftV3 which was just unveiled at the Redhat Summit 2015. Its worth noting its fairly new, but it does pack a very impressive feature set.

Do I need to install Tomcat and MySQL on the Linux server to deploy Grails app?

My Grails app is based on
Gradle with Grails 2.4.4,
Tomcat plugin 7.0.55,
and MySQL plugin(mysql:mysql-connector-java:5.1.29).
Do I need to install Tomcat on the server?
Do I need to install MySQL on the server?
Both Tomcat and MySQL are not installed on dev environment(on my PC), but it seems working.
Container
While all the other answers pointed out, that you need already a container (which of course is true) there is also the option to use one of the "standalone" plugins (like e.g. https://grails.org/plugin/standalone). This will package your app as a fat jar, where the container and your app are part of a jar, that you simply run by java -jar myapp.jar (of course your would integrate that into your regular startup scripts on the server).
This is in general no bad option, since many WAR-deployed apps don't need any of the full blown container features anyway and you would be able to configure everything in place for your workload and don't have to compromise for all running wars (or your ops team). On the downside, if there is a security problem etc. with the container you would have to roll a new jar.
/With grails 3, which uses Spring Bootstrap, this even is a default option, since the preferred way of deploying. Spring Boot 1.2 supports Tomcat, Jetty, and Undertow by default./
Database
You can use a MySQL from "somewhere" else. But this is nitpicking, since you really need a MySQL somewhere (BTW: you really should start using MySQL also for your dev env, or you will be in for a few surprises once you put your stuff over to production).
Also be aware, that you can also keep using your H2 (see your datasource config) with files. This is an OK option (that saves you from installing a DB server) for small amounts of data you are storing and also there are other free database servers like PostgreSQL.
Obviously you have to install mysql and tomcat on the server.
During development you run grails from console, so you dont need tomcat as it will use embedded tomcat but still you need to have mysql installed, if you want to use mysql.
But on production, you create a war of your app using 'grails war command' and you deploy this war to a web container just like any other war, so you need tomcat and you will need mysql installed too.
In one word answer is 'Yes'.
Fact is when you are in development environment grails uses as an embedded tomcat server provided by the 'Apache Tomcat plugin' which version corresponds to grails version.
You've not installed mysql and you claimed 'it seems working'. That's funny! But it's not mysql who is working without being installed(!), rather it's also an integrated database provided by the 'H2 Database Plugin'.
So, when you'll deploy your grails app in Linux or another server certainly you need a tomcat server to handle user request to that app and a database where your data will be saved.

Installing Jenkins on a webserver

I've searched the whole internet for this. I have a website that is run by a hosting company. All the tutorials to install Jenkins assume I'm running my own Linux machine and can perform various commands.
Is there a way I can install Jenkins on this website using only FTP?
Thanks.
Maybe. If your hosting company provides Tomcat (or another servlet container/J2EE server like JBoss) then you can install Jenkins as a webapp inside of Tomcat. Typically it just involves placing the jenkins.war file in $TOMCAT_BASE/webapps.
If your hosting company does not provide Tomcat and doesn't allow you to run Java yourself from a shell then AFAIK you can't run Jenkins.

Setup and Use ClamAV (anti-virus) with Azure

I want to scan the files that are uploaded to my Azure blob. It looks like ClamAV (www.clamav.net) is probably the way to go. I see instructions on how to install on a Windows server, but what would my procedure be for a site hosted on Azure? I am using ASP.NET MVC.
Disclaimer: I haven't used ClamAV. Having said that...
You should be able to install it during a startup task (with elevated privileges). I looked at the ClamAV wiki, and it appears that the msi has a silent-install:
msiexec /i clamAV.msi /qr
You'll need to change that last parameter to /qn to force "no user interface."
The challenge will be scanning blobs. You'll need to copy files from their blobs to a local directory in your VM instance, and then run clamdscan on that file (basing off the wiki).
I haven't tried this, but the basic premise should hold up: Install anything requiring an MSI as a startup task (probably needs elevated mode).

Resources