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

Auto-install odo binary with Backstage plugin #7137

Closed
6 of 7 tasks
Tracked by #7091
rm3l opened this issue Oct 31, 2023 · 1 comment
Closed
6 of 7 tasks
Tracked by #7091

Auto-install odo binary with Backstage plugin #7137

rm3l opened this issue Oct 31, 2023 · 1 comment
Assignees
Labels
area/backstage Issues or PRs related to the Backstage integration kind/user-story An issue of user-story kind priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Milestone

Comments

@rm3l
Copy link
Member

rm3l commented Oct 31, 2023

As a Backstage integrator, I would like the odo plugin to automatically install the odo binary for my current OS/Arch, so that I don't have to manually download and install odo.
Currently, the custom actions plugin assumes there is already an odo binary available on the system the Backstage instance is running on.

https://github.com/rm3l/backstage-odo-devfile-plugin

Acceptance Criteria

  • It should automatically download the right odo binary when I install the Backstage plugin with yarn add. This is do-able via a postinstall hook: https://docs.npmjs.com/cli/v10/using-npm/scripts
  • It should not worry about the offline/airgap mode
  • The plugin should install the latest version of odo at this time, i.e., 3.15.0 (not latest)
  • It should download the right archive from https://mirror.openshift.com/pub/openshift-v4/clients/odo/ and unarchive it
  • It should verify checksums of the files downloaded to ensure their integrity
  • It should cache the files downloaded for a given version, so that installing the plugin twice can be much faster.
  • The custom actions should use odo from the downloaded path, and if it does not exist, they should expect it to be available on the system PATH
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Oct 31, 2023
@rm3l rm3l added priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). kind/user-story An issue of user-story kind kind/task Issue is actionable task area/backstage Issues or PRs related to the Backstage integration and removed needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. labels Oct 31, 2023
@rm3l rm3l self-assigned this Oct 31, 2023
@rm3l rm3l moved this to In Progress 🚧 in odo Project Nov 3, 2023
@rm3l rm3l added this to the v3.16.0 🚀 milestone Nov 6, 2023
@rm3l
Copy link
Member Author

rm3l commented Nov 6, 2023

Done in https://github.com/rm3l/backstage-odo-devfile-plugin/tree/0.16.7

Installing the scaffolder-odo-actions plugin now automatically fetches the right odo binary for the current operating system and architecture, and the custom actions can use that path.
This behavior is entirely customizable by users, either by:

  • specifying an explicit version of odo;
  • or by skipping the automatic download and manually providing a path to the odo binary (case of offline/airgap installations)

Tested on both Linux and Windows.

More details in the README file: https://github.com/rm3l/backstage-odo-devfile-plugin/blob/main/packages/scaffolder-odo-actions-backend/README.md

@rm3l rm3l closed this as completed Nov 6, 2023
@github-project-automation github-project-automation bot moved this from In Progress 🚧 to Done ✅ in odo Project Nov 6, 2023
@rm3l rm3l removed the kind/task Issue is actionable task label Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backstage Issues or PRs related to the Backstage integration kind/user-story An issue of user-story kind priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
Archived in project
Development

No branches or pull requests

1 participant