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

Re: Help with Scaled Cartridges Racing (mariadb galera)



I realize you're in the same boat I was a few weeks ago, it's a bit unfortunate the docs are just too large and all over the place. So I'll try bring you up to speed:

But if you want to run through the code to my understanding follow the files in this order.

metadata/manifest.yml (important, but just for defining variables, ports etc.)
bin/setup - nothing much here, create the folders
bin/install - this is the part I'm stuck at, I need to find a way so that only one gear will do those steps
bin/post_install - extra steps after the install

bin/control - here's where I have some logic, check the start/stop etc. It's not well implemented and needs a bit more thought.

Let me know if you've got any suggestions, it'd be much appreciated.

On Tue, Feb 25, 2014 at 9:04 PM, Marian Ignev <m ignev gmail com> wrote:
Hello Andrew,
I'm not very familiar with creating of cartridges yet and thats why my question may be will sounds stupid but ... is there any option after the launching of whatever number of Galera instances to talk each other?

I am asking because if there is such of this option or something simillar, we can write some logic that will tell you will be the master of masters and you will be the guy who will initiate the database and so on.

The other way is to run cartridges with some startup script that will connect with other cartridges of type Galera and will start/stop ... whatever the other cartridges.

Sorry once again if this mail is stupid for you ... but i am just thinking aloud.


2014-02-25 11:47 GMT+02:00 Andrew Lau <andrew andrewklau com>:
Hi guys,

I've been working on bringing MariaDB Galera [1] to OpenShift and so far I've quite successful with the help from many different people. I'm stuck on a few things though which I'm hoping someone could help me with.

- Determining a master gear for the database initialization
With the galera cluster, we need to have one gear create the database, drop test user. etc. all the normal stuff, however only one needs to do this. The problem is, starting the cartridge with min 3 gears, they will all race to start, this makes using a hook method not possible because there'll be too many inconsistencies. I'd ideally not want to be creating two separate cartridges just for this.

So far the only option I can think of is starting the cartridge as one gear, and then adding the others after. But I'd ideally like to reduce the amount of work the user needs to do to get this up and running.

If anyone wants to take it for a spin, you'll need to put it behind a scaled web cartridge (eg. php). Right now you'll end up with X instances of mariadb in separate gears.

- Is telnet safe to use
I know with all recent OS installs, telnet is not bundled as a pre-installed package, and neither is nc. However openshift online nodes seem to have telnet accessible. Right now, I'm just using it to do inte-gear testing. ie. before we start the cluster, let's check which hosts are online so we don't try connect to a dead host. [2]


Any help would be much appreciated!

Thanks,
Andrew


_______________________________________________
dev mailing list
dev lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev




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