Open gastaldi opened 6 years ago
@vorburger thanks for your feedback. I think this is a great idea. We'd probably need to redirect to a screen where the user would have to choose the cluster they are targeting to deploy (or pass that as a parameter).
PS: We could bring back the idea behind https://blog.openshift.com/updated-openshift-deploy-buttons/
From @vorburger on June 12, 2018 23:25
I've coincentially stumbled upon https://docs.openshift.org/latest/dev_guide/create_from_url.html ... a very similar idea apparently (and still same logo as on the old blog post you linked!), but probably doesn't do the whole authentication workflow, and GitHub hook set-up, like Launcher easily could?
I've briefly attempted to use it in a naive first take like this, but that doesn't work at all. I'm probably misunderstanding it - that doc does not make it very clear what it really is - a "function"... as in what, JS? As in a URL? With what base?
Create From URL is a function that allows you to construct a URL from an image stream, image tag, or template.
Also anyway not sure how easy that is to use given this (and one cannot add add additional namespace other than "openshift" on Openshift Online; note how the respective paragraph is removed on the matching Openshift Online documentation):
Create from URL only works with image streams or templates from namespaces that have been explicitly whitelisted.
All the more reason to do something cool in this launcher?
Perhaps the URL parameters could be inspired by that thing.
From @ALRubinger on September 13, 2018 15:9
+1 for this. Was raised recently by the Node team in the context of making Starter applications / Boosters easier to develop and test.
I'm guessing this would have to be some kind of generic "spring boarding" service. Something where we can assure a stable URL for a long time while at the same time being able to redirect to the proper service (boosters to the Launcher, generic repos to some kind of service that can analyse the code and generate the proper OS project and who knows what else).
@quintesse I think from this point forward we should assume that all services in the Launcher are evergreen and that we'll be maintaining those APIs for some time.
I think this one is now easy we can "just" take the referrer url and put that into the import
From @vorburger on June 8, 2018 17:10
Description
@Microsoft buying @GitHub got me, like everyone else, thinking how long it will be until a friendly Office Assistant will start popping up on [your favourite GitHub project here] asking: "๐ Would you like to ๐Run this on ๐Azure? ๐" ... :smiling_imp:
So I started thinking about what some sort of "Run on OpenShift" thingie could look like. The GitHub Marketplace Apps obviously come to mind; we really should have an OpenShift App there! But, as a first step towards that, I think there is an even lower hanging fruit here that could be interesting:
What if I just wanted to have a (manually crafted) "Run on OpenShift" link at the top of my GitHub project's README? That HTTP GET link would, to start with, simply include said project's Git repo URL, and the name of an S2I Builder image... So basically just a web service equivalent of
oc new-app ...
- do you see what I mean?The "thingie" powering such a
/launchFromGit?url=https%3A%2F%2Fgithub.com%2Fvorburger%2Fs2i-java-example&s2i=fabric8/s2i-java
kind of link would, obviously, do the usual OAuth magic, on both OpenShift (to create the build, deployment etc.) and GitHub (to set up the WebHook for automatic rebuild) if theurl
is on GitHub - but really this launch service should work on any Git URL, not just GitHub.Later (!) extensions would perhaps include being able to specify the
--context-dir=
in that URL's parameter list. May be one would also like to specify where the base image source is, so that can be built? Or perhaps anything else than the Repo to launch would best not be URL encoded but declared in a file in a standard location in the repo? That way it would be possible to build an entire chain of images with 1 click.This would obviously work for any project for which there is a suitable S2I base image that can "run" whatever is in the respective repo. It would be language neutral, and certainly not require anything in particular in such a project; e.g. god forbid that this would only work for Java projects which had a particular build system with a particular OpenShift launch plugin.
I would expect this to take the user through a very minimalistic UX, without Office Assistant :smiley: animations, and no fancy scrolling wizard-y list of questions - just "click here to get this project running on OpenShift NOW!" kind of experience. Like if you are already logged in and previously OAuth approved GitHub & OpenShift, then you really don't want to see ANY UI here - just take me straight to the Route's URL where my app will momentarily be running! :smile:
The great work you guys are doing with Launcher seems like a good starting point for something like this? Basic v0.1 POC for this may not be very hard based on what you already have here? @edewit perhaps you find the time to further explore this? :smile_cat:
Copied from original issue: fabric8-launcher/launcher-backend#433