A set of Elastic’s commercial plugins for Elasticsearch:
-
License
-
Security
-
Watcher
-
Monitoring
-
Machine Learning
-
Graph
You must checkout x-pack-elasticsearch and elasticsearch with a specific directory structure. The elasticsearch checkout will be used when building x-pack-elasticsearch. The structure is:
-
/path/to/elastic/elasticsearch
-
/path/to/elastic/elasticsearch-extra/x-pack-elasticsearch
The build requires a Vault Secret ID. You can use a GitHub token by following these steps:
-
Click Generate new token
-
Set permissions to
read:org -
Copy the token into
~/.elastic/github.token -
Set the token’s file permissions to
600
$ mkdir ~/.elastic $ vi ~/.elastic/github.token # Add your_token exactly as it is into the file and save it $ chmod 600 ~/.elastic/github.tokenIf you do not create the token, then you will see something along the lines of this as the failure when trying to build X-Pack:
* What went wrong: Missing ~/.elastic/github.token file or VAULT_SECRET_ID environment variable, needed to authenticate with vault for secretsThis is mandatory as tests depend on it
Machine Learning requires platform specific binaries, build from https://github.com/elastic/machine-learning-cpp via CI servers.
The native artifacts are stored in S3. To retrieve them infra’s team Vault service is utilized, which requires a github token. Please setup a github token as documented:
The github token has to be put into ~/.elastic/github.token, while the file rights must be set to 0600.
-
Run unit tests:
gradle clean test
-
Run all tests:
gradle clean check
-
Run integration tests:
gradle clean integTest
-
Package X-Pack (without running tests)
gradle clean assemble
-
Install X-Pack (without running tests)
gradle clean install
The source files in this repository can be included in either the X-Pack Reference or the Elasticsearch Reference.
| Note | In 5.5 and later, the Elasticsearch Reference includes X-Pack-specific content when it is built from this repo. |
To build the Elasticsearch Reference on your local machine:
-
Use the
index.asciidocfile in the docs/en directory. -
Specify the location of the
elasticsearch/docsdirectory with the--resourceoption when you runbuild_docs.pl.
For example:
./docs/build_docs.pl --doc elasticsearch-extra/x-pack-elasticsearch/docs/en/index.asciidoc --resource=elasticsearch/docs --chunk 1For information about building the X-Pack Reference, see the README in the x-pack repo.
When you include an image in the documentation, specify the path relative to the location of the asciidoc file. By convention, we put images in an images subdirectory.
For example to insert watcher-ui-edit-watch.png in watcher/limitations.asciidoc:
-
Add an
imagessubdirectory to the watcher directory if it doesn’t already exist. -
In
limitations.asciidocspecify:image::images/watcher-ui-edit-watch.png["Editing a watch"]
Please note that image names and anchor IDs must be unique within the book, so do not use generic identifiers.