CONTRIBUTING: how to build a package#330
Conversation
exekias
left a comment
There was a problem hiding this comment.
This is great, thank you!
Would it make sense to add a note to create an issue per integration explaining every manual change that was needed? That should help us improve the script later
CONTRIBUTING.md
Outdated
| Make sure you don't have any manual changes applied as they will reflect on the integration. | ||
| 2. Clone/refresh the Elastic Package Registry (EPR) to always use the latest version of the script: | ||
| * https://github.com/elastic/package-registry | ||
| 3. Make sure you've the `mage` tool installed. |
There was a problem hiding this comment.
nit: how about adding the command line for this?
There was a problem hiding this comment.
Fixed. Added a one-liner for mage.
| ```bash | ||
| $ cd $GOPATH/src/github.com/elastic/beats/x-pack/elastic-agent | ||
| $ PLATFORMS=darwin mage package | ||
| ``` | ||
|
|
||
| Unpack the distribution you'd like to use (e.g. tar.gz): | ||
| ```bash | ||
| $ cd build/distributions/ | ||
| $ tar xzf elastic-agent-8.0.0-darwin-x86_64.tar.gz | ||
| $ cd elastic-agent-8.0.0-darwin-x86_64/ | ||
| ``` |
There was a problem hiding this comment.
I will take a look and get back to you @exekias
Co-Authored-By: Carlos Pérez-Aradros Herce <exekias@gmail.com>
Co-Authored-By: Carlos Pérez-Aradros Herce <exekias@gmail.com>
Good idea, done. |
|
Thank you @exekias for the approval. I'm looking forward to see comments from other reviewers too. |
ruflin
left a comment
There was a problem hiding this comment.
This is great! Lets get it in and let some other contributors use it and provide feedback if some parts are missing.
@alakahakai you will be interested in this one.
|
|
||
| ### Elements | ||
|
|
||
| Link: https://github.com/elastic/package-registry/blob/master/ASSETS.md |
There was a problem hiding this comment.
I will have to update that with the most recent details one day ;-)
| The directory contains mandatory manifest files defining the integration and its datasets. All manifests have fields | ||
| annotated with comments to better understand their goals. | ||
|
|
||
| _Keep in mind that this package doesn't contain all file resources (images, screenshots, icons) referenced in manifests. |
There was a problem hiding this comment.
Ups, we should add those. I plan to have validation for these in the future.
|
|
||
| 5. Review fields file and exported fields in docs. | ||
|
|
||
| The fields files (`package-fields.yml`, `fields.yml` and `ecs.yml`) in the package were created from original |
There was a problem hiding this comment.
Could you add an additional note here that the sum of all the fields.yml for a dataset should only contain the fields that are really used by the dataset? For example not just have all the ecs fields that exist?
| 5. Start Kibana with enabled Ingest Manager: | ||
|
|
||
| ```bash | ||
| $ yarn start --xpack.ingestManager.enabled=true --xpack.ingestManager.epm.enabled=true --xpack.ingestManager.fleet.enabled=true --xpack.ingestManager.epm.registryUrl=http://localhost:8080/ |
There was a problem hiding this comment.
Most users new to KB will forget to run yarn kbn bootstrap ;-)
This PR updates CONTRIBUTING docs with description on how to build/migrate an integration.
Preview: https://github.com/mtojek/package-registry/blob/how-to-build-package/CONTRIBUTING.md
I will mention few reviewers to verify if all steps are correct (agent, Kibana, etc.)
Issue: #220