xwinus
xwinus

Reputation: 916

Openshift: share MySQL cartrige between applications

I have Java EE web application on RedHat Openshift PaaS, which consists of JBoss EWS, MySQL and phpMyAdmin cartriges. My question is, whether it is possible to share the MySQL cartrige from application one (let's say app1-myname.rhcloud.com) with my second application running under the same OpenShift account (like app2-myname.rhcloud.com)?

Thanks.

Upvotes: 1

Views: 1178

Answers (1)

Sumana Mehta
Sumana Mehta

Reputation: 2663

From this KB: https://www.openshift.com/kb/kb-e1051-how-do-i-connect-multiple-applications-to-one-database#comment-form

OpenShift does not support direct connectivity to an embedded database on non-scalable applications. Having said that, there are 2 workarounds today:

  1. Connecting to a scalable application's database using the hardcoded values since you won't have $OPENSHIFT_DB_* env vars (for scalable apps, see https://openshift.redhat.com/community/kb/kb-e1049-how-does-scaling-work-in-openshift)
  2. ssh port forwarding (see https://openshift.redhat.com/community/forums/openshift/accessing-an-server-port-running-in-openshift-from-another-openshift-image)

Upvotes: 1

Related Questions