launcher-application icon indicating copy to clipboard operation
launcher-application copied to clipboard

Launcher URL to Run a GitHub repo project directly on OpenShift

Open gastaldi opened this issue 6 years ago • 6 comments

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:

Run on OpenShift 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 the url 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

gastaldi avatar Sep 13 '18 15:09 gastaldi