From apache sling launchpad 7 to sling 11 - sling

I have to upgrade an app than run on Apache Sling and Apache Jackrabbit. It uses the launchpad 7 webapp (org.apache.sling.launchpad-7.war) and the persistence is configured to use Jackrabbit (not Oak), with a workspace stored inside an Oracle database and data stored on the filesytem.
I have seen that newer versions of apache sling do not support Jackrabbit any more, they only support Jackrabbit Oak.
What would be the best way to upgrade Apache Sling on my app ?
Is it mandatory to use Apache Oak with Sling now ?
What would be the best (or simplest) way to configure Apache Sling ?
I have 700MB of data stored in jackrabbit, is there any tool to migrate all that data ?
Thanks,

Regarding Jackrabbit vs Jackrabbit Oak: we do not test Jackrabbit 2.x with Sling at all. It may work by replacing various bundles, there are no guarantees.
For the repository, the migration tools are provided by the Jackrabbit project: see Oak: repository migration where the oak-upgrade tool is documented. You probably need to look into the DocumentNodeStore with a RDB setup. The Oak: RDB document store documentation will tell you more about supported databases (Oracle is one of them) and how to configure them.
Note that we don't have an RDB runmode set up for the Sling 11 starter, but I guess you did that for Sling 7 as well.

Related

How to monitor JBoss EAP with Prometheus jmx-exporter

I want to monitor some JBoss EAP 7 servers with Prometheus/Grafana (as well as some Wildfly).
I understand I have to use jmx_exporter.
Should I use it as embedded (agent) or side-car (http)?
Which configuration file?
I was able to scrape the metrices using this config
Add the below config to your startup script or standalone.conf
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl"
JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.0.3.Final-redhat-1.jar"
JAVA_OPTS="$JAVA_OPTS -javaagent:/path/to/exporter/jmx_exporter.jar=10001:/path/to/config/config.yaml"
It's recommended to use jmx-exporter embedded in the Java JVM virtual machine (use -javaagent). That's easier, more robust and gives better insights.
The configuration file depends on the version (JBoss use undertow... that's a different mBeans to collect than JBoss 6).
The jmx-exporter project provides an example configuration file for WildFly 10 example_configs/wildfly-10.yaml.
However, if you use "JBoss EAP for Openshift" containers images, the jmx-exporter agent is already embedded in the containers (set variables: AB_PROMETHEUS_ENABLE=true and sometimes this one too JAVA_OPTS_APPEND=-Dwildfly.statistics-enabled=true)
If you don't use Red Hat's container images, you can still use the ssame jmx-exporter configuration files. Those files (jmx-exporter-config.yaml) are open-source and available on github:
on master branch JBoss 7.3
on older branches JBoss 6.4 (and 7.1 and 7.2)

How do I setup an Oracle Dynamo Admin Server?

I am confused by Oracle documentation on how to setup the (ATG) Web Commerce available on the edelivery website.
I would like to get to the step where I have properly set up the admin console.
Running the bin files on a server seems not work for various reasons:
either installation finishes but nothing is working
OR
the installation endlessly asks for arbitrary input.
Also, I want to know if it is possible to setup the server in docker and/or an Amazon Linux EC2 instance.
There are quite a number of steps involved in getting the ATG Admin Server up and running. These start with installing a JDK, Application Server and provisioning a database. Once you have gone through the Installer (which you downloaded from the edelivery site) you need to go through a basic setup process using the CIM tool. The installation process (for ATG 11.3.1) is documented here, while the steps to setup a basic application is documented here.
Working through the steps in the CIM tool, you will end up with a deployable .ear file that you can copy to your application server. Once your application server is started, you will be able to access the Dynamo Admin server.
As of version 11.3.1 ATG is officially supported on Docker. Considering that you compile your own .ear file and it can be deployed to an Application Server (such as Weblogic), Docker support won't necessarily provide you with an ATG Image. It will simply allow you to run your compiled artefact on a Docker container. You are more likely wanting to get hold of a Weblogic Docker Image and deploy your ATG artefact there.

django-pyodbc for Django 1.11

I am currently using Django 1.11.1 and am trying to connect to my iSeries Database using the django-pyodbc engine. However all the documentation I can find states django-pyodbc is only supported through Django 1.10. Is there any coding modifications I can make to have it support 1.11?
There are several forks and versions named django-pyodbc, however, the best maintained I've found is django-pyodbc-azure. It supports Django 1.11 and can be found here:
https://github.com/michiya/django-pyodbc-azure
I have used it with SQL Server 2005 - 2016 (but never Azure). Good luck!

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.

Why to use JBoss for Grails deployment?

I'm working on the project that uses Grails as Web framework and JBoss for deploying web-applications. JBoss allows to configure connection to database and then Grails could use JNDI datasource. However in our project we don't use JNDI datasources, we configure data sources for both development and production in DataSource.groovy. Other JBoss services are not used also.
I understand that if we are using JNDI datasource connections then we may benefit if several grails applications are deployed, because in this case there is no need for each grails application to establish its own connection.
So I wonder is there any sense to use JBoss instead of, say, Tomcat or Jetty, if not using it's services?
JBoss is a J2EE container. Compared to Tomcat which is a Servlet and JSP container only, the JBoss AS has a lot more features. Thus JBoss is also "heavier" than Tomcat, and depending on the size of your project this may not fit well with your development team since it has a longer development cycle (I heard there were a lot of improvements in JBoss 7, haven't tried it yet though.)
If you are not using any of the J2EE container features (JMS, EJB, etc.) then you could be fine going with Tomcat using a grails application. We use Tomcat at work for hosting one of our web applications.
In regards to connection pooling managed by JBoss, Tomcat can also do that. Take a look at this documentation page. Hope this helps.

Resources