-
Notifications
You must be signed in to change notification settings - Fork 291
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
[FEATURE] Migrate Plugin install into an GitHub action #2207
Comments
FYI @scrawfor99 we talked about this offline to support the dashboard integration test workflows on linux/windows/mac |
Note; I think this action could be made more generic so it was usable by all plugin teams, but it might be good to start building it here before sharing it out to all the other plugins via opensearch-build or another repo |
opensearch-project#2207 Signed-off-by: Peter Nied <petern@amazon.com>
To start things off I have been working on creating a more streamlined workflow for the plugin install. My plan is to get it working on both JDK versions for all three OS' and then I will start splitting out steps in actions and files for drop-in functionality along the lines of the prototype you linked. For a preview checkout https://github.com/scrawfor99/security/tree/CombinedInstallWorkflows |
Update 2: Still working on streamlining the workflow and adding macOS install. Because the GHA macOS runner does not come with docker (Linux does) we cannot simply reuse the Linux commands so I am having to write a new workflow similar to the Windows install. |
Maybe for now we just thrown an error if the OS is mac? OpenSearch doesn't yet support the mac platform so there are no guarentees it will work or we could get support to get it running. |
Update 3: This (https://github.com/scrawfor99/security/tree/CombinedInstallWorkflows) is a refactoring of the plugin_install.yml that I made before. This version has a streamlined workflow with Linux and Windows environments being supported. The MacOS code is there but you cannot use it as it does not work yet so I removed any calls to it. |
Update 4: I further cleaned up some of the install logic and then added the basic setup for the action-ification of a generic plugin install process (https://github.com/scrawfor99/security/tree/ActionfiedWorkflows) . I next need to look at the way actions work and decide whether it is best to have the user assemble the plugin beforehand and provide it built in the repo or whether we want to have the building be part of the action. As is, it expects: platform: opensearch-version: plugin-name: plugin-zip-path: plugin-start-script: I have not tested it but using these inputs the security-plugin install file I wrote should work for both Windows and Linux. However, this is maybe a little bit more challenging to use then simply requiring a path to a plugin folder and parsing a lot of this information. It is just a pain do to the interaction of the shells, github actions, and the actual logic. Once I get the security plugin to be install-able using the action instead of the workflow, then I will look at how dashboards works and figure out what changes are needed for us to be able to run OpenSearch with dashboards installed and a connected plugin interface i.e. security dashboards. Ultimately, the idea will be that the action will prompt for whether you are going to run dashboards with additional plugins and then ask you to provide paths to the plugins and the dashboard components for them. |
Just took a peek at the plugin-install.yml [1] this is great work. Absolutely on the right track! |
Thank you :). I also am hoping that when we add MacOS this will make doing so pretty straightforward. |
Update 5: Today is mostly being spent looking at the rolling upgrade issue. That being said, checkout out the linked repo above should show a cleared plugin_install with the steps migrated to an action file which will then be called as the third step. |
Update 6:
This is the final error that prevents the workflow using a 5-parameter action to successfully run the Linux install test. I am not sure what the solution is and do not know what is different in the code between the functional fully-workflow-based install and the action-based version. I will hopefully fix this then address the remaining Windows steps. |
It seems as if as it seems like it was attempting to use TLSv1.3 and the output could not be decoded both weird and bad! A couple steps that you could take to figure it out,
Curl version info
Get opensearch logssecurity/.github/workflows/plugin_install.yml Lines 62 to 64 in f75be3e
|
Update 6: I spent the day working on the refactoring requested by @peternied a half-working version is present on the linked PR and a full process can be seen over at the commit history of https://github.com/scrawfor99/security/tree/LoweredPermissionsInstall. I also started creating a side-by-side run action for Opensearch and Dashboards. That can be found at https://github.com/scrawfor99/security/tree/DashboardsInstallAction2.4. This has been put on hold while I have been working on the refactoring. The plan is to finish the refactoring and then continue to do the dashboards install in the style of the refactor. After that, I will be creating a dual front and backend test with OS, Security, OS Dash, Sec Dash all running. I am tagging @RyanL1997 because yesterday we went over a lot of this and I know he is also working on some code towards these designs. NOTE: As hinted at by the branch name I am still trying to get the lowered permissions script running on GHA. |
Update 7: https://github.com/opensearch-project/security/pull/2239/files#diff-8518d56d53ee081f6bbcd0a88a46182f8089f57be5dab4360ee71a808e9963abR100 seems ready for final touches and merge. I have also created a branch of OS core and OS dashboards just for working on the dashboards actions. Currently implemented 2 actions on https://github.com/scrawfor99/OpenSearch-Dashboards/tree/DashboardsSetupActions that are running as I type this. They may be looping though so am looking into that. |
This issue is fully resolved with PR #2271 |
Is your feature request related to a problem?
The plugin-install workflow user to separate paths to configure and run OpenSearch from the min build. This would be really useful if it was reusable for this codebase as well as others. Being that we are thinking more multiplatform this is also an opportunity where we should could invest in combining these workflows.
What solution would you like?
In the
plugin-install
workflow the there all the downloading, configuring, starting of OpenSearch would be replaced with a step like the following:This would the be reusable for workflows within this Security codebase, but also for opensearch-project/security-dashboards-plugin#1171 where this kind of workflow would simplify the extra work needed
Do you have any additional context?
Started a prototype with peternied@1b880f4
The text was updated successfully, but these errors were encountered: