mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Merge remote-tracking branch 'upstream/6.x' into backport/6.x/pr-19104
This commit is contained in:
commit
740dba8af0
21 changed files with 142 additions and 220 deletions
|
@ -1,17 +0,0 @@
|
|||
|
||||
include::{asciidoc-dir}/../../shared/versions64.asciidoc[]
|
||||
|
||||
:docker-repo: docker.elastic.co/kibana/kibana
|
||||
:docker-image: docker.elastic.co/kibana/kibana:{version}
|
||||
:repo: https://github.com/elastic/kibana/
|
||||
:issue: {repo}issues/
|
||||
:pull: {repo}pull/
|
||||
:commit: {repo}commit/
|
||||
:blob: {repo}blob/{branch}/
|
||||
:security-ref: https://www.elastic.co/community/security/
|
||||
|
||||
include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
|
||||
|
||||
include::introduction.asciidoc[]
|
||||
|
||||
include::setup.asciidoc[]
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
include::migration.asciidoc[]
|
|
@ -1,11 +0,0 @@
|
|||
|
||||
|
||||
include::getting-started.asciidoc[]
|
||||
|
||||
include::discover.asciidoc[]
|
||||
|
||||
include::visualize.asciidoc[]
|
||||
|
||||
include::dashboard.asciidoc[]
|
||||
|
||||
include::timelion.asciidoc[]
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
include::management.asciidoc[]
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
include::plugins.asciidoc[]
|
||||
|
||||
include::development.asciidoc[]
|
||||
|
||||
include::limitations.asciidoc[]
|
||||
|
||||
include::CHANGELOG.asciidoc[]
|
|
@ -1,9 +1,82 @@
|
|||
[[kibana-guide]]
|
||||
= Kibana User Guide
|
||||
|
||||
include::index-shared1.asciidoc[]
|
||||
include::index-shared2.asciidoc[]
|
||||
include::index-shared3.asciidoc[]
|
||||
include::index-shared4.asciidoc[]
|
||||
include::index-shared5.asciidoc[]
|
||||
include::index-shared6.asciidoc[]
|
||||
:include-xpack: true
|
||||
:lang: en
|
||||
:kib-repo-dir: {docdir}
|
||||
:xkb-repo-dir: {docdir}/../x-pack/docs/{lang}
|
||||
:blog-ref: https://www.elastic.co/blog/
|
||||
:wikipedia: https://en.wikipedia.org/wiki
|
||||
|
||||
include::{asciidoc-dir}/../../shared/versions64.asciidoc[]
|
||||
|
||||
:docker-repo: docker.elastic.co/kibana/kibana
|
||||
:docker-image: docker.elastic.co/kibana/kibana:{version}
|
||||
:repo: https://github.com/elastic/kibana/
|
||||
:issue: {repo}issues/
|
||||
:pull: {repo}pull/
|
||||
:commit: {repo}commit/
|
||||
:blob: {repo}blob/{branch}/
|
||||
:security-ref: https://www.elastic.co/community/security/
|
||||
|
||||
include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
|
||||
|
||||
include::introduction.asciidoc[]
|
||||
|
||||
include::setup.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/setup/installing.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/setup/setup-xkb.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/monitoring/monitoring-xkib.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/security/securing-kibana.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/settings/settings-xkb.asciidoc[]
|
||||
|
||||
include::migration.asciidoc[]
|
||||
|
||||
include::getting-started.asciidoc[]
|
||||
|
||||
include::discover.asciidoc[]
|
||||
|
||||
include::visualize.asciidoc[]
|
||||
|
||||
include::dashboard.asciidoc[]
|
||||
|
||||
include::timelion.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/ml/index.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/apm/index.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/graph/index.asciidoc[]
|
||||
|
||||
include::dev-tools.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/searchprofiler/index.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/grokdebugger/index.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/monitoring/index.asciidoc[]
|
||||
|
||||
include::management.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/security/index.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/management/watcher-ui/index.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/upgrade-assistant/index.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/dashboard_only_mode/index.asciidoc[]
|
||||
|
||||
include::{xkb-repo-dir}/reporting/index.asciidoc[]
|
||||
|
||||
include::plugins.asciidoc[]
|
||||
|
||||
include::development.asciidoc[]
|
||||
|
||||
include::limitations.asciidoc[]
|
||||
|
||||
include::CHANGELOG.asciidoc[]
|
|
@ -1,9 +1 @@
|
|||
[[kibana-guide]]
|
||||
= Kibana User Guide
|
||||
|
||||
:include-xpack: true
|
||||
:lang: en
|
||||
:kib-repo-dir: {docdir}
|
||||
:xkb-repo-dir: {docdir}/../x-pack/docs/{lang}
|
||||
|
||||
include::{xkb-repo-dir}/index.asciidoc[]
|
||||
include::index.asciidoc[]
|
||||
|
|
|
@ -12,9 +12,7 @@ import { runTests } from '../../';
|
|||
* if no config option is passed
|
||||
*/
|
||||
export async function runTestsCli(defaultConfigPaths) {
|
||||
const { configs, help, bail, log, installDir } = processArgs(
|
||||
defaultConfigPaths
|
||||
);
|
||||
const { configs, help, bail, log } = processArgs(defaultConfigPaths);
|
||||
|
||||
if (help) return displayHelp();
|
||||
|
||||
|
@ -26,7 +24,7 @@ export async function runTestsCli(defaultConfigPaths) {
|
|||
}
|
||||
|
||||
try {
|
||||
await runTests(configs, { bail, log, installDir });
|
||||
await runTests(configs, { bail, log });
|
||||
} catch (err) {
|
||||
log.error('FATAL ERROR');
|
||||
log.error(err);
|
||||
|
@ -52,7 +50,6 @@ function processArgs(defaultConfigPaths) {
|
|||
log,
|
||||
help: options.help,
|
||||
bail: options.bail,
|
||||
installDir: options['kibana-install-dir'],
|
||||
rest: options._,
|
||||
};
|
||||
}
|
||||
|
@ -67,9 +64,6 @@ function displayHelp() {
|
|||
--config Option to pass in a config
|
||||
Can pass in multiple configs with
|
||||
--config file1 --config file2 --config file3
|
||||
--kibana-install-dir
|
||||
Run Kibana from an existing install directory
|
||||
Default: run from source
|
||||
--bail Stop the test run at the first failure
|
||||
--help Display this menu and exit
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { startServers } from '../../';
|
|||
* @param {string} configPath path to config
|
||||
*/
|
||||
export async function startServersCli(defaultConfigPath) {
|
||||
const { config, log, help, installDir } = processArgv(defaultConfigPath);
|
||||
const { config, log, help } = processArgv(defaultConfigPath);
|
||||
|
||||
if (help) return displayHelp();
|
||||
|
||||
|
@ -21,7 +21,7 @@ export async function startServersCli(defaultConfigPath) {
|
|||
}
|
||||
|
||||
try {
|
||||
await startServers(config, { log, installDir });
|
||||
await startServers(config, { log });
|
||||
} catch (err) {
|
||||
log.error('FATAL ERROR');
|
||||
log.error(err);
|
||||
|
@ -50,7 +50,6 @@ function processArgv(defaultConfigPath) {
|
|||
return {
|
||||
config,
|
||||
log,
|
||||
installDir: options.kibanaInstallDir,
|
||||
help: options.help,
|
||||
rest: options._,
|
||||
};
|
||||
|
@ -64,9 +63,6 @@ function displayHelp() {
|
|||
Usage: node scripts/functional_tests_server [options]
|
||||
|
||||
--config Option to pass in a config
|
||||
--kibana-install-dir
|
||||
Run Kibana from an existing install directory
|
||||
Default: run from source
|
||||
--help Display this menu and exit
|
||||
|
||||
Log level options:
|
||||
|
|
|
@ -1,37 +1,17 @@
|
|||
import { resolve } from 'path';
|
||||
import { KIBANA_ROOT, KIBANA_EXEC, KIBANA_EXEC_PATH } from './paths';
|
||||
|
||||
export async function runKibanaServer({ procs, config, options }) {
|
||||
const { installDir } = options;
|
||||
export async function runKibanaServer({ procs, config }) {
|
||||
const cliArgs = config.get('kibanaServerArgs') || [];
|
||||
|
||||
// start the kibana server and wait for it to log "Server running" before resolving
|
||||
await procs.run('kibana', {
|
||||
cmd: getKibanaCmd(installDir),
|
||||
args: getCliArgs(config, installDir),
|
||||
cmd: KIBANA_EXEC,
|
||||
args: [KIBANA_EXEC_PATH, ...cliArgs],
|
||||
env: {
|
||||
FORCE_COLOR: 1,
|
||||
...process.env,
|
||||
},
|
||||
cwd: installDir || KIBANA_ROOT,
|
||||
cwd: KIBANA_ROOT,
|
||||
wait: /Server running/,
|
||||
});
|
||||
}
|
||||
|
||||
function getKibanaCmd(installDir) {
|
||||
if (installDir) {
|
||||
return process.platform.startsWith('win')
|
||||
? resolve(installDir, 'bin/kibana.bat')
|
||||
: resolve(installDir, 'bin/kibana');
|
||||
}
|
||||
|
||||
return KIBANA_EXEC;
|
||||
}
|
||||
|
||||
function getCliArgs(config, installDir) {
|
||||
const buildArgs = config.get('kbnTestServer.buildArgs') || [];
|
||||
const sourceArgs = config.get('kbnTestServer.sourceArgs') || [];
|
||||
const serverArgs = config.get('kbnTestServer.serverArgs') || [];
|
||||
|
||||
return installDir
|
||||
? [...serverArgs, ...buildArgs]
|
||||
: [KIBANA_EXEC_PATH, ...serverArgs, ...sourceArgs];
|
||||
}
|
||||
|
|
|
@ -22,36 +22,29 @@ in another terminal session by running this command from this directory:
|
|||
|
||||
/**
|
||||
* Run servers and tests for each config
|
||||
* @param {string[]} configPaths Array of paths to configs
|
||||
* @param {object} options Optional
|
||||
* @param {Log} options.log Optional logger
|
||||
* @param {string} options.installDir Optional installation dir
|
||||
* from which to run Kibana
|
||||
* @param {boolean} options.bail Whether to exit test run at the first failure
|
||||
* @param {string[]} configPaths Array of paths to configs
|
||||
* @param {boolean} bail Whether to exit test run at the first failure
|
||||
* @param {Log} log Optional logger
|
||||
*/
|
||||
export async function runTests(configPaths, options) {
|
||||
export async function runTests(configPaths, { bail, log }) {
|
||||
for (const configPath of configPaths) {
|
||||
await runSingleConfig(resolve(process.cwd(), configPath), options);
|
||||
await runSingleConfig(resolve(process.cwd(), configPath), { bail, log });
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Start only servers using single config
|
||||
* @param {string} configPath Path to a config file
|
||||
* @param {object} options Optional
|
||||
* @param {Log} options.log Optional logger
|
||||
* @param {string} options.installDir Optional installation dir
|
||||
* from which to run Kibana
|
||||
* @param {string} configPath Path to a config file
|
||||
* @param {Log} log Optional logger
|
||||
*/
|
||||
export async function startServers(configPath, options) {
|
||||
const { log } = options;
|
||||
export async function startServers(configPath, { log }) {
|
||||
configPath = resolve(process.cwd(), configPath);
|
||||
|
||||
await withProcRunner(log, async procs => {
|
||||
const config = await readConfigFile(log, configPath);
|
||||
|
||||
const es = await runElasticsearch({ config, log });
|
||||
await runKibanaServer({ procs, config, options });
|
||||
await runKibanaServer({ procs, config, log });
|
||||
|
||||
// wait for 5 seconds of silence before logging the
|
||||
// success message so that it doesn't get buried
|
||||
|
@ -74,14 +67,12 @@ async function silence(milliseconds, { log }) {
|
|||
/*
|
||||
* Start servers and run tests for single config
|
||||
*/
|
||||
async function runSingleConfig(configPath, options) {
|
||||
const { bail, log } = options;
|
||||
|
||||
async function runSingleConfig(configPath, { bail, log }) {
|
||||
await withProcRunner(log, async procs => {
|
||||
const config = await readConfigFile(log, configPath);
|
||||
|
||||
const es = await runElasticsearch({ config, log });
|
||||
await runKibanaServer({ procs, config, options });
|
||||
await runKibanaServer({ procs, config });
|
||||
|
||||
// Note: When solving how to incorporate functional_test_runner
|
||||
// clean this up
|
||||
|
|
|
@ -94,11 +94,7 @@ export const schema = Joi.object().keys({
|
|||
serverArgs: Joi.array(),
|
||||
}).default(),
|
||||
|
||||
kbnTestServer: Joi.object().keys({
|
||||
buildArgs: Joi.array(),
|
||||
sourceArgs: Joi.array(),
|
||||
serverArgs: Joi.array(),
|
||||
}).default(),
|
||||
kibanaServerArgs: Joi.array(),
|
||||
|
||||
// env allows generic data, but should be removed
|
||||
env: Joi.object().default(),
|
||||
|
|
|
@ -26,14 +26,11 @@ export default async function ({ readConfigFile }) {
|
|||
},
|
||||
env: commonConfig.get('env'),
|
||||
esTestCluster: commonConfig.get('esTestCluster'),
|
||||
kbnTestServer: {
|
||||
...functionalConfig.get('kbnTestServer'),
|
||||
serverArgs: [
|
||||
...functionalConfig.get('kbnTestServer.serverArgs'),
|
||||
'--optimize.enabled=false',
|
||||
'--elasticsearch.healthCheck.delay=3600000',
|
||||
'--server.xsrf.disableProtection=true',
|
||||
],
|
||||
},
|
||||
kibanaServerArgs: [
|
||||
...functionalConfig.get('kibanaServerArgs'),
|
||||
'--optimize.enabled=false',
|
||||
'--elasticsearch.healthCheck.delay=3600000',
|
||||
'--server.xsrf.disableProtection=true',
|
||||
],
|
||||
};
|
||||
}
|
||||
|
|
|
@ -23,25 +23,20 @@ export default function () {
|
|||
],
|
||||
},
|
||||
|
||||
kbnTestServer: {
|
||||
buildArgs: [ '--optimize.useBundleCache=true' ],
|
||||
sourceArgs: [
|
||||
'--no-base-path',
|
||||
`--optimize.bundleDir=${OPTIMIZE_BUNDLE_DIR}`,
|
||||
],
|
||||
serverArgs: [
|
||||
'--env=development',
|
||||
'--logging.json=false',
|
||||
`--server.port=${kbnTestConfig.getPort()}`,
|
||||
`--optimize.watchPort=${kbnTestConfig.getPort()}`,
|
||||
'--optimize.watchPrebuild=true',
|
||||
'--status.allowAnonymous=true',
|
||||
'--optimize.enabled=true',
|
||||
`--elasticsearch.url=${formatUrl(servers.elasticsearch)}`,
|
||||
`--elasticsearch.username=${servers.elasticsearch.username}`,
|
||||
`--elasticsearch.password=${servers.elasticsearch.password}`,
|
||||
],
|
||||
},
|
||||
kibanaServerArgs: [
|
||||
'--env=development',
|
||||
'--logging.json=false',
|
||||
'--no-base-path',
|
||||
`--server.port=${kbnTestConfig.getPort()}`,
|
||||
`--optimize.watchPort=${kbnTestConfig.getPort()}`,
|
||||
'--optimize.watchPrebuild=true',
|
||||
'--status.allowAnonymous=true',
|
||||
'--optimize.enabled=true',
|
||||
`--optimize.bundleDir=${OPTIMIZE_BUNDLE_DIR}`,
|
||||
`--elasticsearch.url=${formatUrl(servers.elasticsearch)}`,
|
||||
`--elasticsearch.username=${servers.elasticsearch.username}`,
|
||||
`--elasticsearch.password=${servers.elasticsearch.password}`,
|
||||
],
|
||||
|
||||
services: {
|
||||
kibanaServer: KibanaServerProvider,
|
||||
|
|
|
@ -87,13 +87,10 @@ export default async function ({ readConfigFile }) {
|
|||
|
||||
esTestCluster: commonConfig.get('esTestCluster'),
|
||||
|
||||
kbnTestServer: {
|
||||
...commonConfig.get('kbnTestServer'),
|
||||
serverArgs: [
|
||||
...commonConfig.get('kbnTestServer.serverArgs'),
|
||||
'--oss',
|
||||
],
|
||||
},
|
||||
kibanaServerArgs: [
|
||||
...commonConfig.get('kibanaServerArgs'),
|
||||
'--oss',
|
||||
],
|
||||
|
||||
apps: {
|
||||
status_page: {
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
:blog-ref: https://www.elastic.co/blog/
|
||||
:wikipedia: https://en.wikipedia.org/wiki
|
||||
|
||||
include::{kib-repo-dir}/index-shared1.asciidoc[]
|
||||
|
||||
include::setup/installing.asciidoc[]
|
||||
|
||||
include::setup/setup-xkb.asciidoc[]
|
||||
|
||||
include::{kib-repo-dir}/index-shared2.asciidoc[]
|
||||
|
||||
include::{kib-repo-dir}/index-shared3.asciidoc[]
|
||||
|
||||
include::ml/index.asciidoc[]
|
||||
|
||||
include::apm/index.asciidoc[]
|
||||
|
||||
include::graph/index.asciidoc[]
|
||||
|
||||
include::{kib-repo-dir}/index-shared4.asciidoc[]
|
||||
|
||||
include::searchprofiler/index.asciidoc[]
|
||||
|
||||
include::grokdebugger/index.asciidoc[]
|
||||
|
||||
include::monitoring/index.asciidoc[]
|
||||
|
||||
include::{kib-repo-dir}/index-shared5.asciidoc[]
|
||||
|
||||
include::security/index.asciidoc[]
|
||||
|
||||
include::management/watcher-ui/index.asciidoc[]
|
||||
|
||||
include::upgrade-assistant/index.asciidoc[]
|
||||
|
||||
include::dashboard_only_mode/index.asciidoc[]
|
||||
|
||||
include::reporting/index.asciidoc[]
|
||||
|
||||
include::{kib-repo-dir}/index-shared6.asciidoc[]
|
|
@ -25,6 +25,3 @@ other {xpack} features are mentioned in this documentation, we've added an icon
|
|||
to clearly indicate that what you're reading pertains to features available only
|
||||
in {xpack}.
|
||||
|
||||
include::{xkb-repo-dir}/monitoring/monitoring-xkib.asciidoc[]
|
||||
include::{xkb-repo-dir}/security/securing-kibana.asciidoc[]
|
||||
include::{xkb-repo-dir}/settings/settings-xkb.asciidoc[]
|
||||
|
|
|
@ -28,7 +28,7 @@ export default async function ({ readConfigFile }) {
|
|||
reportName: 'X-Pack API Integration Tests',
|
||||
},
|
||||
env: xPackFunctionalTestsConfig.get('env'),
|
||||
kbnTestServer: xPackFunctionalTestsConfig.get('kbnTestServer'),
|
||||
kibanaServerArgs: xPackFunctionalTestsConfig.get('kibanaServerArgs'),
|
||||
esTestCluster: xPackFunctionalTestsConfig.get('esTestCluster'),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -157,18 +157,15 @@ export default async function ({ readConfigFile }) {
|
|||
],
|
||||
},
|
||||
|
||||
kbnTestServer: {
|
||||
...kibanaCommonConfig.get('kbnTestServer'),
|
||||
serverArgs: [
|
||||
...kibanaCommonConfig.get('kbnTestServer.serverArgs'),
|
||||
`--server.uuid=${env.kibana.server.uuid}`,
|
||||
`--server.port=${servers.kibana.port}`,
|
||||
`--elasticsearch.url=${formatUrl(servers.elasticsearch)}`,
|
||||
'--xpack.monitoring.kibana.collection.enabled=false',
|
||||
'--xpack.xpack_main.telemetry.enabled=false',
|
||||
'--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions
|
||||
],
|
||||
},
|
||||
kibanaServerArgs: [
|
||||
...kibanaCommonConfig.get('kibanaServerArgs'),
|
||||
`--server.uuid=${env.kibana.server.uuid}`,
|
||||
`--server.port=${servers.kibana.port}`,
|
||||
`--elasticsearch.url=${formatUrl(servers.elasticsearch)}`,
|
||||
'--xpack.monitoring.kibana.collection.enabled=false',
|
||||
'--xpack.xpack_main.telemetry.enabled=false',
|
||||
'--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions
|
||||
],
|
||||
|
||||
// the apps section defines the urls that
|
||||
// `PageObjects.common.navigateTo(appKey)` will use.
|
||||
|
|
|
@ -42,14 +42,11 @@ export default async function ({ readConfigFile }) {
|
|||
],
|
||||
},
|
||||
|
||||
kbnTestServer: {
|
||||
...xPackAPITestsConfig.get('kbnTestServer'),
|
||||
serverArgs: [
|
||||
...xPackAPITestsConfig.get('kbnTestServer.serverArgs'),
|
||||
'--optimize.enabled=false',
|
||||
'--server.xsrf.whitelist=[\"/api/security/v1/saml\"]',
|
||||
'--xpack.security.authProviders=[\"saml\"]',
|
||||
],
|
||||
},
|
||||
kibanaServerArgs: [
|
||||
...xPackAPITestsConfig.get('kibanaServerArgs'),
|
||||
'--optimize.enabled=false',
|
||||
'--server.xsrf.whitelist=[\"/api/security/v1/saml\"]',
|
||||
'--xpack.security.authProviders=[\"saml\"]',
|
||||
],
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue