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

Option to download MySQL #18

Closed
philip opened this Issue Jun 28, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@philip
Copy link

philip commented Jun 28, 2018

I suspect there are good reasons this isn't done now (technical and/or non-technical), but just in case this request is for a download feature.

For example I imagine executing dbdeployer download 8.0.11 (or somesuch) that'd use common defaults (e.g., 64-bit, generic glibc 2.12, ...) to download 8.0.11. It could become more complicated in the future.

On Linux it'd probably download this:
https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.11-linux-glibc2.12-x86_64.tar.gz

On macOS:
https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.11-macos10.13-x86_64.dmg

But that brings us to our first (and main) issue; how does it know the path? For example, might it ever be 8.0.11-1 instead of 8.0.11? Or 10.15 instead of 10.13? What about RC releases? Good questions and there are many more :)

Thankfully this functionality is a nice-to-have (not critical) so unexpected changes can cause failure without too much pain. But, download paths can (for the most part) be predicted. Not yet sure if other commands should use it (e.g., whether dbdeployer deploy single 8.0.11 might prompt I could not find v8.0.11; shall I attempt to download it?) Maybe.

Before I (or anyone) does further research, I'm curious if you see this as a possibility. If so then I'll dig a little deeper.

@datacharmer

This comment has been minimized.

Copy link
Owner

datacharmer commented Jun 29, 2018

This feature is high in the TODO list.
dbdeployer's antecedent, MySQL-Sandbox, has such feature (make_sandbox GET:5.7).

That feature uses a fixed location (my Github repository for reduced MySQL tarballs).

In dbdeployer, it should become dbdeployer unpack GET:5.7 or dbdeployer unpack GET:5.7.xx or dbdeployer unpack --repo-url=https://someplace.org tarball-name.

There are four reasons for delaying the same feature in dbdeployer:

  1. the location used is not appropriate for this purpose. GitHub should not be used as a data repository, and the latest releases of MySQL, even when stripped of all unnecessary files, are beyond the recommended limit of 50 MB.
  2. The MySQL Community team at Oracle has promised to provide such repository, but it is taking some time.
  3. The repository should not only offer a simple MySQL tarball for each version, but also some flavors, such as:
    • complete and ofter unnecessarily heavy MySQL tarball
    • reduced tarball (the very minimum)
    • Reduced tarball with just MySQL server + debug server and plugins
    • MySQL server + MySQL shell + MySQL router
  4. The current repository is only for Linux tarballs. I should add MacOs ones and maintain them.

In short, I don't want to release a feature that depends on a location that might not be sustainable.
The alternative to using Oracle's official repository (when it is provided) is that someone in the MySQL community commits to maintaining the repository with a dedicated web server.

BTW, in your examples above, the package to download for MacOs is always a .tar.gz, not a .dmg.

@datacharmer

This comment has been minimized.

Copy link
Owner

datacharmer commented Jan 7, 2019

As of version 1.16.0, dbdeployer can download remote MySQL tarballs from a Github repository. The tarball are reduced ones, created inside Mysql-Docker-Minimal.

The tarballs are only available for Linux. However, since the URL for the files is customizable, you can use your own repository to download files for other operating systems.

Example:

$ dbdeployer remote list
Files available in https://raw.githubusercontent.com/datacharmer/mysql-docker-minimal/master/dbdata/available.json
4.1 -> [4.1.22]
5.0 -> [5.0.15 5.0.96]
5.1 -> [5.1.72]
5.5 -> [5.5.60 5.5.61]
5.6 -> [5.6.40 5.6.41]
5.7 -> [5.7.23 5.7.34]
8.0 -> [8.0.12 8.0.13]

msandbox@testdb:~$ dbdeployer remote download 8.0.13
File /home/msandbox/8.0.13.tar.xz downloaded

msandbox@testdb:~$ dbdeployer unpack 8.0.13.tar.xz
Unpacking tarball 8.0.13.tar.xz to $HOME/opt/mysql/8.0.13
.......79

Tarballs for other operating systems (or from other distributions, such as Percona Server, may be made available if someone gives me access to a reliable server that can host the files.

Specifically, minimal tarballs for MacOS are going to be larger than the ones for Linux, and therefore I am skipping plans to include them in the current repository for the time being.

@datacharmer datacharmer self-assigned this Jan 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment