kibana/packages/kbn-es
Kibana Machine 7f5cd8ece6
[ci-stats] Collects additional timings for cli tools (#113030) (#113908)
* [ci-stats] Collects additional metrics about bootstrap

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* test reporting

* [ci-stats] Collects additional metrics about bootstrap

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Move ts timing to build_ts_refs_cli script

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Add timings to run

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* info debug level

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* fix build

* Move report function to dev-utils
align name of tests
report from functional test runner

* report snapshot install \ ready times
fix event names

* Report memory usage and branch hash

* fix eslint

* fix integration test

* build

* mergy merge

* mergy merge 2

* eslint

* eslint

* ready events

* Update packages/kbn-es/src/cli_commands/snapshot.js

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update packages/kbn-es/src/cluster.js

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update packages/kbn-es/src/cli_commands/snapshot.js

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update packages/kbn-test/src/functional_tests/cli/start_servers/cli.js

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update src/dev/run_check_published_api_changes.ts

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update packages/kbn-test/src/jest/run.ts

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update src/dev/run_i18n_check.ts

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update packages/kbn-test/src/functional_test_runner/cli.ts

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* code review

* pm

* merge

* dist

* jest fix

Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

Co-authored-by: Liza Katz <lizka.k@gmail.com>
Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>
2021-10-05 08:25:32 -04:00
..
src
BUILD.bazel
jest.config.js
package.json
README.md
tsconfig.json

@kbn/es

A command line utility for running elasticsearch from source or archive.

Getting started

If running elasticsearch from source, elasticsearch needs to be cloned to a sibling directory of Kibana.

To run, go to the Kibana root and run node scripts/es --help to get the latest command line options.

The script attempts to preserve the existing interfaces used by Elasticsearch CLI. This includes passing through options with the -E argument and the ES_JAVA_OPTS environment variable for Java options.

Examples

Run a snapshot install with a trial license

node scripts/es snapshot --license=trial

Run from source with a configured data directory

node scripts/es source --Epath.data=/home/me/es_data

API

run

Start a cluster

var es = require('@kbn/es');
es.run({
  license: 'basic',
  version: 7.0,
})
.catch(function (e) {
  console.error(e);
  process.exitCode = 1;
});

Options

options.license

Type: String

License type, one of: trial, basic, gold, platinum

options.version

Type: String

Desired elasticsearch version

options['source-path']

Type: String

Cloned location of elasticsearch repository, used when running from source

options['base-path']

Type: String

Location where snapshots are cached