Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-compile and host native plugins on artifacts.opensearch.org #86

Closed
Tracked by #564
bbarani opened this issue Jul 12, 2021 · 10 comments
Closed
Tracked by #564

Pre-compile and host native plugins on artifacts.opensearch.org #86

bbarani opened this issue Jul 12, 2021 · 10 comments
Assignees
Labels
enhancement New Enhancement v1.1.0

Comments

@bbarani
Copy link
Member

bbarani commented Jul 12, 2021

Is your feature request related to a problem? Please describe.
Users are finding it hard to install the native plugins as they are not readily available to download when running sh opensearch-plugin install command

Describe the solution you'd like
All the internal plugins under /OpenSearch/tree/main/plugins are pre-compiled and hosted on https://artifacts.opensearch.org/releases/plugins/* directory

Describe alternatives you've considered
Manually building the plugins on local and making changes to point the install script to use the local version
opensearch-project/OpenSearch#951 (comment)

Reference:
opensearch-project/OpenSearch#951

@peterzhuamazon
Copy link
Member

@mch2

Run the command in both snapshots and releases version of min shows 2 different behaviors:

# Snapshots
$ ./opensearch-plugin install repository-s3
-> Installing repository-s3
-> Failed installing repository-s3
-> Rolling back repository-s3
-> Rolled back repository-s3
ERROR: attempted to install release build of official plugin on snapshot build of OpenSearch

# Releases
$ ./opensearch-plugin install repository-s3
-> Installing repository-s3
-> Downloading repository-s3 from opensearch
-> Failed installing repository-s3
-> Rolling back repository-s3
-> Rolled back repository-s3
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: https://artifacts.opensearch.org/releases/plugins/repository-s3/1.0.0/repository-s3-1.0.0.zip
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1932)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1528)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
	at org.opensearch.plugins.InstallPluginCommand.downloadZip(InstallPluginCommand.java:438)
	at org.opensearch.plugins.InstallPluginCommand.downloadAndValidate(InstallPluginCommand.java:515)
	at org.opensearch.plugins.InstallPluginCommand.download(InstallPluginCommand.java:306)
	at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:260)
	at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:237)
	at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:99)
	at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:140)
	at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
	at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:140)
	at org.opensearch.cli.Command.main(Command.java:103)
	at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)

@peterzhuamazon peterzhuamazon self-assigned this Jul 21, 2021
@peterzhuamazon
Copy link
Member

peterzhuamazon commented Jul 21, 2021

Related issues during release of these artifacts:
opensearch-project/OpenSearch#996

@pkalliok-aiven
Copy link

pkalliok-aiven commented Jul 26, 2021

We are also very much looking for mapper-size and analysis plugins. Is there any way to install them currently? Just build from source?

@tlfeng
Copy link
Contributor

tlfeng commented Jul 30, 2021

We are also very much looking for mapper-size and analysis plugins. Is there any way to install them currently? Just build from source?

Hi @pkalliok-aiven I think currently the the artifacts of the native plugins exist in artifacts.opensearch.org, but there is an issue when installing a plugin with its name (mentioned in issue opensearch-project/OpenSearch#996).
However, you could install by the URL, for example:
./opensearch-plugin install https://artifacts.opensearch.org/releases/plugins/mapper-size/1.0.0/mapper-size-1.0.0.zip

@peterzhuamazon peterzhuamazon removed their assignment Aug 19, 2021
@bbarani bbarani added the v1.1.0 label Aug 19, 2021
@AmiStrn
Copy link

AmiStrn commented Aug 23, 2021

It would be great to have a fix for this backported as far as possible. since some users would not be able to move to v1.0.0 without this fixed (therefore it would be a major breaking change between Elasticsearch and OpenSearch).
Additionally, those that are already using the workaround would benefit from this as they could avoid the pains of upgrading if they are not interested in v1.1.0 yet.

@peterzhuamazon
Copy link
Member

We have fixed the issue in opensearch-project/OpenSearch#1233.
Native plugin for 1.1.0 will be available once 1.1.0 release.
Thanks

@peterzhuamazon
Copy link
Member

native-plugins-1.1.0.log

@peterzhuamazon
Copy link
Member

Push to candidate channel and did a test on repository-s3, which works:

$ ./opensearch-plugin install repository-s3
-> Installing repository-s3
-> Downloading repository-s3 from opensearch
[=================================================] 100%
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission getClassLoader
* java.lang.reflect.ReflectPermission suppressAccessChecks
* java.net.SocketPermission * connect,resolve
* java.util.PropertyPermission opensearch.allow_insecure_settings read,write
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.

Continue with installation? [y/N]y
-> Installed repository-s3 with folder name repository-s3

$ ll ../plugins/ | grep repository-s3
drwxr-xr-x 2 opensearch opensearch 4096 Oct  1 21:06 repository-s3

@peterzhuamazon
Copy link
Member

The build is completed for now.
We will use #686 to track the release of native plugins in 1.1.0.

@peterzhuamazon
Copy link
Member

1.1.0 Native Plugins released for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New Enhancement v1.1.0
Projects
None yet
Development

No branches or pull requests

6 participants