🔎 Open source distributed and RESTful search engine.
Go to file
Ryan Ernst ef3b954f63 Scripts: Convert template uses to return String instead of BytesReference (elastic/x-pack-elasticsearch#1279)
This is the xpack side of elastic/elasticsearch#24447. The one caveat is
there are a number of places within the xpack api that use
BytesReference to pass down to templates. These are convert to encode
into a BytesArray when necessary, so as not to require changing all of
those apis here at once, but they should all be convert to String as
well.

Original commit: elastic/x-pack-elasticsearch@8399b9d8c3
2017-05-15 22:37:51 -07:00
.github Add issue template 2017-03-19 16:37:21 -04:00
buildSrc Rename x-pack project names to new names with split repo 2017-02-10 11:02:42 -08:00
dev-tools Adjust checkstyle suppressions to 140-column limit 2017-04-30 12:11:37 -04:00
docs [DOCS] Add script_fields to ML data feed documentation (elastic/x-pack-elasticsearch#1372) 2017-05-15 09:30:30 -07:00
license-tools Respond to rename random ASCII helper methods 2017-04-04 11:04:37 -04:00
migrate Add migration script to split xpack (elastic/elasticsearch#4949) 2017-02-10 08:00:51 -08:00
plugin Scripts: Convert template uses to return String instead of BytesReference (elastic/x-pack-elasticsearch#1279) 2017-05-15 22:37:51 -07:00
qa [Security] Cross cluster wildcard security (elastic/x-pack-elasticsearch#1290) 2017-05-15 15:02:13 +10:00
transport-client Rename core plugin and transport dirs 2017-02-10 11:02:42 -08:00
.dir-locals.el Update .dir-locals.el for enforced line length 2016-02-04 14:55:41 -07:00
.gitignore Adding new build files after split 2017-02-10 11:02:42 -08:00
.projectile Add .dir-locals.el and .projectile 2015-10-30 11:16:29 -06:00
GRADLE.CHEATSHEET.asciidoc Fixing grammar in GRADLE.CHEATSHEET 2016-05-18 14:17:13 -04:00
LICENSE.txt Initial X-Pack commit 2018-04-20 14:16:58 -07:00
NOTICE.txt Build: Enable notice generation for x-pack (elastic/x-pack-elasticsearch#695) 2017-03-02 19:06:15 -08:00
README.asciidoc Add instructions for creating Vault Secret ID / GitHub Token (elastic/x-pack-elasticsearch#761) 2017-04-17 19:30:31 -04:00
build.gradle Build: Build 5.x version of xpack for bwc tests to use (elastic/x-pack-elasticsearch#885) 2017-04-07 22:19:30 -07:00
gradle.properties Gradle daemon is a demon 2015-11-25 10:39:08 -05:00
migrate-issues.py Introduce issue migration script 2017-02-09 17:09:30 -05:00
settings.gradle Rename x-pack project names to new names with split repo 2017-02-10 11:02:42 -08:00

README.asciidoc

= Elasticsearch X-Pack

A set of Elastic's commercial plugins for Elasticsearch:

- License
- Security
- Watcher
- Monitoring
- Machine Learning
- Graph

= Setup

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

== Vault Secret

The build requires a Vault Secret ID. You can use a GitHub token by following these steps:

1. Go to https://github.com/settings/tokens
2. Click *Generate new token*
3. Set permissions to `read:org`
4. Copy the token into `~/.elastic/github.token`
5. 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.token
```

If 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 secrets
```

=== Offline Mode

When running the build in offline mode (`--offline`), it will not required to have the vault secret setup.

== Native Code

**This 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: 

https://github.com/elastic/infra/blob/master/docs/vault.md#github-auth

The github token has to be put into ~/.elastic/github.token, while the file rights must be set to 0600. 

= Build

- Run unit tests:
+
[source, txt]
-----
gradle clean test
-----

- Run all tests:
+
[source, txt]
-----
gradle clean check
-----

- Run integration tests:
+
[source, txt]
-----
gradle clean integTest
-----

- Package X-Pack (without running tests)
+
[source, txt]
-----
gradle clean assemble
-----

- Install X-Pack (without running tests)
+
[source, txt]
-----
gradle clean install
-----