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

Future proof install scripts by passing platform and architecture through. #831

Merged
merged 1 commit into from
Oct 29, 2021

Conversation

dblock
Copy link
Member

@dblock dblock commented Oct 28, 2021

Signed-off-by: dblock dblock@amazon.com

Description

Change the arguments for install scripts to include platform and architecture before we spread them in repos.

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…ough.

Signed-off-by: dblock <dblock@amazon.com>
@dblock
Copy link
Member Author

dblock commented Oct 28, 2021

@jmazanec15

@dblock dblock mentioned this pull request Oct 28, 2021
1 task
@jmazanec15
Copy link
Member

@dblock With opensearch-project/opensearch-plugins#91, eventually all plugin artifacts should have the same layout based on the standard and they should be able to use the same install script. That being said, does it make sense to move install scripts out of this repo at the time being, given that when it is standardized, only one install script will be needed for all plugins?

I was looking into why install script_finder does not look in Git repos for scripts and the reason seems to be that build takes a dependency on the components' git repo to build the artifacts, while assemble takes a dependency on the artifacts. I do not believe it will be a trivial change to add components' git repos as dependencies for assemble workflow.

@dblock
Copy link
Member Author

dblock commented Oct 28, 2021

I was looking into why install script_finder does not look in Git repos for scripts and the reason seems to be that build takes a dependency on the components' git repo to build the artifacts, while assemble takes a dependency on the artifacts. I do not believe it will be a trivial change to add components' git repos as dependencies for assemble workflow.

Oh you're absolutely right, now I remember.

I am OK if you just hack this install script with some if statements or whatever you want to do to work around the problem for now.

Or, we could maybe build something slightly more generic? What if build produced an "install" folder along with "libs", "dist", "maven", etc.? Then copy everything from "install" into the distribution as default post-install?

@jmazanec15
Copy link
Member

Then copy everything from "install" into the distribution as default post-install?

What would be in the install folder and why would it need to be in the distribution?

@dblock
Copy link
Member Author

dblock commented Oct 28, 2021

Then copy everything from "install" into the distribution as default post-install?

What would be in the install folder and why would it need to be in the distribution?

  1. k-nn now places libs/libknn.so into plugins/opensearch-knn/knnlib -> k-nn builds install/plugins/opensearch-knn/knnlib/libknn.so
  2. build places scripts/legacy/tar/linux/opensearch-tar-install.sh as post-install, instead it could include it as post-build of OpenSearch and place it into install/opensearch-install.sh for *nix and install\opensearch-install.bat for windows.

@dblock
Copy link
Member Author

dblock commented Oct 29, 2021

I do think we should still merge this as it aligns the arguments between build and install scripts.

Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets move forward, we can always revert/rewrite if we come up with a better solution

@dblock dblock merged commit e35513e into opensearch-project:main Oct 29, 2021
@dblock dblock deleted the future-proof-install-scripts branch October 29, 2021 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants