{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/kibana/issues/17168","repository_url":"https://api.github.com/repos/elastic/kibana","labels_url":"https://api.github.com/repos/elastic/kibana/issues/17168/labels{/name}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/17168/comments","events_url":"https://api.github.com/repos/elastic/kibana/issues/17168/events","html_url":"https://github.com/elastic/kibana/pull/17168","id":305427817,"number":17168,"title":"[kbn-es] Package for managing Elasticsearch during dev and testing","user":{"login":"tylersmalley","id":40265,"avatar_url":"https://avatars2.githubusercontent.com/u/40265?v=4","gravatar_id":"","url":"https://api.github.com/users/tylersmalley","html_url":"https://github.com/tylersmalley","followers_url":"https://api.github.com/users/tylersmalley/followers","following_url":"https://api.github.com/users/tylersmalley/following{/other_user}","gists_url":"https://api.github.com/users/tylersmalley/gists{/gist_id}","starred_url":"https://api.github.com/users/tylersmalley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylersmalley/subscriptions","organizations_url":"https://api.github.com/users/tylersmalley/orgs","repos_url":"https://api.github.com/users/tylersmalley/repos","events_url":"https://api.github.com/users/tylersmalley/events{/privacy}","received_events_url":"https://api.github.com/users/tylersmalley/received_events","type":"User","site_admin":false},"labels":[{"id":470241342,"url":"https://api.github.com/repos/elastic/kibana/labels/:Operations","name":":Operations","color":"fef2c0","default":false},{"id":135307740,"url":"https://api.github.com/repos/elastic/kibana/labels/review","name":"review","color":"0052cc","default":false},{"id":810298373,"url":"https://api.github.com/repos/elastic/kibana/labels/v6.3.0","name":"v6.3.0","color":"ffffff","default":false},{"id":654061976,"url":"https://api.github.com/repos/elastic/kibana/labels/v7.0.0","name":"v7.0.0","color":"ffffff","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-15T06:15:23Z","updated_at":"2018-03-19T18:06:40Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/17168","html_url":"https://github.com/elastic/kibana/pull/17168","diff_url":"https://github.com/elastic/kibana/pull/17168.diff","patch_url":"https://github.com/elastic/kibana/pull/17168.patch"},"body":"_kbn-es_ aims to simplify running Elasticsearch for development purposes while expanding its capabilities. \r\n\r\nThere are three main commands exposed:\r\n\r\n## Run from a snapshot\r\n\r\nDownloads and runs from our nightly snapshots. The snapshots are cached while utilizing etags to prevent unnecessary downloads. The version defaults to the version represented in Kibana's `package.json`. Any Elasticsearch configuration option can be passed, just like running directly, with `-E`. If an absolute path to a file is provided, we will copy the file to the install paths config directory and update its reference. This is particularly useful for things like SSL files as Java security requires them to be within the installation directory.\r\n\r\nOne primary difference this has from `yarn elasticsearch` is that the data is not persisted by default. Should you prefer to persist the data you can set the data path `-E path.data=../data`. For relative paths, they are from the perspective of the Elasticsearch installation directory. If the general consensus is that data should be persisted by default, we can re-visit this.\r\n\r\n```\r\nusage: es snapshot [<args>]\r\n\r\nDownloads and run from a nightly snapshot\r\n\r\nOptions:\r\n\r\n   --version       Version of ES to download [default: 7.0.0-alpha1]\r\n   --base-path     Path containing cache/installations [default: /Users/tyler/elastic/kibana/.es]\r\n   --install-path  Installation path, defaults to 'source' within base-path\r\n   -E              Additional key=value settings to pass to Elasticsearch\r\n\r\n Example:\r\n\r\n   es snapshot --version 5.6.8 -E cluster.name=test -E path.data=/tmp/es-data\r\n```\r\n\r\n## Run from source\r\n\r\nSimilar to snapshots, but running from source. By default, the source directory is named `elasticsearch` as a sibling of Kibana, however, this can be configured. We hash the current state of the elasticsearch repository and we will not re-build unless necessary.\r\n\r\n```\r\nusage: es source [<args>]\r\n\r\nBuild and run from source\r\n\r\nOptions:\r\n\r\n   --source-path   Path to ES source [default: /Users/tyler/elastic/elasticsearch]\r\n   --base-path     Path containing cache/installations [default: /Users/tyler/elastic/kibana/.es]\r\n   --install-path  Installation path, defaults to 'source' within base-path\r\n   -E              Additional key=value settings to pass to Elasticsearch\r\n\r\n Example:\r\n\r\n   es snapshot --source-path=../elasticsearch -E cluster.name=test -E path.data=/tmp/es-data\r\n```\r\n\r\n## Run from an archive\r\n\r\nSimilar to above, but providing a local path to a tar distribution of Elasticsearch.\r\n\r\n```\r\nusage: es archive <path> [<args>]\r\n\r\nInstall and run from an Elasticsearch tar\r\n\r\nOptions:\r\n\r\n   --base-path     Path containing cache/installations [default: /Users/tyler/elastic/kibana/.es]\r\n   --install-path  Installation path, defaults to 'source' within base-path\r\n   -E              Additional key=value settings to pass to Elasticsearch\r\n\r\n Example:\r\n\r\n   es archive ../elasticsearch.tar.gz -E cluster.name=test -E path.data=/tmp/es-data\r\n```\r\n\r\n`yarn es --help` for more information\r\n\r\n## TODO:\r\n\r\n- [x] Ability to pass an instance of log to Cluster.\r\n- [x] Update source cache filename to be a hash of the `sourcePath + branch`\r\n- [x] Add latest commit SHA to source status hashing\r\n- [x] Feedback for removal of `yarn elasticsearch`\r\n- [x] Investigate passing defaults to run, rather than overriding argv.\r\n- [x] Dynamic defaults in help text.\r\n- [x] Windows testing\r\n- [x] Handle errors in scripts/es\r\n- [x] Output ES build information\r\n- [x] Include file modified times in hash calculation for source\r\n\r\nProof! \r\n![screenshot 2018-03-16 20 05 55](https://user-images.githubusercontent.com/40265/37551218-e480898c-2958-11e8-9102-c6535ad035fd.png)\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/kibana/issues/comments/374310505","html_url":"https://github.com/elastic/kibana/pull/17168#issuecomment-374310505","issue_url":"https://api.github.com/repos/elastic/kibana/issues/17168","id":374310505,"user":{"login":"tylersmalley","id":40265,"avatar_url":"https://avatars2.githubusercontent.com/u/40265?v=4","gravatar_id":"","url":"https://api.github.com/users/tylersmalley","html_url":"https://github.com/tylersmalley","followers_url":"https://api.github.com/users/tylersmalley/followers","following_url":"https://api.github.com/users/tylersmalley/following{/other_user}","gists_url":"https://api.github.com/users/tylersmalley/gists{/gist_id}","starred_url":"https://api.github.com/users/tylersmalley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylersmalley/subscriptions","organizations_url":"https://api.github.com/users/tylersmalley/orgs","repos_url":"https://api.github.com/users/tylersmalley/repos","events_url":"https://api.github.com/users/tylersmalley/events{/privacy}","received_events_url":"https://api.github.com/users/tylersmalley/received_events","type":"User","site_admin":false},"created_at":"2018-03-19T18:06:40Z","updated_at":"2018-03-19T18:06:40Z","author_association":"MEMBER","body":"jenkins, test it"}}
{"actor":{"display_login":"tylersmalley"}}