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

[Bundle] post-install for min applications #762

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

kavilla
Copy link
Member

@kavilla kavilla commented Oct 19, 2021

Description

Adding install script for OpenSearch and OpenSearch Dashboards so
the bundles include default files.

These files include:

  • opensearch-tar-install.sh
  • config/opensearch_dashboards.yml

However, we did not want to include opensearch-tar-install.sh into
the OpenSearch Dashboards bundle because the script will fail to
execute as it is only expected to be an OpenSearch project.

Previous PR:
#758

Signed-off-by: Kawika Avilla [email protected]

Issues Resolved

#610

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.

@kavilla kavilla linked an issue Oct 19, 2021 that may be closed by this pull request
@kavilla kavilla force-pushed the avillk/install_core branch 2 times, most recently from 7e81e24 to c2248a8 Compare October 19, 2021 08:11
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Nits mostly, otherwise looks good.

scripts/components/OpenSearch-Dashboards/install.sh Outdated Show resolved Hide resolved
src/assemble_workflow/bundle.py Outdated Show resolved Hide resolved
@@ -39,6 +39,12 @@ def __init__(self, build_manifest, artifacts_dir, bundle_recorder):
self.min_tarball_path = self._copy_component(self.min_tarball, "dist")
self.__unpack_min_tarball(self.tmp_dir.name)

def install_core(self):
post_install_script = ScriptFinder.find_install_script(self.min_tarball.name)
Copy link
Member

Choose a reason for hiding this comment

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

To be fair, it's the install_script or just script

Adding install script for OpenSearch and OpenSearch Dashboards so
the bundles include default files.

These files include:
* opensearch-tar-install.sh
* config/opensearch_dashboards.yml

However, we did not want to include opensearch-tar-install.sh into
the OpenSearch Dashboards bundle because the script will fail to
execute as it is only expected to be an OpenSearch project.

Issue resolved:
opensearch-project#610

Signed-off-by: Kawika Avilla <[email protected]>
@kavilla kavilla changed the title [Bundle] post-install for core applications [Bundle] post-install for min applications Oct 19, 2021
@@ -0,0 +1,45 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

I would really prefer that this is python classes rather than shell scripts, its more testable and supports reuse

Copy link
Member

Choose a reason for hiding this comment

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

IMO, it would need to be declarative then, not a custom class that copies a hard-coded .sh script.

Copy link
Member

Choose a reason for hiding this comment

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

Let's unblock this PR though? It's better than what we have IMO.

@peternied peternied merged commit 8af675b into opensearch-project:main Oct 19, 2021
@kavilla kavilla deleted the avillk/install_core branch October 22, 2021 02:56
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.

OpenSearch Dashboards default config
3 participants