cloud9hub
cloud9hub copied to clipboard
Support multiple users at the same time.
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
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
+1
+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:
https://github.com/gai00/docker-cloud9/issues/1
Docker will add support to port range through -expose soon...
https://github.com/docker/docker/issues/1834
Would this be:
- 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".
- 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.
- 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
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 :)
That would be great! Can you please describe the plans for extending it to allow multiple instances of cloud9...?
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:
- 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
- The Container IP+Port are announced to etcd
- 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
:+1: 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
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
+1 for multiple users, each one having their own workspace, logged in at the same time on the same port.