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

[build] Add data directory for plugins #7457

Merged
merged 2 commits into from
Jun 21, 2016
Merged

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Jun 14, 2016

Closes #7157, also part of #7275.

This adds a data directory that plugins can write files to. For archives, this live at installedPlugins/.data, and for packages at /var/lib/kibana.

The data folder path is added as part of the config object, config.get('path.data')

@w33ble
Copy link
Contributor

w33ble commented Jun 14, 2016

Nice! Are there any plans to expose the .data path programmatically, maybe via the kibana or server object? It would be nice if we could just tell plugin authors to use a service of some kind to control where they write data, instead expecting them to handle the paths themselves.

@jbudz
Copy link
Member Author

jbudz commented Jun 14, 2016

Good call, it definitely should. I'm not quite sure on implementation yet but it's on the list.

@w33ble
Copy link
Contributor

w33ble commented Jun 14, 2016

it's on the list.

Is there an issue you can cross-link?

@jbudz
Copy link
Member Author

jbudz commented Jun 14, 2016

Checkbox one of #7275

@jbudz
Copy link
Member Author

jbudz commented Jun 16, 2016

@w33ble gave it a go adding it to our config object. Names match https://www.elastic.co/guide/en/elasticsearch/reference/master/rpm.html#rpm-layout

@@ -95,6 +96,11 @@ module.exports = () => Joi.object({
initialize: Joi.boolean().default(true)
}).default(),

path: Joi.object({
data: Joi.string().default(getData()),
conf: Joi.string().default(getConfig())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably be removed, at this point it's already loaded

@jbudz jbudz force-pushed the issues/7157 branch 3 times, most recently from cf64bc0 to 16e8975 Compare June 16, 2016 20:56
@w33ble
Copy link
Contributor

w33ble commented Jun 21, 2016

Updated reporting and used the setting, everything worked as expected.

The only feedback I have is the use of config.get('path.data'). That's a pretty generic namespace, but the target path (installedPlugins/.data) is clearly meant for "external" plugins. Even as I was typing this, I was thinking that the distinction between "internal" (packaged by default) and "external" plugins was odd.

I know the package changes already went in, so I'm OK leaving this alone for now, but for the next release, it might be better to move .data to the root path. At the very least I'd like to see a discussion issue opened for this, if not an actual issue about moving .data.

Other than that, this LGTM!

@jbudz
Copy link
Member Author

jbudz commented Jun 21, 2016

Opened #7519

@jbudz jbudz merged commit 62f258b into elastic:master Jun 21, 2016
jbudz added a commit that referenced this pull request Jun 21, 2016
---------

**Commit 1:**
[build] Add data directory that plugins can write to.  Closes #7157

* Original sha: 5b19534
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-06-14T16:50:40Z

**Commit 2:**
[config] Add path.conf, path.data

* Original sha: 16e8975
* Authored by Jonathan Budzenski <jbudz@users.noreply.github.com> on 2016-06-16T16:17:51Z
jbudz added a commit that referenced this pull request Jun 21, 2016
@epixa epixa added v5.0.0 and removed v5.0.0 labels Jun 28, 2016
airow pushed a commit to airow/kibana that referenced this pull request Feb 16, 2017
[build] Add data directory for plugins

Former-commit-id: 62f258b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants