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

Disable specific plugins at startup #6496

Closed
tbragin opened this issue Mar 10, 2016 · 6 comments
Closed

Disable specific plugins at startup #6496

tbragin opened this issue Mar 10, 2016 · 6 comments

Comments

@tbragin
Copy link
Contributor

tbragin commented Mar 10, 2016

Today in Kibana we have 4 separate major tabs: Discover, Visualize, Dashboard, Settings. These are currently implemented as a plugin, but could conceptually be broken out into separate plugins eventually.

In 5.0, we'll be adding more, for instance, Console, and all of installed custom plugins will appear as tabs in the left-hand nav.

It is reasonable for an administrator to want to exclude plugins shipped by default in a specific instance of Kibana at startup (e.g. have an instance that doesn't have access to the Settings or the Console tab).

@spalger
Copy link
Contributor

spalger commented Mar 10, 2016

When apps are implemented as individual plugins, that will be simple to do:

console:
  enabled: false

That said, the settings plugin might be a bit too "core" to exclude, so we might want to build it as a UI in one plugin and a service in another. This way you can simply disable the settings UI without preventing the system from having settings.

@rashidkpc
Copy link
Contributor

So this is already done right @spalger? We might need another ticket to break out the Kibana tabs into separate plugins but this functionality already exists

@tbragin
Copy link
Contributor Author

tbragin commented Mar 15, 2016

So is @spalger saying that this syntax will already work? I thought he was just proposing the syntax. If it works, great - then yes, we just need a ticket to break out the "core" tabs into separate plugins.

@spalger
Copy link
Contributor

spalger commented Mar 15, 2016

This totally works. You can even give it a shot straight from the command line:

./bin/kibana --kbn_vislib_vis_types.enabled=false

@tbragin tbragin changed the title Restrict access to specific plugins Disable specific specific plugins at startup Mar 15, 2016
@tbragin
Copy link
Contributor Author

tbragin commented Mar 15, 2016

Cool, I updated the issue to clarify we're talking about disabling or enabling specific plugins at startup. I'll close this one and create another one.

@tbragin tbragin closed this as completed Mar 15, 2016
@tbragin tbragin changed the title Disable specific specific plugins at startup Disable specific plugins at startup Aug 29, 2016
@piotrkochan
Copy link

@spalger it does not work for me

This totally works. You can even give it a shot straight from the command line:
./bin/kibana --kbn_vislib_vis_types.enabled=false

Dockerfile:

FROM docker.elastic.co/kibana/kibana:5.5.1
....
CMD ["/usr/share/kibana/bin/kibana", "--kbn_vislib_vis_types.enabled=false"]
FATAL { Error: Optimizations failure.

   ERROR in ./src/ui/public/vis/schemas.js
   Module not found: Error: Cannot resolve module 'plugins/kbn_vislib_vis_types/controls/rows_or_columns.html' in /usr/share/kibana/src/ui/public/vis
    @ ./src/ui/public/vis/schemas.js 32:24-93
   
   ERROR in ./src/ui/public/vis/schemas.js
   Module not found: Error: Cannot resolve module 'plugins/kbn_vislib_vis_types/controls/radius_ratio_option.html' in /usr/share/kibana/src/ui/public/vis
    @ ./src/ui/public/vis/schemas.js 34:24-97
   
   ERROR in ./src/core_plugins/region_map/public/region_map_controller.js
   Module not found: Error: Cannot resolve module 'plugins/kbn_vislib_vis_types/controls/vislib_basic_options' in /usr/share/kibana/src/core_plugins/region_map/public
    @ ./src/core_plugins/region_map/public/region_map_controller.js 7:0-69

   at Object.exports.create (/usr/share/kibana/node_modules/boom/lib/index.js:21:17)
   at FsOptimizer.failedStatsToError (/usr/share/kibana/src/optimize/base_optimizer.js:233:27)
   at /usr/share/kibana/src/optimize/fs_optimizer.js:33:30
   at Compiler.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:181:13)
   at /usr/share/kibana/node_modules/webpack/lib/Compiler.js:403:12
   at Compiler.next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:67:11)
   at Compiler.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/CachePlugin.js:40:4)
   at Compiler.applyPluginsAsync (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:71:13)
   at Compiler.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:400:9)
   at Compilation.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:577:13)
   at Compilation.applyPluginsAsync (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:60:69)
   at Compilation.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:572:10)
   at Compilation.next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:67:11)
   at Compilation.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/optimize/UglifyJsPlugin.js:140:4)
   at Compilation.applyPluginsAsync (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:71:13)
   at Compilation.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:567:9)
   at Compilation.next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:67:11)
   at ExtractTextPlugin.<anonymous> (/usr/share/kibana/node_modules/extract-text-webpack-plugin/index.js:303:4)
   at Compilation.applyPluginsAsync (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:71:13)
   at Compilation.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:563:8)
   at Compilation.next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:67:11)
   at ExtractTextPlugin.<anonymous> (/usr/share/kibana/node_modules/extract-text-webpack-plugin/index.js:279:5)
 cause: 
  { Error: Optimizations failure.
  
      ERROR in ./src/ui/public/vis/schemas.js
      Module not found: Error: Cannot resolve module 'plugins/kbn_vislib_vis_types/controls/rows_or_columns.html' in /usr/share/kibana/src/ui/public/vis
       @ ./src/ui/public/vis/schemas.js 32:24-93
      
      ERROR in ./src/ui/public/vis/schemas.js
      Module not found: Error: Cannot resolve module 'plugins/kbn_vislib_vis_types/controls/radius_ratio_option.html' in /usr/share/kibana/src/ui/public/vis
       @ ./src/ui/public/vis/schemas.js 34:24-97
      
      ERROR in ./src/core_plugins/region_map/public/region_map_controller.js
      Module not found: Error: Cannot resolve module 'plugins/kbn_vislib_vis_types/controls/vislib_basic_options' in /usr/share/kibana/src/core_plugins/region_map/public
       @ ./src/core_plugins/region_map/public/region_map_controller.js 7:0-69
  
      at Object.exports.create (/usr/share/kibana/node_modules/boom/lib/index.js:21:17)
      at FsOptimizer.failedStatsToError (/usr/share/kibana/src/optimize/base_optimizer.js:233:27)
      at /usr/share/kibana/src/optimize/fs_optimizer.js:33:30
      at Compiler.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:181:13)
      at /usr/share/kibana/node_modules/webpack/lib/Compiler.js:403:12
      at Compiler.next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:67:11)
      at Compiler.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/CachePlugin.js:40:4)
      at Compiler.applyPluginsAsync (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:71:13)
      at Compiler.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compiler.js:400:9)
      at Compilation.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:577:13)
      at Compilation.applyPluginsAsync (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:60:69)
      at Compilation.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:572:10)
      at Compilation.next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:67:11)
      at Compilation.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/optimize/UglifyJsPlugin.js:140:4)
      at Compilation.applyPluginsAsync (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:71:13)
      at Compilation.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:567:9)
      at Compilation.next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:67:11)
      at ExtractTextPlugin.<anonymous> (/usr/share/kibana/node_modules/extract-text-webpack-plugin/index.js:303:4)
      at Compilation.applyPluginsAsync (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:71:13)
      at Compilation.<anonymous> (/usr/share/kibana/node_modules/webpack/lib/Compilation.js:563:8)
      at Compilation.next (/usr/share/kibana/node_modules/tapable/lib/Tapable.js:67:11)
      at ExtractTextPlugin.<anonymous> (/usr/share/kibana/node_modules/extract-text-webpack-plugin/index.js:279:5)
    data: { errors: [Object], warnings: [], publicPath: '/bundles/' },
    isBoom: true,
    isServer: true,
    output: { statusCode: 500, payload: [Object], headers: {} },
    reformat: [Function] },
 isOperational: true,
 data: 
  { errors: 
     [ './src/ui/public/vis/schemas.js\nModule not found: Error: Cannot resolve module \'plugins/kbn_vislib_vis_types/controls/rows_or_columns.html\' in /usr/share/kibana/src/ui/public/vis\n @ ./src/ui/public/vis/schemas.js 32:24-93',
       './src/ui/public/vis/schemas.js\nModule not found: Error: Cannot resolve module \'plugins/kbn_vislib_vis_types/controls/radius_ratio_option.html\' in /usr/share/kibana/src/ui/public/vis\n @ ./src/ui/public/vis/schemas.js 34:24-97',
       './src/core_plugins/region_map/public/region_map_controller.js\nModule not found: Error: Cannot resolve module \'plugins/kbn_vislib_vis_types/controls/vislib_basic_options\' in /usr/share/kibana/src/core_plugins/region_map/public\n @ ./src/core_plugins/region_map/public/region_map_controller.js 7:0-69' ],
    warnings: [],
    publicPath: '/bundles/' },
 isBoom: true,
 isServer: true,
 output: 
  { statusCode: 500,
    payload: 
     { statusCode: 500,
       error: 'Internal Server Error',
       message: 'An internal server error occurred' },
    headers: {} },
 reformat: [Function] }

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

No branches or pull requests

4 participants