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

Support multiple users at the same time. #12

Open
wangyf2010 opened this issue Aug 19, 2014 · 9 comments
Open

Support multiple users at the same time. #12

wangyf2010 opened this issue Aug 19, 2014 · 9 comments

Comments

@wangyf2010
Copy link

Thanks for your great job first!

Is it possible to support multiple users at the same time?
What about terminal console?
How to separate different users' terminal console?

Regards
Simon

@AVGP
Copy link
Owner

AVGP commented Aug 26, 2014

Hey there, thanks for the input.

Well, I'm not planning for multi-user support but that doesn't mean you can't build that feature in yourself.
Actually I'm thinking about switching to running the cloud9 instances with Docker, which would provide more isolation and would possibly help with support for multiple users.

Would you be interested in trying to move forward with adding that feature? If so, I could give you some pointers to get going

@thoys
Copy link
Contributor

thoys commented Sep 3, 2014

+1

@marcellodesales
Copy link

+1...
I currently have a problem running Cloud9 in Docker... The only Cloud9 Docker image that's working today is the following:

https://github.com/gai00/docker-cloud9/

I posted a question to the developer asking how he/she could run Cloud9 with the current setting that opens random port numbers:

gai00/docker-cloud9#1

Docker will add support to port range through -expose soon...

moby/moby#1834

Would this be:

  1. The "Run" plugin for running the application could "docker build" the application if it contains a Dockerfile in the root directory of the app "Workspace".
  2. The "Run" plugin could take an alternative port number and override the randomly assigned one if the app takes "process.env.PORT" by default. I have a problem right now with Frameworks that takes process.env.PORT as precedence when compared to values defined in configuration files.
  3. This would be handy if the app is running under "GitHub Enterprise"... We could create a Chrome Extension to add a "Run" button to the GitHub page that has a Dockerfile. That would:

3.1 Log the user to Cloud9Hub
3.2 Create the Workspace for the Repo
3.3 Open it and Run the app

I've been pursuing this approach after learning about "Runnable.com", as they did a fantastic job with Docker... They solved the problem port by running the applications ALWAYS on port 80.

Thanks and I'm waiting for this!

Marcello

@AVGP
Copy link
Owner

AVGP commented Oct 20, 2014

After having a bit of time on my hands (rare occasion!) I started working on a docker-based version of Cloud9hub which I'll push soon.

As an added benefit I can work on it using Cloud9 from a docker container :)

@marcellodesales
Copy link

That would be great! Can you please describe the plans for extending it to allow multiple instances of cloud9...?

@AVGP
Copy link
Owner

AVGP commented Oct 20, 2014

That's relatively easy - the tricky bit will be to get private workspaces working.

I will be using etcd+confd+HAProxy to proxy the containers to the public facing network.

Multiple instance work like this:

  1. Cloud9hub checks if a container for the workspace is already running (using container name for this)
    2a. If a container is available, it will link there. Done
    2b. If no container is available, one is started, loading the workspace as a volume into the container
  2. The Container IP+Port are announced to etcd
  3. confd picks it up and rewrites the HAProxy configuration to proxy /user/workspace to the container IP+Port

The branch I am working on is here: https://github.com/AVGP/cloud9hub/tree/docker

@marcellodesales
Copy link

👍 Awesome! I have experimented etcd for distributed builds, but never used confd... The plan sounds great and I'm glad you shared those insights...

2.b: Not only the volume, but can you can also take the workspace's desired port number? Apps that don't follow 12Factor are built with their port numbers statically...
3. If the Port is provided by the workspace, this would not be relevant, but the IP...

thanks @AVGP

@AVGP
Copy link
Owner

AVGP commented Oct 20, 2014

Hm, multiple ports are a problem. I could not see how that could work, I'm afraid.
There are ways, but they would be very, very brittle.

However, single-port is not a problem, particularly because the port is always the same on the containers

@pedroponte
Copy link

+1 for multiple users, each one having their own workspace, logged in at the same time on the same port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants