Can a Tomcat7/Java/Mysql/Ant application run on Openshift? If so, how to install the jdbc driver? - mysql

I'm trying to install OpenGTS on Red Hat's Openshift cloud platform.
OpenGTS is a Java/Tomcat7/Mysql/Ant application, so I created a JbossEWS app on Openshift, installed the standard Mysql cartridge, and an Ant cartridge I found online.
Our application does not have to be scalable, so that's what I chose.
I add a call to Ant in Openshift's build hook.
So far it has been impossible to install the jdbc driver however:
As I'm using Ant, I deleted the pom.xml for Openshift's standard Maven.
Neither is there a standalone.xml in JbossEWS. (There is one for JbossEAP).
Java's ext/lib directories are not accessible on Openshift.
So I copied the jdbc driver jar in $OPENSHIFT_DATA_DIR,
but nevertheless, when started, JbossEWS complains it cannot find a suitable jdbc driver for Mysql.
Is it even possible to run OpenGTS on Openshift?

It is comment about above question so we are following this link.
Here is the link https://blog.openshift.com/jndi-tomcat-configuration-howto/
And also catalina.properties file
common.loader=${catalina.base}/lib,${catalina.base}/lib/.jar,${catalina.home}/lib,${catalina.home}/lib/.jar,${catalina.home}/../app-root/data/*.jar

Related

Install Dreamfactory on Xampp

I have been trying to install Dreamfactory on Xampp but can't find a single article on how to do so.
Purpose: To generate REST API in php with mysql.
What I have tried:
Initially I installed windows version of
Dreamfactory from official site. It was installed successfully but it don't allow access to MYSQL database in free version. Paid version is out of my budget, so I tried with Xampp. I downloaded open-source version from
Github. After extracting it, executed php artisan serve in xampp command shell as mentioned on Dreamfactory Wikipedia Installation guide. This resulted in following error:
Warning: require(D:\xampp\htdocs\sandbox\dreamfactory\public/../vendor/autoload.php): failed to open stream: No such file or directory in D:\xampp\htdocs\sandbox\dreamfactory\public\index.php on line 24
Fatal error: require(): Failed opening required 'D:\xampp\htdocs\sandbox\dreamfactory\public/../vendor/autoload.php' (include_path='D:\xampp\php\PEAR') in D:\xampp\htdocs\sandbox\dreamfactory\public\index.php on line 24
As mentioned in Git documentation, they have given installation procedures for Ubuntu and Debian. Further more, they have mentioned about Bitnami official installation software, but non for XAMPP or stuff like that.
Question:
Is there any way we can install Dreamfactory on XAMPP? If yes, how so!
I'd venture it's going to be fairly difficult task to run DreamFactory on XAMPP because DreamFactory requires quite a few dependencies which are not installed on XAMPP by default.
Your best bet would be to run the Bitnami for DreamFactory environment, or alternatively use Docker. Both can be downloaded from the DreamFactory website downloads page. Alternatively, if you'd like to run DreamFactory in a VM, the OSS download README points to automated installers for Debian and Ubuntu. Additional installers for CentOS and Fedora are found here, they work great however we just haven't moved them into the official distribution yet.

Windows Service installation on Docker Container

I am trying to port one of our Tomcat based Windows application to Windows Nano Server Container. The installation process includes two Windows Service installations - an ActiveMQ service and another Tomcat Service. This is achieved using two batch files provided with the product. In addition to installing the service, they also pass several arguments pertaining to JVM. Now the issue I am facing is I am not able to get these services installed on a Nano Server. The same Dockerfile works perfect and installs the product on Windows Server Core Container.
Observation: The services which get installed through batch files are dependent on two system components - Ancillary Function Driver for Winsock (Service name: afd) and TCP/IP Protocol Driver (Service Name: tcpip). This is something which I discovered on a VM where the product was installed when checking the service properties. I see that they are absent in a Nano Server Container but are present in Windows Server Core container. Could that be a reason? If yes, is there any way to get those services running on Nano Server?
I am at a loss on how to troubleshoot this issue. Are there any limitations on Nano Server Container when it comes to Windows Services?
Consider building your docker container from the ground up,
Determine and set your prerequisites
Install all of the dependencies first
Install the application and services in question
(For additional information you can look at this wiki page.)
The Nano server container is minimal and misses many windows default services, you’ll have to build most of them through Dockerfile yourself.
The easiest method will be to do this manually on Nano server and confirm everything to be working in the docker container/image, and then later generate an automated build.

How to install extension on server in yii2

I have an website running on server.
I want to use graph extension to show some reports.
How do install extension on server?
Locally I can use cmd for that, do I need to download project install extension and upload it again?
You have to enable SSH access on your server.
DigitalOcean SSH tutorial - here you can find some helpful informations about SSH connection.
If you connect by SSH, navigate to project directory and use composer install or composer update.
If you don't have a command line access to your server and so cannot use composer directly, I would recommend to do prepare the code locally in a 'deploy' folder and then copy the whole folder content, including the vendor directory, to the server. I assume that you can use composer locally, so that you can install the extension regularely . And I assume that the local machine and the server does differ to much (PHP version, other settings).
Installing the yii2-extension does mean: if you install it with composer install Yii gets prepared so that you can use the code like any other code in your application. Installing the extension creates an entry in `vendor/yiisoft/extension.php which gets evaluated each time the application gets loaded.

How to add mysql drivers to openshift tomcat

I have deployed my war file on openshift tomcat.
As suggested to deploy war file directly we need to remove the src and pom.xml before coping the war file in webapps folder. pre compiled java applications (WAR and EAR files) onto your OpenShift
Now since my application uses mysql driver - when tomcat starts on open shift it throws error of mysql driver classes not found.
How else can I add the mysql driver to openshift tomcat. Putting them in the web-inf/lib directory does not work since the datasources are configured on tomcat context.xml
The data source configuration should not matter for the mysql driver. Before tomcat8 however there are scenarios where you have to deploy the mysql driver in the tomcat/lib (sad but it works). Upgrading to Tomcat8 will get you away from that scenario.

Sonar Tomcat installation fails

I installed both Sonar and Jenkins on the same Tomcat (7.0.29) version. I followed the instructions, which means that I created the sonarqube database (we are using MySQL), that I built and created the WAR file, and that I deployed that file to Tomcat. I also modified the Tomcat CATALINA_OPTS value to give Tomcat more memory. Jenkins will run, but Sonar will give me a "We're sorry, but something went wrong." error. I checked all of the Tomcat logs but could not find anything useful such as an exception. Does anyone have any ideas on this?
Thanks in advance...
Deployment on Tomcat won't be supported as of next version. Therefore, I recommend you to use the standalone mode instead. Note also that is not recommended to install SonarQube and Jenkins on the same machine. See http://docs.codehaus.org/display/SONAR/Installing#Installing-SonarQubePlatformOverview.