-
Notifications
You must be signed in to change notification settings - Fork 77
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
Suport generic url for installing a tsuru-plugin #172
Comments
Hi, I need more information about it
|
Currently, tsuru-client is available only for the following matrix of os/arch:
( You may check the releases page in order to check what exists in the moment. Nonetheless, I believe the list should not be hardcoded.
There is currently no plugin implementing this. This is a new standard we are creating. The current release of rpaas-operator (v0.33.1), would also be publishing the following {
"SchemaVersion": "1.0",
"Metadata": {
"Name": "rpaasv2",
"Version": "0.33.1"
},
"UrlPerPlatform": {
"darwin/amd64": "https://github.com/tsuru/rpaas-operator/releases/download/v0.33.1/rpaasv2_0.33.1_Darwin_x86_64.tar.gz",
"darwin/arm64": "https://github.com/tsuru/rpaas-operator/releases/download/v0.33.1/rpaasv2_0.33.1_Darwin_arm64.tar.gz",
"linux/amd64": "https://github.com/tsuru/rpaas-operator/releases/download/v0.33.1/rpaasv2_0.33.1_Linux_x86_64.tar.gz",
"linux/arm64": "https://github.com/tsuru/rpaas-operator/releases/download/v0.33.1/rpaasv2_0.33.1_Linux_arm64.tar.gz",
"linux/386": "https://github.com/tsuru/rpaas-operator/releases/download/v0.33.1/rpaasv2_0.33.1_Linux_i386.tar.gz",
"windows/amd64": "https://github.com/tsuru/rpaas-operator/releases/download/v0.33.1/rpaasv2_0.33.1_Windows_x86_64.tar.gz"
"windows/386": "https://github.com/tsuru/rpaas-operator/releases/download/v0.33.1/rpaasv2_0.33.1_Windows_i386.tar.gz",
}
} Let me know if any question arises ;) |
Currently, in order to instal a plugin, we nee a URL (
tsuru-plugin-add plugin_name url
).This URL is platform+architecture dependent, as the client has no way to figure out the right binary/package for itself.
I'm proposing a new manifest-like json document, which would list the URL for all platform/arch combinations.
We would then include that document with the plugin release, and it would be available at eg: https://github.com/tsuru/rpaas-operator/releases/latest/download/manifest.json (eg with an already existing file checksum.txt)
This would allow a single installation URL for a plugin
It would also improve the usability of #171
Expected behavior:
Recommended structure for
manifest.json
:(a real example that can be used for tests in a comment bellow)
what should be done:
func installPlugin(pluginName, pluginURL string) error
http.Get(pluginURL)
(actually, untildefer resp.Body.Close()
referring to that line)PluginManifest
. If it fails, keep the old behaviorPluginManifest.UrlPerPlatform[GOOS/GOARCH]
installPlugin()
with this new pluginURLTo prevent infinite recursion, the
func installPlugin(...)
could take an extra argument: a counter to be checked for recursionThe text was updated successfully, but these errors were encountered: