Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

We should have an option to download plugins through configuration #132

Open
josepharuja opened this issue Feb 12, 2018 · 11 comments
Open

Comments

@josepharuja
Copy link

No description provided.

@viliusl
Copy link
Collaborator

viliusl commented Feb 15, 2018

@josepharuja can you give me some use-case example for requirement you are having?

@josepharuja
Copy link
Author

josepharuja commented Feb 28, 2018

Apologies for the late response. Our MySQL db needs table level encryption for data so we use https://dev.mysql.com/doc/refman/5.7/en/keyring.html plugin.
To Get this working I had to keep the keyring plugin file along with the project and used mysql server variables https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_plugin_dir to get the plugin working for the embedded database

@flian
Copy link

flian commented Mar 8, 2018

@josepharuja I guess you can try "withServerVariable", sample code like:
`
MysqldConfig config = aMysqldConfig(v5_6_35)

            .withCharset(UTF8)

            .withPort(getPort())

            .withUser(USERNAME, PASSWORD)

            .withTimeout(2, TimeUnit.MINUTES)

            .withServerVariable("early-plugin-load", "keyring_file.so")

            .withServerVariable("keyring_file_data", "/usr/local/mysql/mysql-keyring/keyring")

            .build();

`

@viliusl
Copy link
Collaborator

viliusl commented Apr 26, 2018

@flian did it work? Because adding support for external plugins seems like quite and extension - dealing with only mysql itself and multi-platform support is quite messy - adding plugins to the mix is not something I would want to work on right now. PR's are welcome given they have multi-platform tests with them. Method @josepharuja mentioned might just do the trick for these rare cases.

@josepharuja
Copy link
Author

It is not loading the plugin. Sorry for a late response

@noam-almog
Copy link
Contributor

@viliusl we will probably need to install those dll's, so in order for this to work.
I did something similar in PR #74
perhaps we can explicitly support specific (requested) plugins

@viliusl
Copy link
Collaborator

viliusl commented May 31, 2018

@josepharuja @noam-almog - this is quite tricky.

So I optimize extract fielset to contain minimal needed list of mysql files to make startup as fast as possible. Now if we add explicit support for plugins (that require additional libraries), then questions are:

  • how do we manage it to make it cross-platform - or just don't;
  • how do we update extracted files. Because you can add plugin after your msyql is downloaded and preextracted. Then we need a way to update extracted cache.

So it's doable, just quite some work:/

@noam-almog
Copy link
Contributor

cross platform is a must, at least if we can do that
update of local cache is too much work, we can just have a check if file exists before loading the plugin and either invalidate cache or just break the build and notify the developer to delete cache.
note that we don't want to support all plugins, just explicitly what is requested (i guess there are no more than 2 plugins that people will need)
WDYT ?

@viliusl
Copy link
Collaborator

viliusl commented May 31, 2018

@noam-almog sure - then let's hard-code supported list of plugins and add builder option?

@noam-almog
Copy link
Contributor

@viliusl that is exactly what i thought we should do
....withKeyRingPlugin()

@josepharuja
Copy link
Author

@viliusl @noam-almog - Is somebody working on this at the moment ? Is there anything I can do. I am totally new to this project. But I am happy to help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants