elastic / elastic-package

elastic-package - Command line tool for developing Elastic Integrations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Idea] Support explicit installation of package from the registry

jsoriano opened this issue · comments

Add support in elastic-package install to install a package from the registry without requiring a working copy of the package.

It would require to add some flag for this. An option would be to do the same as in benchmarks, with the --package-from-registry flag, that would receive a <package>-<version> and would use it to install it from the registry, maybe we could also support --package-from-registry <package>, that would install the latest version available in the registry.
Another option could be to add two flags, --package and --version, but this would be less explicit and we would need to check how it behaves with other flags.

If we want to support installing packages from custom packages registries, we would need another flag or environment variable with the address to use. In this case elastic-package would need to download the zip and install it using the upload API.

The use case would be to prepare environments while testing other packages or other individual assets.

Request comes from a discussion with @philippkahr and @ruflin.

Can you define the package registry with your own hosted EPR or will it only pull from epr.elastic.co?

Can you define the package registry with your own hosted EPR or will it only pull from epr.elastic.co?

If we want to support installing from custom package registries we would probably need to download the zip from this registry, and then install the zip. This is indeed a possible option.

Is this something you would need?

definitely, in a lot of customer environments they are airgapped and don't have access to epr.elastic.co. Therefore either specifying the url using an environment variable like: package_registry_url: my.custom.epr.com should do the trick? then we can leave the flag with --package-from-registry?

Yep, makes sense, added a line about this in the description.