[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Running commands

Hi Rodolfo, 

My idea was exactly using persistent storage and having the following directory tree:

Exporting a NFS volume and create MYSQL_DATADIR of multiple containers inside the one volume and each container would use a different data dir like you said, but it seems will just complicate matters.

El jue., 7 ene. 2016 a las 11:06, Rodolfo Carvalho (<rcarvalh redhat com>) escribió:
Hi Alejandro,

On Thu, Jan 7, 2016 at 9:25 AM, Alejandro Nieto Boza <ale90nb gmail com> wrote:
You're right, I want to start a mysql server but changing the mysql_datadir (the datadir doesn't exist, so I need to create it ussing variables). 

It seems that, because you want to pass the MYSQL_DATADIR env var, you need to start multiple containers off the same image and each container would use a different data dir.
Why do you need that?

Trying to use a different data dir in runtime doesn't sound like a good idea to me.
Keep in mind that the next step will be thinking about persistent storage, and having data dirs in arbitrary paths will just complicate matters.

That said, you could theoretically layer on top of openshift/mysql-55-centos7, and maintain your own image that updates the appropriate scripts to do whatever you need.
But that's really a bad idea and a big maintenance burden for you.

The default data dir is specified as a volume in the image openshift/mysql-55-centos7:

And the same dir is later referenced in scripts for initialization, adjusting permission bits, etc:

Rodolfo Carvalho

OpenShift Developer Experience

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]