diff options
author | Spencer <spalger@users.noreply.github.com> | 2017-03-27 12:29:14 -0700 |
---|---|---|
committer | Court Ewing <court@epixa.com> | 2017-03-27 15:29:14 -0400 |
commit | e67790037a4894167947d35f3ce9deddd6ae973e (patch) | |
tree | 6df8d342336e141ea5776d9d3fd9e9cf7f5a476d /scripts | |
parent | 75acbb006347f50fb4c43597b393987238223df4 (diff) |
[esArchiver] combine elasticDump and ScenarioManager (#10359)
* As a part of bringing functional testing to plugins, esArchiver gives these plugins a way to capture and reload es indexes without needing to write a bunch of custom code. It works similarly to the elasticDump and ScenarioManager tools that it replaces.
Differences:
- Streaming implementation allows for much larger archives
- CLI for creating and using archives
- Configurable archive location
- Stores the data in gzipped files (better for source control, searching, large archives)
- Automatically identifies and upgrades Kibana config documents
Methods:
- `#load(name)`: import an archive
- `#loadIfNeeded(name)`: import an archive, but skip the documents what belong to any existing index
- `#unload(name)`: delete the indexes stored in an archive
CLI operations:
- `./bin/es_archiver save <name> [index patterns...]`: save the mapping and documents in one or more indexes that match the wild-card patterns into an the `<name>` archive
- `./bin/es_archiver load <name>`: load the mapping and documents from the `<name>` archive
* [functional_tests/common/nagivate] check for statusPage
* [es_archiver] move bins into new scripts dir
* [functional_tests/apps/context] use esArchiver
* [esArchiver] general improvements after showing to a few folks
- remove auto-upgrading config doc logic (until we have better access to kibana version info)
- export unload command
- remove preemptive checks in favor of reacting to errors
- use type "doc" vs "hit" for doc records (consistency)
- wrote a bunch of pending tests to think though and plan
* [esArchiver] make log a stream that writes to itself
* [esArchiver] fill in stats and archive format tests
* [esArchiver] splitup action logic
* [esArchiver/cli] fix cli --help output and comment
* [esArchiver] remove type-based param coercion
* [esArchiver/log] use strings for log levels
* [esArchvier] remove unused var
* [esArchiver/indexDocRecordsStream] add tests
* [esArchive] fill in remaining tests
* [esArchiver] fix dem tests
* [eslint] remove unused vars
* [esArchiver/loadIfNeeded] fix call to load()
* [esArchiver] remove loadDumpData helpers
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/README.md | 16 | ||||
-rwxr-xr-x | scripts/es_archiver.js | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 000000000..450ee6679 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,16 @@ +# kibana dev scripts + +This directory contains scripts useful for interacting with Kibana tools in development. Use the node executable and `--help` flag to learn about how they work: + +```sh +node scripts/{{script name}} --help +``` + +## for developers + +This directory is excluded from the build and tools within it should help users discover their capabilities. Each script in this directory must: + +- include the `../src/optimize/babel/register` module to bootstrap babel +- call out to source code that is in the `src` directory +- react to the `--help` flag +- run everywhere OR check and fail fast when a required OS or toolchain is not available
\ No newline at end of file diff --git a/scripts/es_archiver.js b/scripts/es_archiver.js new file mode 100755 index 000000000..dd17a90e2 --- /dev/null +++ b/scripts/es_archiver.js @@ -0,0 +1,2 @@ +require('../src/optimize/babel/register'); +require('../src/es_archiver/cli'); |