colinmollenhour / mariadb-galera-swarm

MariaDb Galera Cluster container based on official mariadb image which can auto-bootstrap and recover cluster state.
https://hub.docker.com/r/colinmollenhour/mariadb-galera-swarm
Apache License 2.0
216 stars 101 forks source link

Arm32bit and Arm64bit #56

Open DrEVILish opened 5 years ago

DrEVILish commented 5 years ago

Unable to use this on ARM arch due to the use of ttp://www.quicklz.com/qpress-11-linux-x64.tar which is a compression utility, I'm trying to reformat the DockerFile to build to support arm64 and arm32. Would you be able to tell me what this binary is used for?

colinmollenhour commented 5 years ago

It is used by the xtrabackup-v2 script for SST although there are alternatives such as gzip and pigz.

DrEVILish commented 5 years ago

One other question, how is Galera-healthcheck used? I'm having trouble compiling it into arm32 or arm64.

`https://github.com/cloudfoundry-incubator/galera-healthcheck cd galera-healthcheck go get

_/root/galera-healthcheck

./main.go:41:63: cannot use "code.cloudfoundry.org/lager".Data literal (type "code.cloudfoundry.org/lager".Data) as type "github.com/cloudfoundry-incubator/galera-healthcheck/vendor/code.cloudfoundry.org/lager".Data in argument to logger.Error `etc... Could you shed any light on if there is something I'm doing wrong?

Linux g01 4.14.5-92 #1 SMP PREEMPT Mon Dec 11 15:48:15 UTC 2017 armv7l armv7l armv7l GNU/Linux

jsenecal commented 5 years ago

@DrEVILish use the search function :)

It is used like this: https://github.com/colinmollenhour/mariadb-galera-swarm/blob/577db80c5494aac7303683f34b2b2be0706b911e/start.sh#L365-L369 and like that: https://github.com/colinmollenhour/mariadb-galera-swarm/blob/577db80c5494aac7303683f34b2b2be0706b911e/start.sh#L373-L377

colinmollenhour commented 5 years ago

I'm not experienced with go so I remember it was difficult to get galera-healthcheck to compile when I tried, hence the inclusion of the binary rather than the full build process.. Sorry, wasn't thinking about arm.. Note, the version used here is from https://github.com/sttts/galera-healthcheck which is a fork of the one you tried.

DrEVILish commented 5 years ago

Thanks, I know this isn't an issue related to your project but I'm having a real issue getting a MariaDb/MySQL Galera cluster running inside docker on my OdroidXU4s currently armhf arch.

I think I've found a better solution thanks very much for your time.

colinmollenhour commented 5 years ago

No problem, good luck with your endeavors. I'll leave this open for future reference.

cvb941 commented 5 years ago

Thanks, I know this isn't an issue related to your project but I'm having a real issue getting a MariaDb/MySQL Galera cluster running inside docker on my OdroidXU4s currently armhf arch.

I think I've found a better solution thanks very much for your time.

Would you be okay with sharing your solution? I'm trying to run a mariadb cluster on raspberry pies, so I'm currently somewhere in a place where you were too..

DrEVILish commented 5 years ago

So two options: The latest version of MariaDb should have these features built in very soon. I bought an amd64 based SBC (Upboard) which works.

cvb941 commented 5 years ago

After tinkering and troubleshooting I have finally managed to get it working on my two raspberry pies (ver. 3 and 2).

I have compiled the dependent binaries in the bin folder for docker arm32v6 using a raspberry and created a new Dockerfile using the mariadb image for raspberry from jsurf. See this commit in my forked repo, if anyone would like to use it.

I have also faced problems with an int overflow error described here and also the bind address was set to 127.0.0.1 and I had trouble changing it, in my fork I have fixed both of those issues, see the commits.

@colinmollenhour maybe we could create a template for all of the dockerfiles (mariadb versions and architectures) including my arm32 dockerfile, add a docker manifest and we could have working multiarch images for future users

colinmollenhour commented 5 years ago

Very nice! Please submit a pull request with the template as proposed.

cvb941 commented 5 years ago

I opened a pull request #76

celevra commented 2 weeks ago

+1 for arm support