Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support arm64 architecture #125

Closed
longquan7 opened this issue Aug 28, 2017 · 25 comments
Closed

support arm64 architecture #125

longquan7 opened this issue Aug 28, 2017 · 25 comments
Labels
Request Request for image modification or feature

Comments

@longquan7
Copy link

I want to build this image on arm64 architecture, but I'm not find arm64 package on http://ftp.osuosl.org/pub/mariadb/repo/ , So I want to know that whether or not support arm64.

@yosifkit
Copy link
Contributor

We'll have to wait until MariaDB upstream want to support other architectures in their apt repo. cc @tanji, any thoughts on other architectures for the MariaDB image?

@longquan7
Copy link
Author

@yosifkit OK,we have to wait MariaDB upstream support

@tanji
Copy link

tanji commented Aug 30, 2017

Hi, arm64 support will not happen because MariaDB Foundation focuses on intel architecture, the choice of building for other platforms is left to distribution maintainers. You can find arm64 packages in debian for example.

@tianon
Copy link
Contributor

tianon commented Oct 12, 2017

@tanji do you happen to know how/where the upstream .deb files are built? Usually Debian packages like that come with a .dsc source package that can be used to reproduce the build (and we've used exactly those in the PostgreSQL image to support more architectures than upstream publishes for; docker-library/postgres#330), but I can't seem to find something similar for MariaDB which we could use to build the same bits that are officially published, but for other architectures. 😇 😕

If that's something that would be possible for us to do, is it something that would make sense for adding more architectures to the Docker image?

@tanji
Copy link

tanji commented Oct 26, 2017

@tianon DEB files are built using the autobake_deb.sh script which is available in the sources: https://github.com/MariaDB/server/blob/10.2/debian/autobake-deb.sh it doesn't use any .dsc but you should be able to do your own builds easily.
Also, buildbot can be useful: http://buildbot.askmonty.org/buildbot/waterfall?branch=10.1

@vielmetti
Copy link

MariaDB announced support for arm64 today as part of the Qualcomm Centriq 2400 announcement.

https://mariadb.com/resources/blog/mariadb-server-102-now-available-qualcomm-centriqtm-2400-server-processor

"MariaDB 10.2 Server for Centos 7 and Ubuntu 16 is available now."

@tianon
Copy link
Contributor

tianon commented Nov 15, 2017 via email

@vielmetti
Copy link

Related, MariaDB is setting up to use the Works on Arm cluster at https://github.com/WorksOnArm/cluster/issues/21

@wglambert wglambert added the Request Request for image modification or feature label Apr 25, 2018
@tianon
Copy link
Contributor

tianon commented Apr 25, 2018

I've been looking into this, and the linked blog post implies 10.2 is available for arm64 on Ubuntu 16, but I'm not seeing that:

http://ftp.osuosl.org/pub/mariadb/repo/10.2/ubuntu/dists/xenial/main/

(only amd64, i386, and ppc64el)

But, 10.3 does appear to include arm64:

http://ftp.osuosl.org/pub/mariadb/repo/10.3/ubuntu/dists/xenial/main/

(and ppc64el has been supported for a good long time; the 5.5 series includes ppc64el support for Ubuntu Trusty)

@tianon
Copy link
Contributor

tianon commented Apr 25, 2018

For reference, here's the current diff I'm testing with:

diff --git a/Dockerfile.template b/Dockerfile.template
index 0e73316..aeaca36 100644
--- a/Dockerfile.template
+++ b/Dockerfile.template
@@ -1,5 +1,5 @@
 # vim:set ft=dockerfile:
-FROM debian:%%SUITE%%
+FROM ubuntu:%%SUITE%%
 
 # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
 RUN groupadd -r mysql && useradd -r -g mysql mysql
@@ -42,9 +42,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 	&& rm -rf /var/lib/apt/lists/*
 
 ENV GPG_KEYS \
-# Key fingerprint = 1993 69E5 404B D5FC 7D2F  E43B CBCB 082A 1BB9 43DB
-# MariaDB Package Signing Key <package-signing-key@mariadb.org>
-	199369E5404BD5FC7D2FE43BCBCB082A1BB943DB \
+# Key fingerprint = 177F 4010 FE56 CA33 3630  0305 F165 6F24 C74C D1D8
+# MariaDB Signing Key <signing-key@mariadb.org>
+	177F4010FE56CA3336300305F1656F24C74CD1D8 \
 # pub   1024D/CD2EFD2A 2009-12-15
 #       Key fingerprint = 430B DF5C 56E7 C94E 848E  E60C 1C4C BDCD CD2E FD2A
 # uid                  Percona MySQL Development Team <mysql-dev@percona.com>
@@ -75,7 +75,7 @@ RUN echo "deb https://repo.percona.com/apt %%SUITE%% main" > /etc/apt/sources.li
 ENV MARIADB_MAJOR %%MARIADB_MAJOR%%
 ENV MARIADB_VERSION %%MARIADB_VERSION%%
 
-RUN echo "deb http://ftp.osuosl.org/pub/mariadb/repo/$MARIADB_MAJOR/debian %%SUITE%% main" > /etc/apt/sources.list.d/mariadb.list \
+RUN echo "deb http://ftp.osuosl.org/pub/mariadb/repo/$MARIADB_MAJOR/ubuntu %%SUITE%% main" > /etc/apt/sources.list.d/mariadb.list \
 	&& { \
 		echo 'Package: *'; \
 		echo 'Pin: release o=MariaDB'; \
diff --git a/update.sh b/update.sh
index 15b3bc8..76eb8fb 100755
--- a/update.sh
+++ b/update.sh
@@ -1,9 +1,9 @@
 #!/bin/bash
 set -eo pipefail
 
-defaultSuite='jessie'
+defaultSuite='xenial'
 declare -A suites=(
-	[5.5]='wheezy'
+	[5.5]='trusty'
 )
 defaultXtrabackup='percona-xtrabackup-24'
 declare -A xtrabackups=(
@@ -24,7 +24,7 @@ travisEnv=
 for version in "${versions[@]}"; do
 	suite="${suites[$version]:-$defaultSuite}"
 	fullVersion="$(
-		curl -fsSL "http://ftp.osuosl.org/pub/mariadb/repo/$version/debian/dists/$suite/main/binary-amd64/Packages" \
+		curl -fsSL "http://ftp.osuosl.org/pub/mariadb/repo/$version/ubuntu/dists/$suite/main/binary-amd64/Packages" \
 			| tac|tac \
 			| awk -F ': ' '$1 == "Package" { pkg = $2; next } $1 == "Version" && pkg == "mariadb-server" { print $2; exit }'
 	)"

@HesselTjeerdsma
Copy link

@tianon Have you gotten it to work? If yes could you please provide your Dockerfile?

@numbworks
Copy link

I add +1 to this thread!

I was just trying to setup my Raspberry Pi 3 as secondary test environment for Docker, but I just discovered I can't run MariaDB's image on it:

ERROR: no matching manifest for linux/arm in the manifest list entries

Having the MariaDB's image available for Raspberry Pi 3 (and similar) would be definitely useful :-)
Less virtual machines, more real machines!

@lag-linaro
Copy link

Looks like MariaDB are now publishing ARM64 binaries for Ubuntu:

http://ftp.osuosl.org/pub/mariadb/repo/10.2/ubuntu/dists/xenial/main/

@tianon please could you take another look?

@lag-linaro
Copy link

lag-linaro commented Jul 5, 2018

Any movement on this?

I've tried to contact whoever deals with MariaDB packaging (in order to get them to produce ARM64 pre-builts for Debian), but to no avail.

How much of a big deal would it be to switch from Debian to Ubuntu?

It may also be interesting to note that Jessie lost Security Update support last month, so it should probably be bumped (to Ubuntu? 😉) soon anyway.

@vuvova
Copy link
Member

vuvova commented Jul 5, 2018

Who did you try to contact, how and when?

@lag-linaro
Copy link

I tried to reach out today during the "Immediate feedback" session via #maria on Freenode.

@vuvova
Copy link
Member

vuvova commented Jul 6, 2018

Hmm, okay. You might've had a better chance for a feedback if you'd written an email to the mailing list.

Anyway... Apparently now we only builds arm64 packages for Ubuntu Bionic and for CentOS 7.4.

Adding support for Debian (Jessie?) seems possible, although it's not exactly a priority at the moment.

@lag-linaro
Copy link

Thanks for your reply. I will sign-up to the mailing list if I require this kind or correspondence in the future.

This project is based on Jessie, but as mentioned above Jessie has reached its EOL with regards to security updates. My suggestion is to bump it to something fully supported.

ARM64 support appears to be important to the MariaDB project, I glean this from the fact that David Thompson (a.k.a. @davidwbt) ensured its presence on the WorksOnArm infrastructure a few months back (https://github.com/WorksOnArm/cluster/issues/21). As an aside, it was not formally published until I reported it yesterday, but it's up there now, which is awesome (https://www.worksonarm.com/explore/mariadb).

TWISI, there are 2 options for acquiring ARM64 support for MariaDB:

  1. Bump this project to base itself on Ubuntu
  2. Provide packaging for Debian (Jessie if this project is not bumped, later if it is)

@yosifkit
Copy link
Contributor

yosifkit commented Jul 7, 2018

I'd lean toward Ubuntu Trusty for 5.5 and then 18.04 for the rest if we can. This will hopefully be the least breaking for users and get us more supported architectures from upstream MariaDB. Perhaps add tags like 10.1-jessie to the current images just to make the transition clear (like python in docker-library/python#215).

We still have to figure out what to do about percona-xtrabackup. I think we might be best just installing it on the architectures it is possible for the older versions of MariaDB (and leaving unsupported arches like ppc64le without xtrabackup 😢). Then we switch to mariadb-backup where it is supported. It looks like received GA status in 10.1.26+ and 10.2.10+ (https://mariadb.com/kb/en/library/mariadb-backup-overview/).

So basically a combination of this PR, #158 and #155. I should have a chance to work on this in the coming weeks (feel free to update a PR or point to a branch you are working on if you want early review or collaboration).

From related #175 (comment)

@vuvova
Copy link
Member

vuvova commented Jul 7, 2018

@lag-linaro okay, thanks. The way I see it it's now up to this project to decide what to do. So I'll leave it at it. If you'll need us to do something (like, there will be problems on Bionic or you decide not to go with Ubuntu at all), ping me here or, better use maria-developers@lists.launchpad.net or https://jira.mariadb.org (for example, I've learned about this issue #125 from https://jira.mariadb.org/browse/MDEV-11847).

@lag-linaro
Copy link

lag-linaro commented Jul 24, 2018

You guys are all awesome.

I was able to checkout the latest master branch and build this for ARM64 with great success.

Please could you enable it for ARM64 in Docker's Official Images repo?

If you don't have the bandwidth I'd be happy to test and submit a PR for you.

Tested-by: Lee Jones <lee.jones@linaro.org>

@yosifkit
Copy link
Contributor

Closed by #184. A PR to official images will probably happen later today.

@lag-linaro
Copy link

lag-linaro commented Aug 1, 2018

Would you guys be kind enough to look at why the BUILDS are semi-failing please?

Looks like a Percona failure.

EDIT: Actually it looks like a scripting WARNING when checking for Percona, but the ERROR seems to be a version request mismatch/unavailability.

@lag-linaro
Copy link

On closer in inspection, it looks like MariaDB do not provide ARM64 packages for Xenial.

@tianon
Copy link
Contributor

tianon commented Aug 2, 2018

Just to follow up, this was fixed by #195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request for image modification or feature
Development

No branches or pull requests

10 participants