janitor
janitor copied to clipboard
Give more visibility and control over Containers ("Containers v2.0")
We would like the Janitor web app to offer developers more visibility and control over their containers, so that they can do more with their containers, and troubleshoot common problems more easily.
Additionally, new container features should also be available in the upcoming Janitor API.
To improve the view and tools of Janitor containers, we should implement the following changes to Janitor's web app and server:
- [x] Rename "Contributions" to "Containers" on the website (also, /contributions/ should redirect to /containers/)
- [x] Make the existing "Firefox #0" container label editable (so that you can give it a name that reminds you what you use this particular container for, e.g. a feature you're implementing, a bug you're fixing, some tests you're running, etc) (@bnjbvr started this in #70)
- [x] ~~The (now empty) "Logs" text area should be replaced with a button (or "toggle-able text area") that allows you to start streaming live Docker container logs~~ (feature removed in 38bf720f8f2603c6b54e77430f62f67ee103aca8)
- [x] Add templated instructions describing how you can access your container via SSH (i.e. an
ssh
one-liner with the correct host, port, and a link to the Settings section where you can authorize personal SSH public keys) (done by @nt1m in fe6dd4295ac4f11612325eeba26d8161cf42d3d0) - [ ] Add buttons/links to access exposed container ports different from SSH (22), noVNC (8088) and Cloud9 (8089), for example Kresus containers should have a link to access their port 8080 (to preview the running Kresus web app through the Janitor proxy with a URL like /abcdef0123456789/8080/) (was #53)
- [x] Add a simple "diff view" to quickly see what was modified in this container (for example, the list of added/changed/removed files, or maybe a full diff if that's reasonable) (~~@nt1m might do this~~ I added this to the admin page in #161)
- [ ] Display the container ID somewhere (EDIT: Is this really useful?)
- [ ] Display the container's host somewhere (EDIT: Is this really useful?)
- [ ] Display the container's disk size footprint (actual size of the container, and also the total size of older Docker images you're preventing from being garbage collected)
- [ ] Display the actual Docker container status (running, stopped, not found) instead of what Janitor thinks the container status should be
- [ ] Add buttons to Stop and Start containers
If you have ideas, suggestions or feedback related to the items above, or if you want to help, please comment below. Thanks! 😄
We should also show which host the container is on (e.g. a very small, light grey "moz1.janitor.technology" somewhere would be amazing). Added to the list.
I'm currently implementing the SSH one-liner for containers, but I'd like your input on the UI.
Option 1: An in-line text field
With a helpful "copy to clipboard" button like:
Option 2: A pop-up
Something like this, but with a better-designed popup (and the trigger button can be either next to "VNC", or hidden under the "More options" menu with the Gear icon):
@nt1m @arshdkhn1 @bnjbvr @Coder206 any thoughts on these options? Or other ideas?
Option 1 looks good :+1:
My suggestion of option 2 was because, for me, SSH is Just Another Service that runs on janitor containers, the same way as VNC and the IDE are services. It is different in terms of how it is used (one has to use an external tool to use it), but it doesn't sound like a compelling reason to put it apart like this. So my vote would remain on option 2 as the favorite one.
I like the way Option 1 looks but @bnjbvr makes an interesting point about services. In my opinion, Option 1's always visible "Access via SSH" information makes the containers view much more verbose. Would it be possible to combine both concepts to include the SSH button on the container ribbon that toggles the field "Access via SSH"?
The reason I went for Option 1 is because the new contributions interface puts SSH behind the Advanced tab, so space is no longer a problem
@nt1m I'm ok with putting the SSH one-liner in your new interface's Advanced tab. By the way, would you care to open a pull request for this new Containers interface? We could work on integrating it at a hidden URL like /containers2/
or similar, and work on getting usability and feature parity right before switching to it. Would that work for you?
For now, I'll try to land some form of SSH one-liner in the existing Containers interface, but I'm still unsure about Option 1 vs Option 2 (also, a variant of Option 2 could be a dropdown, just like the "Clone or download" button on GitHub repositories).
Perhaps we could inspire our work from that of Gitpod's, I like how they handle containers (ports and start/stop)