Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Add ports plug-in #51

Merged
merged 2 commits into from
Feb 17, 2019
Merged

Add ports plug-in #51

merged 2 commits into from
Feb 17, 2019

Conversation

benoitf
Copy link
Contributor

@benoitf benoitf commented Feb 5, 2019

Description in README file:
https://github.com/eclipse/che-theia/blob/095921fd96c3481db28e0374524bef604e3d6f67/plugins/ports-plugin/README.md

example of a process starting to listen on a port
port-listen

example of a process listening on localhost/127.0.0.1
port-listen-localhost

note: should be smoother with eclipse-theia/theia#4243

Change-Id: Iaa91b1d2c8c31e8ebd0047c9bf53e8baa76c888e
Signed-off-by: Florent Benoit fbenoit@redhat.com

@slemeur
Copy link

slemeur commented Feb 6, 2019

This is very cool !

@garagatyi
Copy link

@benoitf gifs look great! could you add a bit of detail on how this is implemented? Thanks!

@benoitf
Copy link
Contributor Author

benoitf commented Feb 6, 2019

@garagatyi you looked at the README ?

@garagatyi
Copy link

Oh, I missed the very first line of the description. Sorry

- if there is no workspace server matching, propose the user to do a port redirect.


Port redirect mechanism:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That means that some ingress or routes are pre-created when starting the workspace? That's a smart way to solve the problem though :-)

Copy link
Contributor Author

@benoitf benoitf Feb 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@l0rd yes correct. There is a need of a 'pool' of routes that can be later used when need to proxify a port.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really cool

If a process is listening, it will check
- if listening interface is 127.0.0.1/::1 it asks the user to create a redirect for this port so it will externally available
- if listening remotely:
- if there is a workspace server that is matching for this port, display the URL of this server and propose to open the link.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to talk about pre-exposed endpoint rather than workspace server? And display the URL of this endpoint?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@l0rd well in that case it's not really a pre-exposed endpoint
For example a user has specified in its workspace configuration a server, let say 'express' with port 3000 in that case we just show the public URL when the port is listening.
But of course I can change the wording. But this bullet was referencing the case of a valid workspace that is exposing ports as expected. In that case the plug-in does only 'show public URL'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it's not pre-exposed I had misunderstood. But anyway it's the workspace server that is a Che 6 terminology. In the devfile and che-plugin.yaml we will call it endpoint I think so we may use the new term here as well.

@benoitf benoitf changed the title [WIP] Add ports plug-in Add ports plug-in Feb 6, 2019
@benoitf
Copy link
Contributor Author

benoitf commented Feb 6, 2019

Ready to review :-)
any comments welcomed

@garagatyi
Copy link

I'm not appropriate person to add my review to this PR, but I'm +1 this solution very much - great idea of overcoming our contraints!

@ibuziuk
Copy link
Member

ibuziuk commented Feb 8, 2019

maybe it would be better to change popup buttons to "yes" / "no" for consistency

@benoitf
Copy link
Contributor Author

benoitf commented Feb 8, 2019

@ibuziuk yes sure thx for the feedback

Change-Id: Iaa91b1d2c8c31e8ebd0047c9bf53e8baa76c888e
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
Change-Id: Ic6fc89176353c951320502e5267645faf4e4284f
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
@benoitf benoitf merged commit cf445ea into master Feb 17, 2019
@sleshchenko sleshchenko deleted the ports-plugin branch February 26, 2020 10:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants