mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Fix tasks so the server builds correctly
- Fix logging to use json output when using kibana.js to start server - Closes #4241 - Support process.env.CONFIG_PATH - add bundled_plugin_ids support back into server
This commit is contained in:
parent
048cd0e293
commit
1e6f904530
3 changed files with 12 additions and 4 deletions
|
@ -6,7 +6,7 @@ var program = require('commander');
|
|||
var path = require('path');
|
||||
var writePidFile = require('../lib/write_pid_file');
|
||||
var loadSettingsFromYAML = require('../lib/load_settings_from_yaml');
|
||||
var settings = {};
|
||||
var settings = { 'logging.console.json': true };
|
||||
|
||||
var env = (process.env.NODE_ENV) ? process.env.NODE_ENV : 'development';
|
||||
var packagePath = path.resolve(__dirname, '..', '..', '..', 'package.json');
|
||||
|
@ -51,12 +51,13 @@ if (program.logFile) {
|
|||
settings['logging.file'] = program.logFile;
|
||||
}
|
||||
|
||||
if (program.config) {
|
||||
// Create the settings with the overrides from the YAML config file.
|
||||
settings = _.defaults(settings, loadSettingsFromYAML(program.config));
|
||||
var configPath = process.env.CONFIG_PATH || program.config;
|
||||
if (configPath) {
|
||||
settings = _.defaults(settings, loadSettingsFromYAML(configPath));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Start the Kibana server with the settings fromt he CLI and YAML file
|
||||
var kibana = new Kibana(settings);
|
||||
kibana.listen()
|
||||
|
|
|
@ -23,6 +23,7 @@ module.exports = function (path) {
|
|||
if (config.ssl_key_file) settings['kibana.server.ssl.key'] = config.ssl_key_file;
|
||||
if (config.pid_file) settings['config.server.pidFile'] = config.pid_file;
|
||||
if (config.log_file) settings['logging.file'] = config.log_file;
|
||||
if (config.bundled_plugin_ids) settings['kibana.bundledPluginIds'] = config.bundled_plugin_ids;
|
||||
return settings;
|
||||
};
|
||||
|
||||
|
|
|
@ -42,6 +42,12 @@ module.exports = function (grunt) {
|
|||
src: '**',
|
||||
dest: '<%= build %>/kibana/lib'
|
||||
},
|
||||
{
|
||||
expand: true,
|
||||
cwd: '<%= server %>/plugins/',
|
||||
src: '**',
|
||||
dest: '<%= build %>/kibana/plugins'
|
||||
},
|
||||
{
|
||||
expand: true,
|
||||
cwd: '<%= server %>/routes/',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue